Locale changes in 0.11.0 -- the moding part

Looking for a mod? Have a review on a mod you'd like to share?
Post Reply
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Locale changes in 0.11.0 -- the moding part

Post by cube »

So, in 0.11.0 there will be some locale changes as a side effect of moving to web based translation platform instead of the current git / forum mess (but more on that later and elsewhere).

The only change that directly affects modders will be that the scenario and campaign locales are now loaded in the same way as the main ones for base and core.
For every language there is a subdirectory with the language code as a name, all files inside this subdirectory with extension *.cfg are loaded as a locale.

I'm putting here my tiny script I used to convert base and scenario pack, if anyone of you is on unix system and feels brave enough to use it :-)
You run this command in the mod_root/scenarios and mo_root/campaigns directories and everything should be all right :-)

Code: Select all

find -name locale -type d | while read path ; do echo $path ; name=$(echo $path | sed 's|^./||; s|/locale$||; s|/|_|') ; for f in $path/*.cfg ; do language=$(basename $f .cfg); mkdir $path/$language ; mv $f $path/$language/$name.cfg ; done ; done
Those of you on windows -- can't help you ... sorry :-)

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Locale changes in 0.11.0 -- the moding part

Post by FreeER »

cube wrote:Those of you on windows -- can't help you ... sorry :-)
get/use cygwin and copy/paste the script into the terminal, or if you want to use it as a shell script then paste it into notepad++ and make sure to use the edit->EOL Conversion->UNIX/OSX Format (or you'll probably get unexpected EOF error lol, confused me a second until I thought about that).
I'll see if I can remember some .bat scripting and paste that here for anyone interested in a bit.

edit: yeah... I don't remember much batch anymore, not that I knew too much then lol managed to get this um, thing written that 'kind of' works but no where near as nicely as what cube provided (place in scenarios\x and run...) :)
poor batch
edit2:
better batch

Post Reply

Return to “Questions, reviews and ratings”