GNOME Bugzilla – Bug 525451
add iso 3166 codes
Last modified: 2008-06-18 15:19:25 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.
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
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...
Thanks!
*** Bug 507978 has been marked as a duplicate of this bug. ***