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

🌐 Added and corrected strings in the Norwegian i18n locale files. #21904

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

knutid
Copy link

@knutid knutid commented Dec 17, 2024

no issue

  • added missing strings
  • corrected one string

no issue
- added missing strings
- corrected one string
knutid and others added 3 commits December 20, 2024 00:08
… IANA.

`no` is a macrolanguage that encompasses the following more specific
primary language subtags:
* `nb` - norwegian bokmål
* `nn` - norwegian nynorsk

If it doesn't break legacy usage for an application, you should use one
of these more specific language subtags instead. The node.js versions
Ghost supports align with using the more specific language subtags.

As the text in the no locale folder is in Norwegian bokmål, the folder
has been renamed to nb.

Ref.:
* [r12a - apps - BCP47 language subtag lookup](https://r12a.github.io/app-subtags/)
* [IANA - Language Subtag Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
* [W3C - Language tags in HTML and XML](htps://www.w3.org/International/questions/qa-choosing-language-tags)
@knutid knutid changed the title 🌐 Added and corrected strings in the Norwegian (no) i18n locale files. 🌐 Added and corrected strings in the Norwegian i18n locale files. Dec 20, 2024
Copy link
Contributor

@cathysarisky cathysarisky left a comment

Choose a reason for hiding this comment

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

Really important context missing from your PR main message and buried in a comment (95e98fc) : You're changing the locale code from no to nb.

The proposed change is going to break translations for all sites that currently use the 'no' locale.

Additionally, if the change is going to be made, the supported_locales variable of i18n.js must be updated also. (Otherwise it won't work for EITHER locale code.)

It sounds like a switch to 'nb' is the right thing to do, but it needs to be done with more care than the current PR. sym-linking might be appropriate, but I'm not sure if the current build step for translation files can actually handle it.

@cmraible
Copy link
Collaborator

@cathysarisky nice catch! I haven't tried this so we'd need to test, but it looks like i18next supports a fallbackLng parameter which we might be able to use here. If I'm reading the docs right, basically we'd set nb as the fallback for no, then remove no.

@cathysarisky
Copy link
Contributor

Hey @xqus , would you like to review these proposed translations?

Copy link
Contributor

@xqus xqus left a comment

Choose a reason for hiding this comment

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

Translations looks good. 👍
One minor comment, but the original suggestion also works.

"Neurosurgeon": "Neurokirurg",
"Once deleted, this comment can’t be recovered.": "",
"Neurosurgeon": "Nevrokirurg",
"Once deleted, this comment can’t be recovered.": "Når slettet, kan ikke kommentaren gjenopprettes.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe change to: Når denne kommentaren er slettet kan den ikke gjennopprettes..
This is a more natural way to say it in Norwegian.

@cathysarisky
Copy link
Contributor

There are two things going on here. One: Fixes to language. Those will be mergeable fairly quickly. Two: The change to locale. That's going to require someone to work through making fallback strings work so that we don't break anything for existing users. (Alternative: write a database migration that switches anyone set to 'no' to 'nb' ?) I'm not going to get a chance to do that for a while -- overbooked with paying work. @knutid, if adding that is within your skill set, please have at it! Otherwise, you're waiting for someone to pick it up and figure it out. So... it might be best to split the locale change out from the translation adjustments. That'll get the translation adjustments in sooner, and decouples the issue of what the locale name is from the changes wanted in it.

@knutid
Copy link
Author

knutid commented Feb 3, 2025

My javascript-foo is totally missing. So, I'll look into splitting, @cathysarisky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants