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

[mr-right] Fix issue related to Marathi Language in getDecimalSeparator #2255

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

SonicScrewdriver
Copy link
Contributor

@SonicScrewdriver SonicScrewdriver commented Feb 19, 2025

Summary:

Marathi returns non-Arabic digits when using Intl.NumberFormat(locale), which was resulting in our keypad typing the wrong character.

This has been fixed by adding the Devanagari digit to the match logic. I've run a local test with all of our supported languages to ensure no other languages are facing a similar issue.

I have also added some new tests for this function to help cover the main edge cases. I could be persuaded to add a list of the supported locales and expected outcomes, but that seemed like overkill and something that would be hard to keep "up to date" should the upstream standard change, or KA add more languages.

Issue: LEMS-2878

Test plan:

  • Tests Pass
  • New Tests
  • Manual Testing

Marathi returns non-Arabic digits when using `Intl.NumberFormat(locale)`, which was resulting in our keypad typing the wrong character.
This has been fixed by adding the Devangari digit to the logic. I've run a local test with our supported languages to ensure no other languages are facing a similar issue.

I have also added some new tests for this function to help cover the main edge cases. I could be persuaded to add a list of the supported locales and expected outcomes, but that seemed like overkill and something that would be hard to keep "up to date" should the upstream standard change, or KA add more languages.

Issue: LEMS-2878

Test plan:
- Tests Pass
- New Tests
- Manual Testing
@SonicScrewdriver SonicScrewdriver self-assigned this Feb 19, 2025
Copy link
Contributor

github-actions bot commented Feb 19, 2025

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (ce56aaa) and published it to npm. You
can install it using the tag PR2255.

Example:

yarn add @khanacademy/perseus@PR2255

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR2255

Copy link
Contributor

github-actions bot commented Feb 19, 2025

Size Change: +48 B (0%)

Total Size: 1.47 MB

Filename Size Change
packages/perseus-core/dist/es/index.js 48.3 kB +48 B (+0.1%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 86.9 kB
packages/math-input/dist/es/index.js 77.7 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-editor/dist/es/index.js 689 kB
packages/perseus-linter/dist/es/index.js 22.1 kB
packages/perseus-score/dist/es/index.js 115 kB
packages/perseus/dist/es/index.js 367 kB
packages/perseus/dist/es/strings.js 6.57 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

@SonicScrewdriver SonicScrewdriver merged commit b711541 into main Feb 24, 2025
8 checks passed
@SonicScrewdriver SonicScrewdriver deleted the mr-right branch February 24, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants