Repository navigation
chore: add more translations to dynamic checkout - #280
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A critical IE8 compatibility issue and a moderate extended-locale fallback issue remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds 19 Dynamic Checkout translations, locale aliases, fallback handling, RTL support, tests, and a package version bump.
Changes:
- Registers new locale dictionaries and bundle references.
- Expands locale resolution and translation coverage.
- Adds locale-focused tests.
- Review findings remain for IE8 compatibility and extended locale fallback.
File summaries
| File | Description |
|---|---|
test/support/loadNamespace.ts |
Expands test locale metadata. |
test/dynamic-checkout/translations.test.ts |
Tests locale registration and resolution. |
test/dynamic-checkout/tokenize-only.test.ts |
Tests behavior across locale tags. |
src/dynamic-checkout/utils/translations.ts |
Adds mappings, aliases, fallback, and RTL handling. |
src/dynamic-checkout/references.ts |
Registers locale sources. |
src/dynamic-checkout/locales/zh-tw.ts |
Traditional Chinese translations. |
src/dynamic-checkout/locales/zh-cn.ts |
Simplified Chinese translations. |
src/dynamic-checkout/locales/uk.ts |
Ukrainian translations. |
src/dynamic-checkout/locales/tr.ts |
Turkish translations. |
src/dynamic-checkout/locales/th.ts |
Thai translations. |
src/dynamic-checkout/locales/te.ts |
Telugu translations. |
src/dynamic-checkout/locales/sv.ts |
Swedish translations. |
src/dynamic-checkout/locales/ru.ts |
Russian translations. |
src/dynamic-checkout/locales/ro.ts |
Romanian translations. |
src/dynamic-checkout/locales/nl.ts |
Dutch translations. |
src/dynamic-checkout/locales/kn.ts |
Kannada translations. |
src/dynamic-checkout/locales/id.ts |
Indonesian translations. |
src/dynamic-checkout/locales/hi.ts |
Hindi translations. |
src/dynamic-checkout/locales/he.ts |
Hebrew translations. |
src/dynamic-checkout/locales/el.ts |
Greek translations. |
src/dynamic-checkout/locales/da.ts |
Danish translations. |
src/dynamic-checkout/locales/cs.ts |
Czech translations. |
src/dynamic-checkout/locales/bn.ts |
Bengali translations. |
src/dynamic-checkout/locales/bg.ts |
Bulgarian translations. |
package.json |
Bumps the project version. |
Review details
- Files reviewed: 25/25 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tomasz-pazdziurek-cko
approved these changes
Sep 23, 2026
jakubjasinsky
force-pushed
the
jakub-dynamic-checkout-locales
branch
from
September 23, 2026 14:02
ef97377 to
daa9e7f
Compare
szymon-mysiak-cko
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 19 more Dynamic Checkout locales and replaces the bare language-code lookup with a resolver that understands regional variants and legacy tags, so
zh-TWandzh-CNstop collapsing into a single "zh" bucket.Changes
Translations.resolveLocalereplacesgetLanguageCode: tries the full normalized tag first, then the bare language, then falls back toen. Handles_separators and mixed case.in→id,iw→he, and thezh/zh-Hans/zh-Hant/zh-HK/zh-SG/zh-MOfamily →zh-cn/zh-tw.headded to RTL locales.Impact
Translations.getLanguageCodeis removed. It was only used internally, but any consumer reaching into theProcessOutnamespace for it will break.zh-TWnow get Traditional Chinese instead of English. Any other previously unsupported tag now resolves to its new locale rather than falling back to English.