-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Missing translation in web app #730
Comments
I looked at this briefly, thinking it was going to be an easy fix, but it turns out that I think I may have messed up some of the i18n stuff, or at least I'm not understanding it well enough. I believe your locale is set as Long story short, it's not loading the correct language because |
Thanks for investigating the error. I also tried to understand what is happening, but I'm not sure I got it. ntfy/web/src/components/Account.js Line 393 in 04b7b42
The i18n.language seems to be incorrect here. As far as I understand, humanizeDuration expects the code of the translation file (in your case two-letter, e.g.) but i18n.language contains the detected code (de-DE ). That's in general/for i18next no problem, because it knows that it should fallback from de-DE to de, but as far as I can see, the humanize-duration module doesn't.
If I read the i18n documentation correct, than expiry: humanizeDuration(account.limits.attachment_expiry_duration * 1000, {
language: i18n.resolvedLanguage,
fallbacks: ["en"]
}) |
Oh maaaan, I should have read your comment first. Because you solved it the same way I eventually did, except that I did my own research when I didn't have to. Good thing we came to the same conclusion. Fixed in f998d4d Thanks for reporting, and for the solution! |
You're welcome... |
🐞 Describe the bug
In the web app, there's a part (Account -> Attachment storage -> subheading) which doesn't seem connected to the localization engine. I use the German UI, but the text is still English. Weblate says, that all texts (100%) are translated for German. Thus I assume, that the part isn't linked correctly with the "translation engine".
It is this text: https://hosted.weblate.org/translate/ntfy/web/de/?q=expiry&sort_by=-priority%2Cposition&checksum=
💻 Components impacted
💡 Screenshots and/or logs
🔮 Additional context
{expiry}
part isn't translated correctly.{expiry}
part is translated correctly.The text was updated successfully, but these errors were encountered: