FreeOrion

Forums for the FreeOrion project
It is currently Thu Dec 14, 2017 6:08 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Multi languages patches.
PostPosted: Sun Jan 18, 2015 9:42 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
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:
#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:
    python parse.py full ru.txt full_ru.txt
  • Do all translation staff with full_ru.txt
  • Convert it back to small file
    Code:
    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


Top
 Profile  
 
PostPosted: Sun Jan 18, 2015 9:58 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
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.

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


Last edited by Cjkjvfnby on Sun Jan 18, 2015 10:45 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Jan 18, 2015 10:21 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
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.


Top
 Profile  
 
PostPosted: Sun Jan 18, 2015 11:35 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
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


Top
 Profile  
 
PostPosted: Mon Jan 19, 2015 12:01 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
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.


Top
 Profile  
 
PostPosted: Mon Jan 19, 2015 2:50 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
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


Quote:
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


Top
 Profile  
 
PostPosted: Mon Jan 19, 2015 8:30 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
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.


Top
 Profile  
 
PostPosted: Mon Jan 19, 2015 9:01 am 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
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


Top
 Profile  
 
PostPosted: Wed Jan 28, 2015 3:33 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
"added ref to Narrow EP to Ugmors gameplay description" for other languages.


Attachments:
update_NARROW_EP1.patch [1.28 KiB]
Downloaded 33 times

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Top
 Profile  
 
PostPosted: Thu Jan 29, 2015 7:38 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
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


Top
 Profile  
 
PostPosted: Tue Feb 03, 2015 8:24 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
Remove desynced english text in it.txt. This text reference removed tags.


Attachments:
it_desync_patch.patch [654 Bytes]
Downloaded 32 times

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group