The timezone selector in the sites manager is not localised but shows all city names in English.
When using Matomo in Italian, a user would expect the list to contain “Roma”, not “Rome”. And a user using Matomo in Russian would look for “Москва́”, not “Moscow”. Even an English user would expect “Dumont d’Urville” instead of “DumontDUrville” (for
CLDR contains translations of all city names. However, the CLDR spec suggests that timezone selectors should allow users to select the country name, not the city name. City names should only be shown for countries spanning multiple timezones. Of course, this is just a UI recommendation, not a requirement of any sort, but I think it makes sense.
You quite often see this long list of cities in timezone selectors in various software, and for a developer who is familiar with the tz database it may seem natural. I suspect that this UI is popular, because it is easy to construct the list based on the timezone identifiers alone. From and end-user point of view I think that a list of countries is the natural choice. For some countries it is not obvious which city is the one used in the tz database (the capital may not be the largest city), and for some regions the tz identifier is not a city name but the name of an island. Countries are well-defined and used in many contexts.
This PR implements a UI as suggested in the CLDR spec. It looks like this (excerpt):
The timezones are now grouped by the same continent definition as used elsewhere in Matomo, instead of the definition used in the tz database. This is more consistent from an end-user point of view.
Thanks for the review :)
The translation for UTC is now fetched from plugins/SitesManager/lang/en.json instead.