Multi languages patches.

Discuss, plan, and make Translations for FreeOrion
Post Reply
Message
Author
User avatar
Cjkjvfnby
AI Contributor
Posts: 448
Joined: Tue Jun 24, 2014 9:55 pm

Multi languages patches.

#1 Post by Cjkjvfnby » Sun Jan 18, 2015 9:42 pm

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).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Cjkjvfnby
AI Contributor
Posts: 448
Joined: Tue Jun 24, 2014 9:55 pm

Re: Multi languages patches.

#2 Post by Cjkjvfnby » Sun Jan 18, 2015 9:58 pm

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.
Last edited by Cjkjvfnby on Sun Jan 18, 2015 10:45 pm, edited 1 time in total.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi languages patches.

#3 Post by MatGB » Sun Jan 18, 2015 10:21 pm

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?
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Cjkjvfnby
AI Contributor
Posts: 448
Joined: Tue Jun 24, 2014 9:55 pm

Re: Multi languages patches.

#4 Post by Cjkjvfnby » Sun Jan 18, 2015 11:35 pm

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.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12247
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Multi languages patches.

#5 Post by Geoff the Medio » Mon Jan 19, 2015 12:01 am

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.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4685
Joined: Sat Sep 22, 2012 6:25 pm

Re: Multi languages patches.

#6 Post by Dilvish » Mon Jan 19, 2015 2:50 am

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.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi languages patches.

#7 Post by MatGB » Mon Jan 19, 2015 8:30 am

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.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Cjkjvfnby
AI Contributor
Posts: 448
Joined: Tue Jun 24, 2014 9:55 pm

Re: Multi languages patches.

#8 Post by Cjkjvfnby » Mon Jan 19, 2015 9:01 am

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
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Cjkjvfnby
AI Contributor
Posts: 448
Joined: Tue Jun 24, 2014 9:55 pm

Re: Multi languages patches.

#9 Post by Cjkjvfnby » Wed Jan 28, 2015 3:33 pm

"added ref to Narrow EP to Ugmors gameplay description" for other languages.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead, Programmer
Posts: 4685
Joined: Sat Sep 22, 2012 6:25 pm

Re: Multi languages patches.

#10 Post by Dilvish » Thu Jan 29, 2015 7:38 pm

Cjkjvfnby wrote:"added ref to Narrow EP to Ugmors gameplay description" for other languages.
committed
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Cjkjvfnby
AI Contributor
Posts: 448
Joined: Tue Jun 24, 2014 9:55 pm

Re: Multi languages patches.

#11 Post by Cjkjvfnby » Tue Feb 03, 2015 8:24 pm

Remove desynced english text in it.txt. This text reference removed tags.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply