Bug 1670078

Summary: Incorrect classification of Norwegian keyboard layouts
Product: [Fedora] Fedora Reporter: David Sommerseth <dazo>
Component: langtableAssignee: Mike FABIAN <mfabian>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: anaconda-maint-list, dazo, i18n-bugs, jkonecny, jonathan, kellin, mfabian, vanmeeuwen+fedora, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
List of Norwegian keyboard layouts
none
Danish keyboard layouts none

Description David Sommerseth 2019-01-28 14:42:15 UTC
Norwegian is a confusing set of "languages", which can be more considered dialects - which all are official languages.  Which makes this a minefield, as referring to one of these "dialects" from one group may be considered offensive by the other group.  But there are no difference in the keyboard layouts.  These discussions regarding superiority between which language (dialect) is better or better suited has been going on since the early days and probably won't end this century.

So simplify the list of Norwegian keyboard layouts from:

   Norwegian Nynorsk; Nynorsk, Norwegian (Norwegian [....])

To just say:

   Norwegian [(....)]

(Similar to what you can see in Swedish and Danish)

But do NOT kick out "Northern Sami", as that is another (and very different) language used in the northern parts of Norway (and possibly Sweden, Finland and maybe smaller parts of Russia).  These two listings present looks sane.

Comment 1 Jiri Konecny 2019-01-29 14:28:18 UTC
This is taken from the langtable package. Switching components to this package.

