Page 1 of 1

Multi languages patches.

Posted: Sun Jan 18, 2015 9:42 pm
by Cjkjvfnby
This is bulk cleanup for stringtables except english.

This is done by script. (patch has ~46K lines)

1) Remove all tokens that are not present in en.txt
2) Remove all tokes that are the same as in en.txt
3) Reorganize tokens and comments in same order as en.txt

I remove hardcoded untranslated values, bacause english stringtables changed sometimes.
In current time I see tendention to replace hardcoded names to tokens. Great work was done with de.txt

Code: Select all

#en.txt
GRO_SYMBIOTIC_BIO_DESC
'''Increases the max population of Good, Adequate and Poor planets by planet size; Tiny: +1, Small: +2, Medium: +3, Large: +4, Huge: +5.'''

#de.txt
GRO_SYMBIOTIC_BIO_DESC
'''Erhöht die maximale Bevölkerung von Planeten des Typs [[PE_GOOD]]>, [[PE_ADEQUATE]] oder [[PE_POOR]], abhängig von deren Größe; [[SZ_TINY]]: +1, [[SZ_SMALL]]: +2, [[SZ_MEDIUM]]: +3, [[SZ_LARGE]]: +4, [[SZ_HUGE]]: +5.'''
Translators can use next workflow:
parse.py is here https://gist.github.com/Cjkjvfnby/800215ef46a7b4007257 python2.7
  • Create full string file with all tokens present in en.txt

    Code: Select all

    python parse.py full ru.txt full_ru.txt
  • Do all translation staff with full_ru.txt
  • Convert it back to small file

    Code: Select all

    python  parse.py small full_ru.txt ru.txt
PS. I did not include es.txt because it has some issues (viewtopic.php?p=73731#p73731).

Re: Multi languages patches.

Posted: Sun Jan 18, 2015 9:58 pm
by Cjkjvfnby
TODO:

Remove SITREP_PRIORITY_ORDER from all translation files. It is outdated.

remove FN_INVASION_FLEET form en.txt because it not used as started fleet.

Re: Multi languages patches.

Posted: Sun Jan 18, 2015 10:21 pm
by MatGB
Cjkjvfnby wrote:TODO:

Remove SITREP_PRIORITY_ORDER from all translation files. It is outdated.
It does need to be somewhere user-customisable tho, matters not where, Shared Macros?

Re: Multi languages patches.

Posted: Sun Jan 18, 2015 11:35 pm
by Cjkjvfnby
MatGB wrote:
Cjkjvfnby wrote:TODO:

Remove SITREP_PRIORITY_ORDER from all translation files. It is outdated.
It does need to be somewhere user-customisable tho, matters not where, Shared Macros?
Can you repeat in other words?

By the way do you know something about "default/starting_ship_designs.txt"?. Removing it does not affect my game.

Re: Multi languages patches.

Posted: Mon Jan 19, 2015 12:01 am
by Geoff the Medio
Cjkjvfnby wrote:By the way do you know something about "default/starting_ship_designs.txt"?. Removing it does not affect my game.
Probably became obsolete after transitioning to Python-based universe generation.

Re: Multi languages patches.

Posted: Mon Jan 19, 2015 2:50 am
by Dilvish
Cjkjvfnby wrote:TODO:
Remove SITREP_PRIORITY_ORDER from all translation files.
That entry needs to NOT be removed from "en.txt"; shared_macros.txt is not (I think) a workable place for it. If by "all translation files" you mean all stringtables other than "en.txt", as part of your step "Remove all tokes that are the same as in en.txt ", then sure that could be reasonable and help enforce the warning that goes with it,
en.txt wrote:## ** DO NOT TRANSLATE the contents of SITREP_PRIORITY_ORDER -- this is a functional entry
It is outdated.
If it's missing some templates, that's not critical, it's simply more helpful for user customization if they are all there. As noted with the entry,
en.txt wrote:## Sitreps not specified below will appear in the SitrepPanel following those below.
If you notice some templates missing, please point them out so they can be added to en.txt.

Re: Multi languages patches.

Posted: Mon Jan 19, 2015 8:30 am
by MatGB
Cjkjvfnby wrote:
MatGB wrote:
Cjkjvfnby wrote:TODO:

Remove SITREP_PRIORITY_ORDER from all translation files. It is outdated.
It does need to be somewhere user-customisable tho, matters not where, Shared Macros?
Can you repeat in other words?
I, and other advanced players, use that list and change it when testing things, it needs to be accessible for those just scripting (like myself) who don't do the more advanced coding, as we need to be able to move things around and assign things a certain priority, I've added stuff to it relatively recently, not sure what you mean by "it's outdated" but it's definitely not obsolete.

Not everyone that writes a new script/sitrep remembers to add it to the priority list, it's somethign I try to remember to do when I give en.txt a pass but don't always remember.

Re: Multi languages patches.

Posted: Mon Jan 19, 2015 9:01 am
by Cjkjvfnby
Dilvish wrote:
Cjkjvfnby wrote:TODO:
Remove SITREP_PRIORITY_ORDER from all translation files.
That entry needs to NOT be removed from "en.txt";
from all translation files I mean translation of en.txt

Re: Multi languages patches.

Posted: Wed Jan 28, 2015 3:33 pm
by Cjkjvfnby
"added ref to Narrow EP to Ugmors gameplay description" for other languages.

Re: Multi languages patches.

Posted: Thu Jan 29, 2015 7:38 pm
by Dilvish
Cjkjvfnby wrote:"added ref to Narrow EP to Ugmors gameplay description" for other languages.
committed

Re: Multi languages patches.

Posted: Tue Feb 03, 2015 8:24 pm
by Cjkjvfnby
Remove desynced english text in it.txt. This text reference removed tags.