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

Translation problems: Languages like "de-de" fail: /locales/de-de.json "Language not available" #3404

Closed
Wikinaut opened this issue May 24, 2018 · 10 comments
Labels
i18n stale code wontfix Wont Fix these things, no hate.

Comments

@Wikinaut
Copy link
Contributor

I noticed a problem where the existing translation files like /src/locales/de-de.json cannot be loaded, you can test this by accessing

https://your-pad-server/locales/de-de.json

which fails with message

Language not available

As an ad-hoc fix, I changed the test in
https://github.com/ether/etherpad-lite/blob/develop/src/node/hooks/i18n.js#L33

from

 if ((ext == '.json') && languages.isValid(locale)) {

to

 if (ext == '.json') {

CC: @marcelklehr

@marcelklehr
Copy link
Contributor

Hey there!
apparently the module used for providing language info is outdated (last update 5 years ago, heh).
I recommend adding some of the code to etherpad directly: https://github.com/joker-x/languages4translatewiki/ (It simply fetches the data from the translatewiki API)

@Wikinaut
Copy link
Contributor Author

Wikinaut commented May 24, 2018

@marcelklehr I just "digged" into the code, and resumed my work with Etherpad (especially, my plan is to fix and improve the ep-email-notification plugin). Perhaps you can work (together with me, if I can help) to fix the i10n issue/s ? Would be great. The hooks/i18n.js btw looks very ugly and old.

@marcelklehr
Copy link
Contributor

As suggested in #3263 I recommend replacing languages4translatewiki with https://github.com/wikimedia/language-data which is already maintained. I won't work on this myself, however.

@SimJoSt
Copy link

SimJoSt commented Aug 19, 2018

Funnily enough, only the translations of the font names rely on the browser language. They are missing when running into this error, everything else is in the settings.json defined language.
Unifying that, would probably also be a good idea :-)

I always assumed the browser language takes precedence, but if it fails, the default language is chosen.

@anoymouserver
Copy link
Contributor

In my opinion the l10n handler should fallback to a default language (probably english) if a translation for a specific property doesn't exist. Currently the text seems to be empty in the ui.

For example in german most of the font names are missing in the de.json. ("pad.settings.fontType")
However, I think it is unnecessary to copy such strings into every language, because they are always the same.

@muxator
Copy link
Contributor

muxator commented Oct 6, 2018

Hi, I think this and #3263 are important, but I really do not have the time to dig into it. Any volunteer?

@SimJoSt
Copy link

SimJoSt commented Feb 20, 2020

I would if I could, but I am missing the technical skill.

@JohnMcLear JohnMcLear self-assigned this Mar 31, 2020
@JohnMcLear
Copy link
Member

@Wikinaut just so I can replicate this; what's the actual problem? If I visit Etherpad using a German locale set on my browser (IE navigator.language === "de.de") then German translations will not be visible??

I feel like I'm being kinda dumb, I get the technical issue but I don't see how it's practically affecting users. Thanks!

@Wikinaut
Copy link
Contributor Author

Wikinaut commented Apr 2, 2020

Hi @JohnMcLear , long time, no see! Nice that you are back!!

Give me some time, I am still along and working with Etherpad, give me some time to upgrade my running instance/s and to look, if the problem is still present.

I will come back and report here.

@stale
Copy link

stale bot commented Jun 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Wont Fix these things, no hate. label Jun 11, 2020
@stale stale bot closed this as completed Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n stale code wontfix Wont Fix these things, no hate.
Projects
None yet
Development

No branches or pull requests

6 participants