After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 525451 - add iso 3166 codes
add iso 3166 codes
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: 2.22.0
Assigned To: Federico Mena Quintero
Federico Mena Quintero
: 507978 (view as bug list)
Depends on:
Blocks: 519823
 
 
Reported: 2008-03-31 22:12 UTC by Dan Winship
Modified: 2008-06-18 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add ISO country codes to Locations.xml (42.35 KB, patch)
2008-03-31 22:13 UTC, Dan Winship
none Details | Review
revised patch to add country codes and time zone hints (102.91 KB, patch)
2008-04-03 17:35 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2008-03-31 22:12:34 UTC
Due to variations in the spelling (eg, Macau vs Macao), ASCIIfication (Cote d'Ivoire vs Côte d'Ivoire) and level of formality (North Korea vs Democratic People's Republic of Korea) in country names, it is difficult to reliably correlate the country names in Locations.xml with other lists of country names. This patch adds ISO-3166 codes to all of the country entries, and to those sub-country location entries that have their own ISO-3166 code.
Comment 1 Dan Winship 2008-03-31 22:13:50 UTC
Created attachment 108376 [details] [review]
patch to add ISO country codes to Locations.xml

This patch does not change the definition of WeatherLocation in libgweather, because I didn't know how eager we are to break people in the middle of a release
Comment 2 Dan Winship 2008-04-03 17:35:31 UTC
Created attachment 108560 [details] [review]
revised patch to add country codes and time zone hints

this now depends on the patch in bug 526015 to move the gweather-xml parsing to libgweather, and it builds on that by changing the definition of WeatherLocation to include the country code and timezone hint. (Oh, this also updates the patch to include guesses at timezones for countries, states, and locations, which will need some additional tweaking in the future.)

If we don't want to break weather_location_new(), another possibility is to add explicit setters for the new properties, separate from weather_location_new(). Another other possibility is that instead of adding new fields for these two things, instead just add a GHashTable, allowing for the possibility of arbitrary new metadata in the future...
Comment 3 Vincent Untz 2008-04-07 09:40:46 UTC
Thanks!
Comment 4 Dan Winship 2008-06-18 15:19:25 UTC
*** Bug 507978 has been marked as a duplicate of this bug. ***