Is having different translations for specific parameter values doable?
See original GitHub issueThe problem
Currently we have quite a few translatable strings dealing with amounts. For example, Current leader is [civInfo] with [amount] Technologies discovered.
, +[amount] untradable copies
, [amount] Nations
, etc. All of these work fine when amounts != 1
, but at least in English, 1 Technologies
, 1 copies
and 1 Nations
don’t sound great, at least compared to 1 Nation
, etc.
Other languages, such as German, might have noun genders, such as der Arbeiter
or die Fregatte
. Translating these for uniques such as <for [baseUnitFilter] units>
would then necessarily result in choosing either der
or die
, which would sound weird for words of the other gender. In cases like these it’s also not an option to add der
or die
to the translation of Worker
and Frigate
respectively, as they should be in the accusativ form due to the for
, making it für den Arbeiter
if memory serves me well.
The proposed solution
One way to solve both these problems, is to have specific translations for specific parameter values. For example, adding the line [1] Nations = [1] Nation
to english.properties
to translate that correctly? Similarly, the translation for [Worker] units = für [jeden Arbeiter] einheden
(excuse my German) could solve the problem for these languages, be it at the cost of basically the entire benefit that translations parameters give.
At least one challenge at first glance seem to me to keep the translation during regeneration of the translation.
Is this a good solution to this problem, and would someone be willing to code it?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top GitHub Comments
Also, an idea about genders: what if use an additional braces as a placeholder for affected verbs and nouns. For example:
[unit] is destroyed = [unit] {знищений|знищена|знищено}
// has 3 genders[unit] is destroyed = [unit] est {détruit|détruite}
// has 2 genders[unit] is destroyed = [unit] er ødelagt
// has 1 gender or all of them are equal While the units will have their own flagCannon = Пушка {2}
orCannon = le canon {1}
.I would like to explain how it is dealt with in other projects I have worked on and allow translators to provide good localisation. I know maybe it is too complicated for the project.
So we can have:
Of course, once you identify a widely used particle (usually determiners) in other strings that need to be formatted, you can add a new string for easing translations: