http://stonehearth.net/desktop-tuesday-localization-improvements/
Some love for the non native-english speaking Hearthlings.
http://stonehearth.net/desktop-tuesday-localization-improvements/
Some love for the non native-english speaking Hearthlings.
Wait. So now if we want to be localization friendly on our mods we’ll have to change a lot of files (I mean, for the initial upgrade to Alpha 12).
“The portion inside, stonehearth:entities.food.corn.corn_basket.name, describes how to navigate to the actual string that defines the name for the corn basket in the translation json file (en.json for English). The “stonehearth:” at the beginning says that the string will be defined in the translation file in the stonehearth mod.”
Hmm… So if I add my own entities, I’d use my_mod:entities.whatever.whatever, but if I’m changing the description of an existing Stonehearth entity, I should do a mixinto to the en.json file, changing the values?
Well, to add my own entities I’d have to mixinto the en.json anyway, so I guess it’s right
I’m a bit confused because I have lots of overrides and mixintos, and I have to plan how I’m going to update them.
This is a good improvement. Can’t wait for Alpha 12
COOOL! A Honor to me
and my following Translators of other languages!!!
Edit: Can´t wait for Alpha12 - this will cancel lots of my extra work and makes beyondcompare useless xD
Edit2: The funny part is - last week i have played with the idea to change them all manually and at them to the en.json but canceled the idea because i doesnt know if they will not change the initial idea and all my work would be useless xD
Excellent! I’ll give a go for a french translation as soon as A12 is released!
This is going to help a real lot. Really wonderfull! Thaks, thanks a lot!!!
Have fun, Kyth.
@Relyss: The key portion after my_mod: can be whatever you would like – you can even keep everything at the top level ex: my_mod:my_object_name, my_mod:my_object_description. It just specifies how to look up the string in the language file. I made it a long name for organizational purposes because stonehearth has a LOT of objects and it helps to be able to group them all under the same categories.
For changing description of existing stonehearth entity, you can either mixinto the stonehearth’s en.json (Option A). Or you can mix into that entity’s json file and change the description key to point to your mod (Option B). The difference is:
Using Option A: If the user uninstalled your mod, objects made with your mod would revert to their old description.
Using Option B: Uninstalling your mod would cause objects made with your mod to show with missing strings.
If you want to add your own entities in a mod, you can create your own en.json in your mod’s folder (my_mod/locales/en.json) and specify localized strings there. Then in your mod’s object file, the string keys would look like i18n(my_mod:some.string.key)
I do have a script that I wrote to make pulling the translations from the individual object .json files easier. I can run that on any translations that were done on the old stonehearth to hopefully save people some time converting to the new localization system.
Yes! I’m starting to love these technically dev blogs more then content updates. As a person who knows nothing about computers besides turning them on and playing games, I find them to be very interesting and enjoyable. Thank you!! =^.^=
Any word on when this will sneak into the latest steam branch, or is it only for the push to official alpha 12 release?
Working on my first mod, and I may as well convert it and get used to this system ASAP.
excellent update… mentally prepares to brush up on his PigLatin for A12
and congrats to @yshan on her first blog post!
@yshan great thank to ur efforts, pressure on my work has been eased a lot. it is no longer needed to compare over 200 new files with old ones to find the updated place.(as @Wiese2007 ever said), translation in China will make progress, i’d like to deliver sincere thank to u on behalf of Chinese people as well as other country’s translation worker,u’ve done great job.