Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Italian locale file (filename.it.tr) not being loaded #8809

Closed
ghost opened this issue Aug 16, 2019 · 12 comments
Closed

Italian locale file (filename.it.tr) not being loaded #8809

ghost opened this issue Aug 16, 2019 · 12 comments
Labels
Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible

Comments

@ghost
Copy link

ghost commented Aug 16, 2019

Minetest version
5.0.1
OS / Hardware

Operating system: Debian 9
CPU: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (1,60GHz)

Summary

The engine does not use Italian (filename.it.tr) files, while using other languages' files.

Steps to reproduce

1 - update the italian locale file(s) from Weblate - .po .mo
2 - download the Locale Tester [Minetest forum link]
3 - check the tester's output
4 - revert to the old locale file (the one currently bundled with MT)
5 - check the tester's output

Forum's thread: [link]

Screenshot:
i18n_bug

@ghost ghost added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Aug 16, 2019
@SmallJoker
Copy link
Member

SmallJoker commented Aug 16, 2019

The magic translation string is correct in 5.1-dev. Are you sure your translation files are up to date?

#: src/network/clientpackethandler.cpp
msgid "LANG_CODE"
msgstr "it"

@ghost
Copy link
Author

ghost commented Aug 16, 2019

The magic translation string is correct in 5.1-dev. Are you sure your translation files are up to date?

I am using v5.0.1
I have created the translation file today.

std::string lang = gettext("LANG_CODE");

@SmallJoker
Copy link
Member

Works in 5.1-dev.

grafik

grafik

Try this locale file:
minetest.mo.zip

@ghost
Copy link
Author

ghost commented Aug 17, 2019

Works in 5.1-dev.
Try this locale file:
minetest.mo.zip

I've tried your locale file, it changed the Minetest engines' locale, but the mod locale still does not work.

@SmallJoker
Copy link
Member

Does the issue persist on 5.1-dev for you? I don't think there was a change in that code but it's worth a try.

@ghost
Copy link
Author

ghost commented Aug 17, 2019

Does the issue persist on 5.1-dev for you? I don't think there was a change in that code but it's worth a try.

I've just compiled it, the issue persists.
If I set language = de, it works correctly; if I set language = it, it uses the English description.

@SmallJoker
Copy link
Member

SmallJoker commented Aug 17, 2019

Is any other language affected? This seems to be your main language, so those translations should also load if language is not specified in minetest.conf.
What happens if you remove setting line from your configuration? Try to narrow down the issue as close as possible. How about translations of other mods? Using vanilla MTG and one translated mod?

@ghost
Copy link
Author

ghost commented Aug 17, 2019

Is any other language affected? This seems to be your main language, so those translations should also load if language is not specified in minetest.conf.

If I do not specify "language" in "minetest.conf" the engine's GUI is in Italian.
I haven't checked other languages, but I will do.

What happens if you remove setting line from your configuration? Try to narrow down the issue as close as possible. How about translations of other mods? Using vanilla MTG and one translated mod?

I will test using MT v5.0.1, MTG v5.0.1 (on Windows, for being double sure that it's not due to some Linux glitch) and a single mod; i.e. a mod adding a node that when punched sends a string to the player.
I will let you know, and I will attach the test mod's zip.

Thank you for your time and help so far. :)

@ghost
Copy link
Author

ghost commented Aug 17, 2019

Try to narrow down the issue as close as possible. How about translations of other mods? Using vanilla MTG and one translated mod?

I have created a tester, MT v5.0.1 and MTG v5.0.1 are working as expected.
The tester is available here: [link]

Thank you again. :)

@ghost
Copy link
Author

ghost commented Aug 18, 2019

Eventually I have discovered the reason of the issue, it is due to Weblate's updated italian files.
If you use the MT's bundled locale the tester will work as expected.
But if you use Weblate's .po or .mo the locale will fall back to English.

I've tested this with a clean MT v5.0.1 and MTG v5.0.1 installation;
old locale file = test passed;
new locale file = test failed;
rollback to the old locale file = test passed;

Could you try if this is happens to you as well, so that I can be sure that it is not my computer hating me?

@SmallJoker
Copy link
Member

But if you use Weblate's .po or .mo the locale will fall back to English.

No wonder if the language code isn't right. Fix the translations.

#: src/network/clientpackethandler.cpp
msgid "LANG_CODE"
msgstr "LANG_CODE"

@ghost
Copy link
Author

ghost commented Aug 18, 2019

No wonder if the language code isn't right. Fix the translations.

#: src/network/clientpackethandler.cpp
msgid "LANG_CODE"
msgstr "LANG_CODE"

Ah! Now I got what you meant here #8809 (comment), I thought that you were talking about the C++ source code, not about the locale file.

That string wasn't being shown in POEdit, I've fixed it using the notepad.
Hopefully now it's all ok, thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible
Projects
None yet
Development

No branches or pull requests

1 participant