phetsims / babel

This repo contains the translated strings for PhET's simulations.
MIT License
4 stars 9 forks source link

Format for regional locales is inconsistent #25

Open jbphet opened 1 month ago

jbphet commented 1 month ago

In https://github.com/phetsims/weddell/issues/134, it was reported that the format of the regional locales is inconsistent. It's true - somethings a comma is used and sometimes parentheses are used. Here's a short excerpt of babel\localeData.json that illustrates this:

  "ar_LY": {
    "englishName": "Arabic (Libya)",
    "localizedName": "العربية (ليبيا)",
    "direction": "rtl",
    "fallbackLocales": [
      "ar",
      "ar_MA"
    ]
  },
  "ar_MA": {
    "locale3": "ary",
    "englishName": "Arabic, Morocco",
    "localizedName": "العربية (المغرب)",
    "direction": "rtl",
    "fallbackLocales": [
      "ar"
    ]
  },

I'm not sure how this came about. It may have been like this for years.

jbphet commented 1 month ago

In addition to affecting the desktop app, it also impacts the translation utility. Here's a screenshot from the "Select Local" dropdown menu:

image

jbphet commented 1 month ago

@mattpen and @jonathanolson, I'd like your input on the following question: The localizedName field seems to consistently use the format "locale (region)", whereas the englishName field does not - it sometimes uses the format "locale, region". Would you be okay if I just converted all the English names to match?

mattpen commented 1 month ago

I think it should all be "locale (region)" - yes that sounds great!

mattpen commented 1 month ago

Please assign @chrisklus and @mattpen when complete so we know to import this to the website.

jonathanolson commented 1 month ago

@solaolateju thoughts on this formatting for regional locales?

solaolateju commented 1 month ago

I agree with @mattpen. Parentheses are most commonly used - Locale(region). That is true with other popular websites.

image image