[crossfire] Localisation

Mark Wedel mwedel at sonic.net
Fri Sep 17 23:19:39 CDT 2021


On 9/17/21 10:28 AM, Nicolas Weeger wrote:
> Hello.
> 
> 
> I'd like to overhaul the translation / localisation system. So searching good
> ideas & suggestions & comments :)

  so the reason that I added the name_pl many years ago is that in English, there were various 'one off' cases that were not easy to handle.

  Before, logic was basically:
  - Most plurals just need an s added (sword -> swords)
  - If it ends in y, tends to need to be replaced by ies (ruby -> rubies).  I think there might have been a flag to handle that.

  But there are other words where this logic is not sufficient (die -> dice is one that comes to mind - I think there were some others which followed yet different rules).  So in the end, it became simpler on the code side just to have a different field with the plural name, instead of the code itself having to do a bunch of stuff to make a proper plural.

  I think the other cases where things became complicated are more complex names, 1 foo of bar -> 2 foos of bar, which became yet another case (and now once again, rules for the first name have to be covered - ruby of greatness -> rubies of greatness.

  I'm not quite sure what using the library, and adding to add in gender field and special fields, etc, is a simpler solution - it in fact looks more complicated - from a person making arches (who may not be much a programmer), having {en,fr,de,...}_{name,name_pl} seems simpler.  It becomes 'Oh, I know the proper German plural for this name, so I just need to add a de_name_pl with it to the arch and are done, and do not need to thing about gender field, special fields, etc.


More information about the crossfire mailing list