Comment 2 Mike FABIAN 2019-01-30 09:23:11 UTC
(In reply to David Sommerseth from comment #0)
> Norwegian is a confusing set of "languages", which can be more considered
> dialects - which all are official languages.  Which makes this a minefield,
> as referring to one of these "dialects" from one group may be considered
> offensive by the other group.  But there are no difference in the keyboard
> layouts.  These discussions regarding superiority between which language
> (dialect) is better or better suited has been going on since the early days
> and probably won't end this century.
> 
> So simplify the list of Norwegian keyboard layouts from:
> 
>    Norwegian Nynorsk; Nynorsk, Norwegian (Norwegian [....])
> 
> To just say:
> 
>    Norwegian [(....)]
> 
> (Similar to what you can see in Swedish and Danish)
> 
> But do NOT kick out "Northern Sami", as that is another (and very different)
> language used in the northern parts of Norway (and possibly Sweden, Finland
> and maybe smaller parts of Russia).  These two listings present looks sane.

Where do you see that? Can you add a screenshot please?

Comment 3 David Sommerseth 2019-02-12 10:26:55 UTC
Created attachment 1533980 [details]
List of Norwegian keyboard layouts

Start a new F29 install image, in the "Localization" section, click "Keyboard".  In the next screen click "+" to add a new keyboard layout.  Search for "Norwegian".

Comment 4 David Sommerseth 2019-02-12 10:28:45 UTC
Created attachment 1533988 [details]
Danish keyboard layouts

Danish and Norwegian are pretty close in language and even the keyboard layouts have few differences.  But this is how the Norwegian one should somewhat look like.  Basically, just replace "Danish" with "Norwegian".

Comment 5 Mike FABIAN 2019-02-12 11:27:45 UTC
It looks to me that this does not come from langtable. Because:

    $ grep -B 4 "Norwegian Nynorsk; Nynorsk, Norwegian" /usr/share/xml/iso-codes/* 
    /usr/share/xml/iso-codes/iso_639-2.xml- <iso_639_entry
    /usr/share/xml/iso-codes/iso_639-2.xml-         iso_639_2B_code="nno"
    /usr/share/xml/iso-codes/iso_639-2.xml-         iso_639_2T_code="nno"
    /usr/share/xml/iso-codes/iso_639-2.xml-         iso_639_1_code="nn"
    /usr/share/xml/iso-codes/iso_639-2.xml:         name="Norwegian Nynorsk; Nynorsk, Norwegian" />
    --
    /usr/share/xml/iso-codes/iso_639.xml-   <iso_639_entry
    /usr/share/xml/iso-codes/iso_639.xml-           iso_639_2B_code="nno"
    /usr/share/xml/iso-codes/iso_639.xml-           iso_639_2T_code="nno"
    /usr/share/xml/iso-codes/iso_639.xml-           iso_639_1_code="nn"
    /usr/share/xml/iso-codes/iso_639.xml:           name="Norwegian Nynorsk; Nynorsk, Norwegian" />

I.e. the exact string "Norwegian Nynorsk; Nynorsk, Norwegian" which is seen in your screenshot
happens to be in /usr/share/xml/iso-codes/iso_639.xml.

But I cannot find that string in the langtable data. langtable does
have "Norwegian Nynorsk" as the English name for the language id “nn”:

  <language>
    <languageId>nn</languageId>
    <iso639-1>nn</iso639-1>
    <iso639-2-t>nno</iso639-2-t>
    <iso639-2-b>nno</iso639-2-b>
    <names>
      ...
      <name><languageId>en</languageId><trName>Norwegian Nynorsk</trName></name>

Comment 6 Mike FABIAN 2019-02-12 11:46:01 UTC
/usr/share/X11/xkb/rules/base.xml contains for Norway:


    <layout>
      <configItem>
        <name>no</name>
        
        <shortDescription>no</shortDescription>
        <description>Norwegian</description>
        <languageList>
          <iso639Id>nor</iso639Id>
          <iso639Id>nob</iso639Id>
          <iso639Id>nno</iso639Id>
        </languageList>
      </configItem>
      <variantList>
        <variant>
          <configItem>
            <name>nodeadkeys</name>
            <description>Norwegian (no dead keys)</description>
          </configItem>
          ...

And for Denmark:

    <layout>
      <configItem>
        <name>dk</name>
        
        <shortDescription>da</shortDescription>
        <description>Danish</description>
        <languageList>
          <iso639Id>dan</iso639Id>
        </languageList>
      </configItem>
      <variantList>
        <variant>
          <configItem>
            <name>nodeadkeys</name>
            <description>Danish (no dead keys)</description>
          </configItem>
          ...

And /usr/share/xml/iso-codes/iso_639.xml has for "dan":

       <iso_639_entry
                iso_639_2B_code="dan"
                iso_639_2T_code="dan"
                iso_639_1_code="da"
                name="Danish" />

So it looks to me that "nno" is used to lookup that name in case
of Norway and "dan" is used for Denmark. And the name is looked up
in And /usr/share/xml/iso-codes/iso_639.xml.

Comment 7 Jens Petersen 2019-09-10 06:32:35 UTC
Do the keyboard strings come from xkeyboard-config?

Comment 8 David Sommerseth 2019-09-10 13:03:05 UTC
(In reply to Mike FABIAN from comment #6)
> /usr/share/X11/xkb/rules/base.xml contains for Norway:
> 
> 
>     <layout>
>       <configItem>
>         <name>no</name>
>         
>         <shortDescription>no</shortDescription>
>         <description>Norwegian</description>
>         <languageList>
>           <iso639Id>nor</iso639Id>
>           <iso639Id>nob</iso639Id>
>           <iso639Id>nno</iso639Id>
>         </languageList>
>       </configItem>
[...snip...]
> So it looks to me that "nno" is used to lookup that name in case
> of Norway and "dan" is used for Denmark. And the name is looked up
> in And /usr/share/xml/iso-codes/iso_639.xml.

You seem to be unto something here.  As the Norwegian layout is defined with both "Norwegian" (nor), "Norwegian, Bokmål" (nob) and "Norwegian, Nynorsk" (nno) - where only the 'nno' is the one being picked up.  Only the 'nor' alternative should be used.

But Danish is "simpler", that it only has a single <iso639Id/> entry, while Norwegian currently have 3 entries listed.  Does all these three really need to be listed here?  As I said in comment #0, the Norwegian Bokmål and Norwegian Nynorsk are 100% identical in regards to keyboard layout; the main difference is how (quite) some words are spelled and/or pronounced - otherwise the rest of the language characteristics are basically identical - and both are considered a "Norwegian" language.  Unless I've misunderstood something, /usr/share/X11/xkb/rules/base.xml is used for keyboard configuration - so removing the 'nob' and 'nno' entries shouldn't cause any harm.

Comment 9 Ben Cotton 2020-02-11 15:48:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 10 Mike FABIAN 2021-01-12 07:12:09 UTC
Unchanged in f33