[Pkg-isocodes-devel] r1184 - trunk/iso-codes

toddy-guest at alioth.debian.org toddy-guest at alioth.debian.org
Thu Nov 22 09:35:41 UTC 2007


Author: toddy-guest
Date: 2007-11-22 09:35:41 +0000 (Thu, 22 Nov 2007)
New Revision: 1184

Modified:
   trunk/iso-codes/ChangeLog
   trunk/iso-codes/iso2pot.py
Log:
iso2pot.py now marks historic entries as such, so that translators
do not report "obsolete" entries. This relies on the attribute
"date_withdrawn" and currently applies to ISO 3166 and ISO 4217.


Modified: trunk/iso-codes/ChangeLog
===================================================================
--- trunk/iso-codes/ChangeLog	2007-11-22 09:29:28 UTC (rev 1183)
+++ trunk/iso-codes/ChangeLog	2007-11-22 09:35:41 UTC (rev 1184)
@@ -2,6 +2,11 @@
 ---------------
 UNRELEASED
 
+  [ General ]
+  * iso2pot.py now marks historic entries as such, so that translators
+    do not report "obsolete" entries. This relies on the attribute
+    "date_withdrawn" and currently applies to ISO 3166 and ISO 4217.
+
   [ ISO-3166 translations ]
   * Norwegian Bokmål (Closes: #452098)
 

Modified: trunk/iso-codes/iso2pot.py
===================================================================
--- trunk/iso-codes/iso2pot.py	2007-11-22 09:29:28 UTC (rev 1183)
+++ trunk/iso-codes/iso2pot.py	2007-11-22 09:35:41 UTC (rev 1184)
@@ -15,7 +15,7 @@
     def __init__(self, nameslist,comment, ofile):
          """ 
 	 nameslist is the elements to be printed in msgid strings,
-	 comment is the atrribute to be used in the comment line
+	 comment is the attribute to be used in the comment line
 	 """
          self.attrnames = nameslist
 	 self.comment = comment
@@ -28,6 +28,7 @@
         # Get the name attributes
 	for aname in self.attrnames:
             n = attrs.get(aname, None)
+            date_withdrawn = attrs.get('date_withdrawn', None)
             c = [attrs.get(x, None) for x in self.comment]
             if type(n) == unicode:
                 n = n.encode('UTF-8')
@@ -40,7 +41,17 @@
                     self.done[n] = len(self.result)-1
                 comment_str = ", ".join([x for x in c if x is not None])
                 if comment_str:
-                    self.result[self.done[n]].append('%s for %s' % (aname, comment_str))
+                    # Special case for ISO 3166 and ISO 4217, as they contain
+                    # historic entries. In order to not trigger bug reports
+                    # from translators for "obsolete" entries, we specially
+                    # mark those historic entries.
+                    if date_withdrawn is not None:
+                        translator_comment = 'historic %s for %s (withdrawn %s)' % \
+                        (aname, comment_str, date_withdrawn)
+                    else:
+                        translator_comment = '%s for %s' % \
+                        (aname, comment_str)
+                    self.result[self.done[n]].append(translator_comment)
 
 def printHeader(ofile, iso_standard, report_bugs_to, version):
     """Print the file header




More information about the Pkg-isocodes-devel mailing list