-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Update Norwegian a18n Translation #22194
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I'm going to try the fallback setting locally and confirm it works. I think that an automated test for the behavior would also be good. See https://github.com/TryGhost/Ghost/blob/main/ghost/i18n/test/i18n.test.js for the right place to put the test and some examples. It'd be good to see that 'no' results in the nb text in a test. |
I've manually confirmed that the fallback works in portal, search, comments, newsletter, and magic link! Huzzah! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment. Looks good to me.
This PR addresses 3 issues:
no
is not the correct ISO language code for Norwegian Bokmål. At best,no
is an alias fornb
(Norsk Bokmål). I introduced thenb-NO
folder for Norsk Bokmål as it is more correct, and matches closer with what i18n calls the language.Why does this matter?
no
as the same asnb
is actually an accidental political statement. Its basically saying thatNorwegian written Language
==Norwegian Bokmål
. Which is not true.Norwegian Bokmål
andNorwegian Nynorsk
are just as valid under norwegian law.nn
andnb
are equally valid.no
asnb
.Removed special cases for norwegian i18next/i18next#870
https://github.com/i18next/i18next/blob/e3d66d0eade4d1e47afd545339664ae3a5fd09eb/CHANGELOG.md?plain=1#L1613
This PR is marked as a draft since I need to test against regressions, and make sure the
fallbackLng
change actually works as intended.Got some code for us? Awesome 🎊!
Please include a description of your change & check your PR against this list, thanks!
yarn test:all
andyarn lint
)