`Intl.RelativeTimeFormat` is not displaying correctly for Crowdin server's special `ach-ug` locale
See original GitHub issueObserved behavior
After following up on the conversation in Slack, I see that the string that uses the standard Intl.RelativeTimeFormat
is not displaying correctly in German:
switch to ‘German’ to see this on the in-context server
Expected behavior
Fully translated string.
User-facing consequences
Inability to understand.
Errors and logs
…
Steps to reproduce
#. Go to in-context server #. Switch language to ‘German’ #. Go to Facility > Data
Context
- Kolibri version: 0.14.0b12
- Operating system: all
- Browser: all
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Intl.RelativeTimeFormat does not correctly reflect the spec
Expected behavior: Actual behavior: Reading through the lib2020.intl.d.ts I noticed a couple of issues in the declarations: Locale should not be ...
Read more >Intl.RelativeTimeFormat - JavaScript - MDN Web Docs - Mozilla
Returns an Array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. Intl.RelativeTimeFormat.
Read more >In-Context Localization Tool | Crowdin Blog
We allow to upload screenshots to show where the text segment is being used in real product, comment segments, create glossary to highlight...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jonboiser I think the best way to do what you describe would be to add special detection logic here: https://github.com/learningequality/kolibri/blob/develop/kolibri/core/assets/src/utils/i18n.js#L183 for the
ach-ug
language code.If we detect that, we should then update
currentLanguage
tolocalStorage.jipt_language_code_kolibri
and updatelanguageDirection
accordingly too.By making that shift, it should register all the ach-ug messages as messages for that language instead, and then Kolibri and vue-intl should work seamlessly under the impression that it’s using that language, but using the in context translation messages.
This works, but running things locally, I notice a lot of messages are not localized. But this was before I made any changes!