Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-9169

Inconsistent locale identifiers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2020-04-13
    • Component/s: Editing interface
    • Labels:
      None

      Description

      Since DateTime::Locale was updated in connection with the NewHost move, it produces locale identifiers using a hyphen to separate parts instead of the previous underscore. (E.g., Switzerland German now uses de-CH instead of de_CH.) This causes a number of problems:

      • Different spellings of the same locale appear in the database, confusing our code as well as potentially data users.
      • Locales with multiple parts are no longer identified correctly for indentation purposes. (MBS-9168)
      • The language selector didn’t show the names for multi-part locales. (MBS-9140)
      • When trying to edit an alias with a multi-part locale, an empty locale is shown instead of the existing one. This may lead to editors inadvertently removing a locale; if the alias happens to be primary for the locale, editing fails (because an alias with an apparently empty locale can’t be primary).

      We need to make this consistent again, using either hyphen or underscore everywhere. For the following reasons, I think we should revert to the underscore:

      • It is what we used before, so this requires minimal changes for us and none for data users.
      • While both forms are valid for CLDR/Unicode locale identifiers, the underscore is apparently preferred.
      • It helps to avoid confusion with BCP-47 tags, which are similar but not identical, and which use the hyphen exclusively.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bitmap Michael Wiencek
              Reporter:
              chirlu Ulrich Klauer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  2020-04-13