[MOD] Hearthlings of Many Faces

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. :slight_smile:

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”). :slight_smile:

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:

heyho i have resolved this - i have manually added them into the stonehearth en.json after recipes_label

I tried your solution, it works. But still, it’s not a proper way (for me). :confused:
Btw, apparently those strings are not in the en.json, how are they displayed normal?

1 Like

Hi @dalabo.

They’re not hard coded any more than what’s in en.json. :wink:
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.

1 Like

Hi @Drotten,

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:

"mixintos" : {
    "stonehearth/locales/zh-TW.json": "file(translations/mods/homf/zh-TW_fix.json)"
},
1 Like

yes works fine :smiley: but also tweaked it a little the fix file and added

eye_color (was missing) and for lomh: accessory and luxury

since the mixinpart really works i have already changed the complete lomh and lomh-nc into mixin (so that new modder can also add there stuff)

Mod update!

The localization have been improved upon, it’s now possible to translate all strings (hopefully, if I missed something, do let me know :slight_smile:). 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?

2 Likes

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.

1 Like

i think it should be included - so that other translators can use them and dont need to search for it ^^

I was hoping that the description that I just added concerning localization would give an idea of how to work with the strings.

But I suppose I could add an entry for eye_color, and for every other possible string that comes from stonehearth itself.

1 Like

the strings that are in the en.json from stonehearth are dont needed - so just the missing are all needed at the end :smiley: and at the end if someone has questions they can still ask you or me :wink:

1 Like

Understood, the mod has been updated again with the strings that were not present in Stonehearth’s en.json. :slight_smile:

Also, the description in the first post has been updated to reflect this change.

2 Likes

In last Version i get some errors from this Mod:

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?

Thanks!

1 Like

Last Unstable 854

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…

1 Like

Ok ^^ nice when it fixed.
I use F5 befor i made screenshots. Then the menuebars etc. not in Picture.

You can simple press alt+z to hide ui.

Hm nice tip and nice Try ^^

1 Key vs. 2!
And the F5 i know it’s intuitiv for me.
The other, when i need, i have forgotten. (^^,)

Mod update!

Fixed the bug that made the customizer window show up when reloading the UI (when one wasn’t customizing a hearthling).

All the links in the OP has been updated as well as the one up on Steam workshop.

3 Likes