feat(i18n): add support for norwegian language#1104
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThe changes add Norwegian (no-NO) language support to the application. A new locale configuration entry is added to config/i18n.ts with the Norwegian locale identifier and corresponding translation file reference. Two comprehensive Norwegian translation files are created: one at i18n/locales/no-NO.json and another at lunaria/files/no-NO.json. These files contain translated UI strings across multiple sections including navigation, settings, authentication, search, and various application features, with support for pluralization variants and placeholder substitutions. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
config/i18n.ts (1)
325-329: Usenb-NOinstead ofno-NOfor semantic precision.The translations are in Bokmål, the standard written form of Norwegian. While
no-NOis valid in BCP 47, it represents unspecified Norwegian (a parent locale for both Bokmål and Nynorsk). Since the content targets Bokmål specifically,nb-NOis more semantically correct and signals to platforms and theIntlAPI that this is Bokmål-specific content, which can improve localisation consistency for dates, numbers, and other locale-aware formatting.Proposed change
{ - code: 'no-NO', - file: 'no-NO.json', + code: 'nb-NO', + file: 'nb-NO.json', name: 'Norsk', },(The JSON files would also need renaming to
nb-NO.json.)
| "toggle_tree": "Veksle filtre", | ||
| "close_tree": "Lukk filtre", | ||
| "copy_link": "Kopier lenke", | ||
| "raw": "Rå", | ||
| "view_raw": "Vis råfil", | ||
| "file_too_large": "Filen er for stor til å forhåndsvises", | ||
| "file_size_warning": "{size} overstiger grensen på 500KB for syntaksmarkering", | ||
| "load_anyway": "Last likevel", | ||
| "failed_to_load": "Kunne ikke laste fil", | ||
| "unavailable_hint": "Filen kan være for stor eller utilgjengelig", | ||
| "version_required": "Versjon er påkrevd for å bla i koden", | ||
| "go_to_package": "Gå til pakke", | ||
| "loading_tree": "Laster filtre...", |
There was a problem hiding this comment.
Ambiguous translation: "filtre" reads as "filters" rather than "file tree".
The keys toggle_tree, close_tree, and loading_tree refer to the file tree panel in the code browser, but "filtre" in Norwegian is universally understood as "filters" (plural of "filter"). While "fil" + "tre" can compound to "filtre", this will mislead users.
Consider using the definite form "filtreet" (the file tree) or a clearer phrase:
Proposed fix
- "toggle_tree": "Veksle filtre",
- "close_tree": "Lukk filtre",
+ "toggle_tree": "Veksle filtreet",
+ "close_tree": "Lukk filtreet",
"copy_link": "Kopier lenke",
"raw": "Rå",
"view_raw": "Vis råfil",
"file_too_large": "Filen er for stor til å forhåndsvises",
"file_size_warning": "{size} overstiger grensen på 500KB for syntaksmarkering",
"load_anyway": "Last likevel",
"failed_to_load": "Kunne ikke laste fil",
"unavailable_hint": "Filen kan være for stor eller utilgjengelig",
"version_required": "Versjon er påkrevd for å bla i koden",
"go_to_package": "Gå til pakke",
- "loading_tree": "Laster filtre...",
+ "loading_tree": "Laster filtreet...",|
Thanks for your first contribution, @bonsak! 🎉 We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role. |
This PR adds support for Norwegian language