Hi @Drotten, I just asked you about translation problem few days ago on the workshop. I think here’s a better place to discuss this.
You said:
Which strings are you referring to? If you mean the category strings (Body, Hair Style, etc.), then they are translatable. They are located in ui.shell.select_roster , you also need to make sure that the keys are in lowercase (e.g., “body” and not “Body”).
Do you mean those strings are hard coded? If so, I think it’s not a proper way to translate a mod. You should refer to the strings in en.json, so I can provide other-language.json rather than modify the mod directly.
The untranslatable strings are shown in the pictures below circled in red:
I tried your solution, it works. But still, it’s not a proper way (for me).
Btw, apparently those strings are not in the en.json, how are they displayed normal?
They’re not hard coded any more than what’s in en.json.
The strings themselves are looked up in Stoneheath’s en.json first hand (or rather in stonehearth:ui.shell.select_roster), but if they’re not found, then it will default to the name of the file itself that holds the model/material map type.
The models’ and material maps’ names aren’t grabbed from the en.json though, their strings are taken directly from what they’re named in their respective model files and in the male/female customization files. Thinking of it, I could add it so that the value strings are checked in en.json as well, gonna try this and see how it turns out.
Edit: From your screenshots, it’s worrisome though that the string says “Head Hair” though and not “Hair Style.” The actual string is head_hair, but I added that string to stonehearth’s en.json file (though a mixinto) and changed it to display Hair Style instead to match the customization screen of the embarking hearthlings.
I finally make it work, properly. (despite the value strings)
The en_fix.json in homf is the key and I just typed the wrong path in my manifest.json. (silly me)
But it still need to add an item, "eye_color": "Eye Color".
@Wiese2007, you need to put the en_fix.json in mixintos, rather than overrides. Cookmod also has a en_fix.json.
For example:
The localization have been improved upon, it’s now possible to translate all strings (hopefully, if I missed something, do let me know ). I’ve also updated the first post with details on how to add localization for this mod.
Edit:@dalabo and @wiese2007, the reason for why "eye_color": "Eye Color" wasn’t added is because the mod will itself turn the string “eye_color” into “Eye Color” if it’s not available in the locale file (the same goes for the other strings as well, except for “Hair Style” which actually has the key string of "head_hair).
I’m not too familiar with translating for Stonehearth, but do you really need that string to be present in stonehearth, or would it be enough to have it in your own localization files?
I think it’s better to have the eye_color in the file (en_fix.json) to clarify it’s translatable. Because I didn’t know I can add that specific keyword at the first place, it was a lucky punch for me.
the strings that are in the en.json from stonehearth are dont needed - so just the missing are all needed at the end and at the end if someone has questions they can still ask you or me
release-854 (x64)[M]
…/services/server/customizer/customize_hearthling.lua:40: attempt to index local ‘customizing_hearthling’ (a nil value)
stack traceback:
[C]: ?
…/services/server/customizer/customize_hearthling.lua:40: in function ‘start_customization’
homf/services/server/customizer/customizer.lua:97: in function ‘start_customization’
homf/call_handlers/customizer_call_handler.lua:13: in function <homf/call_handlers/customizer_call_handler.lua:12>
release-854 (x64)[M]
homf/services/server/customizer/customizer.lua:127: HoMF: Failed to finish customization
stack traceback:
[C]: ?
[C]: in function ‘assert’
homf/services/server/customizer/customizer.lua:127: in function ‘finish_customization’
homf/call_handlers/customizer_call_handler.lua:53: in function <homf/call_handlers/customizer_call_handler.lua:52>
I have a hard time reproducing the bug myself. What were you doing before getting this error? Which version of Stonehearth are you playing on? The latest unstable?
I Press F5 to reload the UI an the Message come up.
An empty windows from Homf come with the message in the window the only chois was the gender choise.
Ah, that old bug. I forgot about that one; it’s been around forever I think. It only appears when reloading the UI and it doesn’t really break anything, which is why it hasn’t been fixed yet. Maybe I should get around to it…