question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Numerals are not localized in some places (and use 0-9 arabic numerals by default)

See original GitHub issue

Observed behavior

Here are places on https://kolibri-beta.learningequality.org/mr that I was able to find (annotations are within the screenshots)

Version numbers on https://kolibri-beta.learningequality.org/mr/device/#/content

image

Number of learners in class on https://kolibri-beta.learningequality.org/mr/facility/#/a3f606630690237bbe94fe2a1a850af4/classes

image

KTextbox maxlength validations

image

Time elapsed messages on various Coach Pages https://kolibri-beta.learningequality.org/mr/coach/#/10c12cbfc4b67630511d67f7b7895f17/reports/quizzes/70a26038f8dddffcb93f05bcec8b2095/learners (same on lessons pages) image

Birth years on profile page and other places

image

Expected behavior

If appropriate, numerals should use the Intl API’s number formatter, so numbers in e.g. the Marathi (mr) locale use those numerals consistently and so on.

User-facing consequences

Errors and logs

Steps to reproduce

Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jonboisercommented, Apr 1, 2021

I think this might depend on the situation. I really think that if a number is just by itself in the template, we should be using the $formatNumber method instead of using $tr('integer', ...). Could you see if that approach works?

Here are the doc explaining how $formatNumber works. https://github.com/learningequality/vue-intl#instance-methods

It is like a wrapper around Intl.NumberFormat

1reaction
jonboisercommented, Mar 30, 2021

@Kalovelo , I just checked to see if the the Intl API for datetimes localized calendar dates for Marathi, and they do. So please include the User Profile pages that display birth year. I believe the component is BirthYearDisplayText.vue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do numbers need to be localized? - Stack Overflow
In Arabic, most countries use the Arabic-Indic numerals, but the Hindu-Arabic numerals are also understood. In any case, .NET localization ...
Read more >
How widespread is the use of arabic numerals in Japanese ...
I know that arabic numerals aren't the solution to representing number. I also know that Japanese and Chinese cultures are completely different; ...
Read more >
A Concise Guide to Number Localization | Phrase
The Western Arabic numeral system – which has the digit symbols 0 , 1 , 2 , 3 , 4 , 5 ,...
Read more >
Change Default Numeric Localization for a Culture (Arabic)?
I am doing some localization for Arabic. The default Unreal number generation for Arabic uses Eastern Arabic (Indian/indic) numerals.
Read more >
How to Localize Your Website or App for RTL Languages
Explore localization testing best practices for RTL languages to make your website or app more appealing for users from specific locations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found