Ludeon Forums

Ludeon Forums

  • September 18, 2019, 03:00:42 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Request: Help check the language workers for accuracy  (Read 5554 times)

Danub

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Re: Request: Help check the language workers for accuracy
« Reply #15 on: September 23, 2018, 10:04:08 AM »

Now, I'm assuming that you're keeping separate lists of words for singular and plural forms. If not and you're building the plurals on the fly, then you're in for a world of pain and may not be able to get a proper Romanian translation using this system, since forming plural in Romanian is irregular.
I'll update with proper code for the 2 methods (if actually possible) once I know how the system is designed.
Just to make sure I'm clear: Do you call
WithDefiniteArticle("horses", Gender.Male, true,  false) to get "the horses" ('gender' and 'plural' params define the 'string' param)
or
WithIndefiniteArticle("horse", Gender.Male, true,  false) to get the same result ('gender' and 'plural' params define the required result)
Gender doesn't apply to English, but you get the point.. If it's the second case, then you can't use it for Romanian.
« Last Edit: September 23, 2018, 10:21:39 AM by Danub »
Logged

Elevator

  • Drifter
  • **
  • Posts: 67
  • Refugee
    • View Profile
Re: Request: Help check the language workers for accuracy
« Reply #16 on: October 01, 2018, 07:37:15 AM »

The current implementation of GenText.ToCommaList() provides incorrect punctuation for Russian language (and possibly for some other ones). In Russian there should be no comma before "and", so enumerations should look like: "Torso, neck, left shoulder and right shoulder"
Could you please add ToCommaList(IEnumerable<string> items, bool useAnd) virtual method to LanguageWorker base class? It may be called from GenText.ToCommaList() and could be overriden in subclasses.

Btw, SitePartWorker_Turrets.GetThreatsInfo() also uses "AndLower" keyed value for the same purpose. I believe this method could be refactored to use  GenText.ToCommaList() like it is done in all other contexts in the game.
« Last Edit: October 01, 2018, 07:38:59 AM by Elevator »
Logged

Adirelle

  • Muffalo
  • *
  • Posts: 5
  • Refugee
    • View Profile
Re: Request: Help check the language workers for accuracy
« Reply #17 on: November 15, 2018, 02:53:22 AM »

Hi there,

About french:

I/ Pluralization

Here are the proper pluralization rules (using the first match):

1) special cases (we should probably check if these words are actually used in the translations):
1a) "bail", "corail", "émail", "gemmail", "soupirail", "travail", "vantail", "vitrail": replace "ail" by "aux",
1b) "bleu", "émeu", "landau", "lieu", "pneu", "sarrau", "bal", "banal", "fatal", "final", "festival" : append "s",
1c) "bijou", "caillou", "chou", "genou", "hibou", "joujou", "pou" : append "x",
2) words ending in "s", "x" or "z": do not change anything,
3) words ending in "al": replace "al" by "aux",
4) words ending in "au" or "eu": append "x",
5) else append "s".

II/ PostProcessing

In addition to what b606 said, ellision should be applied before word mangling.
All these rules are case-insensitive and also apply at the start of sentences, e.g. "si il" => "s'il" should means .Replace(" si il ", " s'il ").Replace("Si il", "S'il"). This would be easier to write as regular exceptions (e.g. "si il" => "s'il" becomes "\b([sS])i il" => "$1'il"). Are they allowed ?

- words "de", "le", "la" followed by a vowel: replace by "d'", "l'" and "l'" respectively.
- "si il" => "s'il"
- "que il" => "qu'il"
- "lorsque il" => "lorsqu'il"
- "que elle" => "qu'elle"
- "lorsque elle" => "lorsqu'elle"
(existing rules:)
- "de le" => "du",
- "de les" => "des",
- "de des" => "des".
« Last Edit: November 15, 2018, 02:56:37 AM by Adirelle »
Logged

Bacilic

  • Muffalo
  • *
  • Posts: 4
    • View Profile
Re: Request: Help check the language workers for accuracy
« Reply #18 on: January 19, 2019, 02:13:13 PM »

I have already translated 80% of version v0.18.1722 and now I want to adapt it to the new version of game (v1). There have been several changes to the translations of the game so that each language can be seen in the game as natural as possible. Because the new translation method is more complex (contains definitive and indefinite articles for each genus, pronouns, adjectives, etc) I want to do the right job. Since the English language worker does not cover Greek, it is necessary to create a language worker for Greek

How do I make - setup it?
Logged

Harkeidos

  • Muffalo
  • *
  • Posts: 18
  • Refugee
    • View Profile
Re: Request: Help check the language workers for accuracy
« Reply #19 on: March 03, 2019, 03:46:55 AM »

How can I implement language workers in the game?

Thanks
Logged

Bacilic

  • Muffalo
  • *
  • Posts: 4
    • View Profile
Re: Request: Help check the language workers for accuracy
« Reply #20 on: March 08, 2019, 01:55:19 PM »

How can I implement language workers in the game?

First of all, the Language Worker of your language(?) must be include in the game's code.
On the first page:https://ludeon.com/forums/index.php?topic=44000.0 of this thread you will see that these following exist:
  • Catalan
  • Danish
  • Dutch
  • English
  • French
  • German
  • Hungarian
  • Italian
  • Korean
  • Norwegian
  • Portuguese
  • Romanian
  • Russian
  • Spanish
  • Swedish
  • Turkish
If someone of it does, you have to declare it in the code:
Code: [Select]
<LanguageInfo>
  <friendlyNameNative>Ελληνικά</friendlyNameNative>
  <friendlyNameEnglish>Greek</friendlyNameEnglish>
  <canBeTiny>true</canBeTiny>
  <languageWorkerClass>LanguageWorker_Default</languageWorkerClass>
  <credits>
in line: "<languageWorkerClass>LanguageWorker_YOUR_LANGUAGE</languageWorkerClass>" of the file "LanguageInfo.xml"

After using the appropriate keywords:https://ludeon.com/forums/index.php?topic=43979.0 (for each language produces different results) during translation you adjust the text in your language.
Logged

Elevator

  • Drifter
  • **
  • Posts: 67
  • Refugee
    • View Profile
Re: Request: Help check the language workers for accuracy
« Reply #21 on: March 12, 2019, 08:12:16 AM »

Quote
First of all, the LanguageWorker of your language(?) must be include in the game's code.
Before you send your class to developers you may want to test your LanguageWorker in runtime.
This can be done by creating a mod for the game.
I've created a LanguageWorker mod for Russian language, you may use it as a template for your one:
https://github.com/Elevator89/RimWorld-LanguageWorker_Russian
Logged
Pages: 1 [2]