#30 Languages doesn't seem to work with MineClone2

Closed
opened 7 months ago by kay27 · 10 comments
kay27 commented 7 months ago

Hi,

I'm currently trying to translate MineClone2 to Russian: https://git.minetest.land/kay27/MineClone2/commits/branch/master

Surprisingly I found the protector is already translated to Russian, but on my server ( https://forum.minetest.net/viewtopic.php?f=10&t=24888 ) I see English translation only ("Owner: XXX" and etc.) even if RU chosen and almost everything really translated. May language code doesn't pass to protector?

Best regards,

Hi, I'm currently trying to translate MineClone2 to Russian: https://git.minetest.land/kay27/MineClone2/commits/branch/master Surprisingly I found the protector is already translated to Russian, but on my server ( https://forum.minetest.net/viewtopic.php?f=10&t=24888 ) I see English translation only ("Owner: XXX" and etc.) even if RU chosen and almost everything really translated. May language code doesn't pass to protector? Best regards,
TenPlus1 commented 7 months ago
Owner

This is odd, will check and see what's up, it was working before...

Update: Seems that the .po files are no longer being used but the .txt one's are fine, will convert them across.

Update #2: Git updated with new .txt translation files which work ok :)

This is odd, will check and see what's up, it was working before... Update: Seems that the .po files are no longer being used but the .txt one's are fine, will convert them across. Update #2: Git updated with new .txt translation files which work ok :)
kay27 commented 7 months ago
Poster

Thanks for fast fix, but I can't realize how to use it properly.

I updated protector. I have latest MineClone2 with Minetest 5.3.0 and I still see English messages.

I tried to remove *.po from protector/locale and restart minetest but it doesn't help.

@TenPlus1 I know you warned everyone about incompatibility but I still don't want to use /areas, they a bit difficult for kids because they couldn't be crafted :)

Thanks for fast fix, but I can't realize how to use it properly. I updated protector. I have latest MineClone2 with Minetest 5.3.0 and I still see English messages. I tried to remove *.po from protector/locale and restart minetest but it doesn't help. @TenPlus1 I know you warned everyone about incompatibility but I still don't want to use /areas, they a bit difficult for kids because they couldn't be crafted :)
kay27 commented 7 months ago
Poster

I'm exploring a little.

Created template.txt and protector.ru.tr like it uses in MineClone2 but no result.

Then I found that: https://github.com/minetest/minetest/blob/2bec83eec0dc2de2d6b8fb0b827e94807ed9b0b8/doc/lua_api.txt#L3204

I don't see local S = minetest.get_translator("protector") in protector, there is: local S = dofile(MP .. "/initlib.lua") instead.

I tried to change it and voila.

I forked it to show what I did, hope it might be useful, 92ca9e2c33

I'm exploring a little. Created template.txt and protector.ru.tr like it uses in MineClone2 but no result. Then I found that: https://github.com/minetest/minetest/blob/2bec83eec0dc2de2d6b8fb0b827e94807ed9b0b8/doc/lua_api.txt#L3204 I don't see ```local S = minetest.get_translator("protector")``` in protector, there is: ```local S = dofile(MP .. "/initlib.lua")``` instead. I tried to change it and voila. I forked it to show what I did, hope it might be useful, https://notabug.org/kay27/protector/commit/92ca9e2c3348ee1597eb5fb3290b6046b53169e2
kay27 commented 7 months ago
Poster

I decided to finish the work as I started... So I made b858c2fb88

I am very new to Minetest and Lua, so maybe I wrong - very sorry for that... But if you find it's okay please pick up my commits. At least translation works with latest mineclone2/minetest with them.

I decided to finish the work as I started... So I made https://notabug.org/kay27/protector/commit/b858c2fb889d83557ddeaafe5c7fc6efc0a60d07 I am very new to Minetest and Lua, so maybe I wrong - very sorry for that... But if you find it's okay please pick up my commits. At least translation works with latest mineclone2/minetest with them.
kay27 commented 7 months ago
Poster
@TenPlus1
TenPlus1 commented 7 months ago
Owner

It's hard to keep compatibility for 0.4.17 and 5.x but I've updated git so that translation defaults to minetest's own using .tr files and fallbacks to intllib if available with .po files.

Hopefully this should work ok with mineclone2 as well as default game.

It's hard to keep compatibility for 0.4.17 and 5.x but I've updated git so that translation defaults to minetest's own using .tr files and fallbacks to intllib if available with .po files. Hopefully this should work ok with mineclone2 as well as default game.
kay27 commented 7 months ago
Poster

Now it seems to work well.

Have no idea why you're keeping compatibility with 0.4.17 but of course you do a gorgeous work, thank you so much for your golden mod collection, I wish you a good luck!

Thanks!!!

Now it seems to work well. Have no idea why you're keeping compatibility with 0.4.17 but of course you do a gorgeous work, thank you so much for your golden mod collection, I wish you a good luck! Thanks!!!
TenPlus1 commented 7 months ago
Owner

Would you believe that 48% of servers still run 0.4.16/0.4.17, so until 5.x is the majority I'll support what I can for now :)

Would you believe that 48% of servers still run 0.4.16/0.4.17, so until 5.x is the majority I'll support what I can for now :)

Well 52% is the majority and it should in my opinion picks up pretty quickly with 5.3.

It's up to server admins to keep their server software up to date.

Well 52% is the majority and it should in my opinion picks up pretty quickly with 5.3. It's up to server admins to keep their server software up to date.
kay27 commented 7 months ago
Poster

Now I believe, it's because of Multicraft, the only client for iOS...

Now I believe, it's because of Multicraft, the only client for iOS...
Sign in to join this conversation.
No Label
No Milestone
No assignee
3 Participants
Loading...
Cancel
Save
There is no content yet.