ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.72k stars 376 forks source link

String contexts for several strings #5248

Open zenseii opened 2 years ago

zenseii commented 2 years ago

Preliminary checks

Describe the problem requiring a solution

More contexts should be added for these strings both for improving the game and to accomodate for other languages:

Describe the possible solution

For the most part you would need to add the usual context prefix ex. combatOption|Speed. For Classes you'll need to create another enumeration since right now only the Necromancer class has its own context in a switch - another approach should probably be used to avoid having to switch through every class name.

Additional info

No response

zenseii commented 1 year ago

Related closed PR #5983

zenseii commented 1 year ago

Many of these are still valid, and there are many more throughout the engine. Most of them should be easy fixes so I'm marking it as good first issue.

felix-schneider commented 2 days ago

Digging this up again. Similar to my thoughts on #9260, even though it would lead to many more strings, the descriptions of the buildings may need individual translation strings. In some languages, both the article of the building name and the grammatical form of the creature they produce may be different from the base form.

Edit: regarding 2 and 5: The elegant way of solving this would be the use of a soft hyphen. That is probably not available in many of the encodings that the translations are in. What would it take to make all translation files use Unicode? Of course, the rendering code would need to support it as well.

ihhub commented 2 days ago

Hi @felix-schneider , using Unicode is not possible by 2 reasons: