libgweather r533 - in trunk: . data



Author: danw
Date: Sun Nov 30 18:08:41 2008
New Revision: 533
URL: http://svn.gnome.org/viewvc/libgweather?rev=533&view=rev

Log:
	* data/update-locations.py (get_city): Prefer a city name with no
	language tag to one with, since that seems to mean "international
	name". Fixes "Macau". #558310,  Leonardo Ferreira Fontenelle.


Modified:
   trunk/ChangeLog
   trunk/data/Locations.xml.in
   trunk/data/update-locations.py

Modified: trunk/data/Locations.xml.in
==============================================================================
--- trunk/data/Locations.xml.in	(original)
+++ trunk/data/Locations.xml.in	Sun Nov 30 18:08:41 2008
@@ -3651,7 +3651,7 @@
            Barddhaman, Belgaum, Bhopal, Calicut, Coimbatore, Dibrugarh,
            Guwahati, Indore, Kochi, Kollam, Mangalore, Mau, Mysore,
            Nagercoil, Palakkad, Pondicherry, Shiliguri, Shillong,
-           Shimla, Shimoga, Soyibug, Srinagar, Trichur, Tumkur,
+           Shimla, Shimoga, Soyibug, Srinagar, Thrissur, Tumkur,
            Tuticorin
         -->
       <iso-code>IN</iso-code>
@@ -4874,7 +4874,7 @@
            used. The "u" spelling is currently slightly more popular in
            English.)
         -->
-      <_name>Macau</_name>
+      <_name msgctxt="Country">Macau</_name>
       <iso-code>MO</iso-code>
       <fips-code>MC</fips-code>
       <timezones>
@@ -4883,10 +4883,9 @@
       <tz-hint>Asia/Macau</tz-hint>
       <city>
         <!-- The capital of Macau.
-             The name is also written "æé".
-             The local name is "Macau".
+             The local name in Chinese is "Aomen / æé".
           -->
-        <_name>Aomen</_name>
+        <_name msgctxt="City in Macau">Macau</_name>
         <coordinates>22.200556 113.546111</coordinates>
         <location>
           <name>Taipa</name>

Modified: trunk/data/update-locations.py
==============================================================================
--- trunk/data/update-locations.py	(original)
+++ trunk/data/update-locations.py	Sun Nov 30 18:08:41 2008
@@ -493,8 +493,8 @@
         if not country_code:
             country_code = match[5]
 
-        # name type: "N" = standard, "NS" = standard in non-Latin
-        # script, "C" = conventional (ie, traditional English)
+        # name type: "N" = standard, "C" = conventional (ie,
+        # traditional English)
         if name_type == 'C' and ( language == 'eng' or language == ''):
             city = City(match)
             best_match = match
@@ -505,11 +505,13 @@
                 best_match = match
             elif not city.has_conventional_name:
                 country = getFipsCountry(city)
-                if country is not None and country.pref_lang == language:
+                if language == '' or (country is not None and country.pref_lang == language):
                     city = City(match)
                     best_match = match
 
-    # Shouldn't happen...
+    # Shouldn't happen, but some cities have only a "V" (variant) "D"
+    # (unofficial) or "NS"/"VS"/"DS" (N/V/D in alternate script) name
+    # given... maybe we should skip these?
     if city is None:
         city = City(matches[0])
         best_match = matches[0]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]