-
Notifications
You must be signed in to change notification settings - Fork 68
Display most representative country in timezone selector #946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d8f89bb to
be47222
Compare
be47222 to
0da4a48
Compare
0da4a48 to
17d00fc
Compare
17d00fc to
ad42b0f
Compare
imobachgs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code LGTM. But, please, update the changes files.
|
Maybe it is a matter of taste, but using one more column makes the selector to look a bit crowded. What about showing all parts in the first column and country in the second? Timezones without country would have an empty second column, but that cases are only some exceptions. |
I have no strong preference. So let's see. This is how it looks now in this PR (keeping what existed and just adding a column for the country): And this is how it would look what you suggest (merge the parts in to the first column and use the second for the country): @dgdavid, @imobachgs, @joseivanlopez What do you prefer? |
I would choose the second option as it is more clear to me: the localized name of the timezone and the country. If I see more columns, I need to somehow think what they are all about. Having said that, I do not see the reason to use a hyphen to separate the components, but let's keep that for a different discussion. |
Good argument. Let's go for the second option then. I just added a commit to change that (although I don't think I will update the screenshots in the description). |






Problems
Problem 1.
In the timezone selector the countries are only displayed if they are part of the name of the timezone (eg. America/Argentina/Buenos_Aires). In most cases, the name of the timezone includes only the global region and a concrete city (eg. Europe/Madrid). That makes hard to find the right timezone since the most intuitive mechanism (typing the name of the user country in the search box) is usually useless.
Problem 2.
There are some duplicated or controversial timezones that are not associated to any country. For more details this gist.
Solution
Add the "most representative country" to each timezone and display that in the UI. That information is read from the file
/usr/share/zoneinfo/zone.tab.That makes it easier to find timezones.
Timezones without a country (except those that really make sense) are filtered out. That removes controversy and duplicates.
Works even for the two timezones that have a different identifier at langtable and at
zone.tab. Again, see the previously mentioned gist.Testing