Skip to content

Norwegian code (no) translations are missing #53036

Closed

Description

@mehmetf

Internal: b/150470184

There are no _no files here https://github.com/flutter/flutter/tree/master/packages/flutter_localizations/lib/src/l10n. It seems like we are not generating strings for Norwegian. 'no' is the Google-canonical language code for Norwegian.

Activity

  1. Hixie commented on Mar 24, 2020

    @Hixie
    Contributor

    We support Bokmål as the standard code nb. We don't support Nynorsk (nn).
    Are you asking for Nynorsk translations? Or?
    There's not really a language code no.

  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Mar 24, 2020
  3. mehmetf commented on Mar 25, 2020

    @mehmetf
    ContributorAuthor

    It would be Bokmål. I think the keyword here was "Google-canonical". When Google says no, they mean nb.

    Would you be comfortable having Flutter localization delegates to use this alternative code as well and map it to nb or do you prefer this to be google3 specific?

  4. HansMuller commented on Mar 25, 2020

    @HansMuller
    Contributor

    The deprecated Android/Java locales are modernized test, in packages/flutter_localizations/test/override_test.dart, verifies that we map some obsolete locale names to their modern equivalents, but it doesn't cover no (which we supported a few years ago - #17788). It looks like no isn't a "Google-canonical" issue, it's another Java issue - http://www.localeplanet.com/java/no-NO/index.html. So perhaps we should automatically convert no to nb.

  5. HansMuller commented on Mar 25, 2020

    @HansMuller
    Contributor
  6. self-assigned this
    on Mar 26, 2020
  7. HansMuller commented on Mar 30, 2020

    @HansMuller
    Contributor

    It looks like we've been incorrectly leaving out the 'no' (Norsk) locale, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

    Even though Google's translations for 'nb' and 'no' are typically identical, it should be a supported locale per https://api.flutter.dev/flutter/flutter_localizations/GlobalMaterialLocalizations-class.html

  8. shihaohong commented on Mar 30, 2020

    @shihaohong
    Contributor

    Based on my current understanding, nb, no, and nn are distinct locales according to ISO 639. It seems like the original transition from no to nb was necessary because Android devices use recognize nb and not no.

    However, as @HansMuller has pointed out, Google's translations for nb and no are essentially identical.

    We could solve this problem by adding logic to generate nb localization delegates off of _no.arb when _nb.arb is not present. This would allow us to handle nb for Android devices, as well as correctly pulling down the _no.arb files without having to do the manual change from _no.arb to _nb.arb.

  9. Hixie commented on Mar 31, 2020

    @Hixie
    Contributor

    I don't have a strong opinion here. If we want to support no and nb as synonyms that works for me.

  10. shihaohong commented on Apr 2, 2020

    @shihaohong
    Contributor

    I'm going to share some relevant context from discussing with the i18n experts:

    For Android `no` is never used.
    
    Before Android N there was no way for a user to select `nn`, only `nb`
    Starting with Android N one can select `nb` and / or `nn`.
    
    There are no fallbacks or aliases, they behave as different languages 
    (but no can never be selected in user settings)
    ...
    In general no is not recommended, as it is ambiguous.
    IANA lists it as a macrolanguage, with nb and nn as "members"
    
    If one has to do a "naive" mapping then it might map no == nb
    A better mapping might interpret no as "some kind of Norwegian", so it might 
    match both (giving priority to nb if both exist)
    LanguageMatcher is does "the better mapping", but it is not used in Android.
    
    So in theory no could be used to indicate Norwegian in any form, eg. spoken or 
    written as nb or written as nn.
    
    In practice Bokmål is the preferred written form for 90% of the population of 
    Norway, so for a lot of people and for a lot of software the language codes no 
    and nb are simply taken to mean exactly the same thing.
    

    My intention is to have no and nb be synonyms for now, since Android only recognizes nb vs nn.

  11. lock commented on Apr 18, 2020

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked and limited conversation to collaborators on Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: internationalizationSupporting other languages or locales. (aka i18n)customer: dream (g3)frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions