gnustep / libs-base

The GNUstep Base Library is a library of general-purpose, non-graphical Objective C objects.
https://www.gnustep.org/
GNU General Public License v2.0
941 stars 283 forks source link

Please add base/Resources/Languages file for various languages in Switzerland locale #28

Open alexmyczko opened 6 years ago

alexmyczko commented 6 years ago

we don't have EUR, but CHF, and four languages Swiss German (no https://de.wikipedia.org/wiki/%C3%9F, but it's ss always in Switzerland German), Swiss French, and Swiss Italian (the fourth is minor).

What should it be called for Switzerland? The currency is the same for all four official languages. One file for Switzerland would make sense.

ivucica commented 6 years ago

A few things

  1. I believe 'other' platforms have switched over to calling their languages using ISO 639-1 for language, ISO 3166-1 for region. For instance, valid way to specify this is both en and en_US.
  2. Human-readable language name is deprecated on the non-GNUstep platform. GNUstep Base also includes a relevant readme which also seems to declare human-readable names deprecated, and recommends ISO 639-1 codes.
  3. There's a mapping in GNUstep: https://github.com/gnustep/libs-base/blob/master/Resources/Languages/Locale.aliases -- it lists, as expected, the preferred codes de_CH, fr_CH, it_CH and aliases SwitzerlandGerman, SwitzerlandFrench, SwitzerlandItalian. It does not list rm for Romansh, nor rm_CH for SwitzerlandRomansh.

Actions

So please either call them de_CH, fr_CH, it_CH and rm_CH, or SwitzerlandGerman, SwitzerlandFrench, SwitzerlandItalian and SwitzerlandRomansh.

Please patch Locale.aliases to include SwitzerlandRomash.

Please investigate whether NSLocale et al will apply German, French, Italian before loading the regional variant, and whether it should (this part depends on what other platforms do). It makes sense if it does. Otherwise, it's probably preferable to have a generator which uses common locale strings, and then patches them for a particular regional locale. (Having such a generator for -base sadly doesn't help other projects.)

Sidenotes

  1. 'Other' platform's Documentation mentions inserting script designator per ISO 15924 as well, for instance, zh-Hans_HK.
  2. I wonder if NSLocale will/should load German/de when SwitzerlandGerman/de_CH is requested. This would allow easier maintenance of locales. @rfm what do you think -- should the framework load de even if de_CH is requested, and then patch it with de?
  3. I am amused that general locale information (such as currency) is in the Languages directory, but I suppose other platforms do it the other way around, and treat language information as locale information.
  4. I was very confused when I saw this issue in my email inbox. I could not immediately tell why this was filed as a bug.

    1. It seemed neither a complaint/feature request, nor a pull request, nor a question, yet it seemed like it's all of those.
    2. The nonsequitur about ss character confused me greatly.
    3. I did not see an immediate call for action (which is, if I see correctly, "please assign names for the four missing locales"), which can be accompanied with the reasoning -- but it should be the first thing I see.

    I now understand what you were filing this for, but please prefer not to file consultation bugs -- mailing lists are great for consultation. Bug tracker is best used to track actionable items ("here's a missing feature!"), not questions ("how do I implement the missing feature?").