-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display most representative country in timezone selector (#946)
## 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. ![spain-old](https://github.com/openSUSE/agama/assets/3638289/e51c9eac-09ec-471e-af75-e03b4ba5a0e2) Problem 2. There are some duplicated or controversial timezones that are not associated to any country. For more details [this gist](https://gist.github.com/ancorgs/8bd5f42ea847e1ba7590bc7e3d54cdad). ![buenos_aires-old](https://github.com/openSUSE/agama/assets/3638289/b45e0dd2-4483-485b-b050-c8cac08a9b3c) ## 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. ![spain-new](https://github.com/openSUSE/agama/assets/3638289/cb4ecafc-303c-4c28-94d4-33570a6bfc5d) Timezones without a country (except those that really make sense) are filtered out. That removes controversy and duplicates. ![buenos_aires-new](https://github.com/openSUSE/agama/assets/3638289/4a221099-ec78-4626-8005-c76a42b1f1dd) Works even for the two timezones that have a different identifier at langtable and at `zone.tab`. Again, see the [previously mentioned gist](https://gist.github.com/ancorgs/8bd5f42ea847e1ba7590bc7e3d54cdad). ![rangoon-new](https://github.com/openSUSE/agama/assets/3638289/8239362b-ae3b-4848-842f-98bbf8fad070) ## Testing - Added new unit tests - Tested manually (as shown in the screenshots)
- Loading branch information
Showing
10 changed files
with
125 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Thu Dec 21 11:12:45 UTC 2023 - Ancor Gonzalez Sosa <[email protected]> | ||
|
||
- The result of ListTimezones includes the localized country name | ||
for each timezone (gh#openSUSE/agama#946) | ||
|
||
------------------------------------------------------------------- | ||
Fri Dec 15 16:29:20 UTC 2023 - Imobach Gonzalez Sosa <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
------------------------------------------------------------------- | ||
Thu Dec 21 11:18:37 UTC 2023 - Ancor Gonzalez Sosa <[email protected]> | ||
|
||
- Display countries at timezone selector (gh#openSUSE/agama#946). | ||
|
||
------------------------------------------------------------------- | ||
Mon Dec 18 10:42:53 UTC 2023 - José Iván López González <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters