Skip to content

Comments

feat(i18n): add support for norwegian language#1104

Merged
danielroe merged 5 commits intonpmx-dev:mainfrom
bonsak:feat/add-norwegian-language-support
Feb 6, 2026
Merged

feat(i18n): add support for norwegian language#1104
danielroe merged 5 commits intonpmx-dev:mainfrom
bonsak:feat/add-norwegian-language-support

Conversation

@bonsak
Copy link
Contributor

@bonsak bonsak commented Feb 6, 2026

This PR adds support for Norwegian language

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 4:14pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 6, 2026 4:14pm
npmx-lunaria Ignored Ignored Feb 6, 2026 4:14pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

The 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)
Check name Status Explanation
Description check ✅ Passed The pull request description accurately describes the changeset, which adds Norwegian language support across multiple configuration and locale files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danielroe danielroe added this pull request to the merge queue Feb 6, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
config/i18n.ts (1)

325-329: Use nb-NO instead of no-NO for semantic precision.

The translations are in Bokmål, the standard written form of Norwegian. While no-NO is 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-NO is more semantically correct and signals to platforms and the Intl API 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.)

Comment on lines +584 to +596
"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...",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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...",

Merged via the queue into npmx-dev:main with commit 348b967 Feb 6, 2026
17 checks passed
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

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.

@bonsak bonsak deleted the feat/add-norwegian-language-support branch February 6, 2026 16:55
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