Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#11068 closed (fixed)

Wrong language code for Norwegian (Bokmål)

Reported by: Nils Fredrik Gjerull Owned by: Jannis Leidel
Component: Internationalization Version: dev
Severity: Keywords: language_code norwegian
Cc: jon@… Triage Stage: Fixed on a branch
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

According to the The GNU gettext manual the language code for Norwegian bokmål have changed from 'no' to 'nb'. In Django the language code used is 'no'. This should be renamed to 'nb', if there is not a very good reason not to.

As a intermediate measure it is perhaps a good idea to set LANGUAGE_CODE = 'nb:no' in settings.py if you use Norwegian, then both language codes would be searched for translations. Perhaps this should be mentioned in the Internationalization documentation somewhere? Perhaps a section about language codes? I can make a documentation patch for it.

Change History (11)

comment:1 by Nils Fredrik Gjerull, 15 years ago

Version: 1.0SVN

comment:2 by Marc Garcia, 15 years ago

Cc: jon@… added
Owner: changed from nobody to Marc Garcia

I don't know much about Norwegian languages, but it looks like Norwegian (no) and Norwegian-Bokmal (nb) are different languages. So now, translations in django/conf/locale/no/LC_MESSAGES are for Norwegian-Bokmal, that is incorrect, right?

So the solution would be just renaming the directory from no to nb, so you'll have translations to Norwegian-Bokmal but not Norwegian. Is it ok?

I'm CC the last translator to Norwegian, to validate that there is a mistake on it.

comment:3 by Jon, 15 years ago

The reporter is correct. Norwegian (no) is commonly used when describing Norwegian-Bokmal (nb), as it is the main language used in Norway. The translation that is currently residing in Django is a Norwegian-Bokmal (nb) translation. The right thing to do would be to rename the current translation to nb.

comment:4 by Marc Garcia, 15 years ago

Resolution: fixed
Status: newclosed

(In [11402]) [soc2009/i18n] Fixed #11068. Norwegian Bokmal code fixed

comment:5 by Marc Garcia, 15 years ago

Resolution: fixed
Status: closedreopened
Triage Stage: UnreviewedFixed on a branch

comment:6 by Jannis Leidel, 14 years ago

Owner: changed from Marc Garcia to Jannis Leidel
Status: reopenednew

comment:7 by Jannis Leidel, 14 years ago

Status: newassigned

So what would be a sane way to handle this and maintain backwards compatibility?

comment:8 by Marc Garcia, 14 years ago

Probably, if we copy the translation to 'nb', without removing the one in 'no'.

That way, it would work ok when the language is set correctly, but it will go on working for projects that already has set the 'no' language.

Does it sound ok, or am I missing something?

comment:9 by Russell Keith-Magee, 14 years ago

milestone: 1.2

If the language code has changed, we should update our code. After discussing with jezdez on IRC, we will

  • copy no->nb
  • put a note in the no translation file that nb should be updated, not no
  • Modify django.utils.translation to raise a warning if the no translation is requested
  • Update the deprecation notes and release notes to indicate the change.

comment:10 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [13047]) Fixed #11068 - Introduced new language code "nb" for Norwegian Bokmål as a replacement of the current "no".

comment:11 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top