[Pywikipedia-l] SVN: [5978] trunk/pywikipedia

purodha at svn.wikimedia.org purodha at svn.wikimedia.org
Thu Oct 16 04:59:55 UTC 2008


Revision: 5978
Author:   purodha
Date:     2008-10-16 04:59:55 +0000 (Thu, 16 Oct 2008)

Log Message:
-----------
Fix bug 2168298, add -hint:latin to interwiki.py

Modified Paths:
--------------
    trunk/pywikipedia/family.py
    trunk/pywikipedia/interwiki.py
    trunk/pywikipedia/titletranslate.py

Modified: trunk/pywikipedia/family.py
===================================================================
--- trunk/pywikipedia/family.py	2008-10-15 17:35:14 UTC (rev 5977)
+++ trunk/pywikipedia/family.py	2008-10-16 04:59:55 UTC (rev 5978)
@@ -2664,15 +2664,48 @@
         # Some languages belong to a group where the possibility is high that
         # equivalent articles have identical titles among the group.
         self.language_groups = {
+            # languages using the arabic script (incomplete)
+	    'arab' : [
+                'ar', 'ps', 'sd', 'ur',
+                # languages using multiple scripts, including arabic
+	        'kk', 'ku', 'tt', 'ug'
+            ],
             # languages that use chinese symbols
             'chinese': [
-                'ja', 'wuu', 'zh', 'zh-classical', 'zh-yue', 'gan'
+                'wuu', 'zh', 'zh-classical', 'zh-yue', 'gan', 'ii',
+                # languages using multiple/mixed scripts, including chinese
+		'ja', 'za'
             ],
             # languages that use the cyrillic alphabet
             'cyril': [
-                'ab', 'ba', 'be', 'be-x-old', 'bg', 'ce', 'cv', 'kk', 'kv', 'ky', 'mk',
-                'mn', 'os', 'ru', 'sr', 'tg', 'tk', 'udm', 'uk', 'xal'
+                'ab', 'av', 'ba', 'be', 'be-x-old', 'bg', 'bxr', 'ce', 'cu', 'cv', 'kv',
+		'ky', 'mk', 'lbe', 'mdf', 'mn', 'mo', 'myv', 'os', 'ru', 'sah', 'tg',
+                'tk', 'udm', 'uk', 'xal',
+                # languages using multiple scripts, including cyrillic
+                'ha', 'kk', 'sh', 'sr', 'tt'
             ],
+            # languages that use the latin alphabet
+            'latin': [
+                'aa', 'af', 'ak', 'als', 'an', 'ang', 'ast', 'ay', 'bar', 'bat-smg',
+		'bcl', 'bi', 'bm', 'br', 'bs', 'ca', 'cbk-zam', 'cdo', 'ceb', 'ch',
+		'cho', 'chy', 'co', 'crh', 'cs', 'csb', 'cy', 'da', 'de', 'diq', 'dsb',
+		'ee', 'eml', 'en', 'eo', 'es', 'et', 'eu', 'ext', 'ff', 'fi', 'fiu-vro',
+		'fj', 'fo', 'fr', 'frp', 'fur', 'fy', 'ga', 'gd', 'gl', 'gn', 'gv',
+		'hak', 'haw', 'hif', 'ho', 'hr', 'hsb', 'ht', 'hu', 'hz', 'ia', 'id',
+		'ie', 'ig', 'ik', 'ilo', 'io', 'is', 'it', 'jbo', 'jv', 'kaa', 'kab',
+		'kg', 'ki', 'kj', 'kl', 'kr', 'ksh', 'kw', 'la', 'lad', 'lb', 'lg',
+		'li', 'lij', 'lmo', 'ln', 'lt', 'lv', 'map-bms', 'mg', 'mh', 'mi', 'ms',
+		'mt', 'mus', 'na', 'nah', 'nap', 'nds', 'nds-nl', 'ng', 'nl', 'nn',
+		'no', 'nov', 'nrm', 'nv', 'ny', 'oc', 'om', 'pag', 'pam', 'pap', 'pdc',
+		'pih', 'pl', 'pms', 'pt', 'qu', 'rm', 'rn', 'ro', 'roa-rup', 'roa-tara',
+                'rw', 'sc', 'scn', 'sco', 'se', 'sg', 'simple', 'sk', 'sl', 'sm', 'sn',
+		'so', 'sq', 'srn', 'ss', 'st', 'stq', 'su', 'sv', 'sw', 'szl', 'tet',
+		'tl', 'tn', 'to', 'tpi', 'tr', 'ts', 'tum', 'tw', 'ty', 'uz', 've',
+		'vec', 'vi', 'vls', 'vo', 'wa', 'war', 'wo', 'xh', 'yo', 'zea',
+		'zh-min-nan', 'zu',
+                # languages using multiple scripts, including latin
+                'az', 'chr', 'ha', 'iu', 'kk', 'ku', 'rmy', 'sh', 'sr', 'tt', 'ug', 'za'
+            ],
             # Scandinavian languages
             'scand': [
                 'da', 'fo', 'is', 'no', 'sv'

Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py	2008-10-15 17:35:14 UTC (rev 5977)
+++ trunk/pywikipedia/interwiki.py	2008-10-16 04:59:55 UTC (rev 5978)
@@ -87,6 +87,7 @@
                                   number.
                        * cyril:   All languages that use the Cyrillic alphabet.
                        * chinese: All Chinese dialects.
+                       * latin:   All languages using the Latin script.
                        * scand:   All Scandinavian languages.
 
     -askhints:     for each page one or more hints are asked. See hint: above

Modified: trunk/pywikipedia/titletranslate.py
===================================================================
--- trunk/pywikipedia/titletranslate.py	2008-10-15 17:35:14 UTC (rev 5977)
+++ trunk/pywikipedia/titletranslate.py	2008-10-16 04:59:55 UTC (rev 5978)
@@ -54,7 +54,8 @@
                         if x not in result:
                             result.append(x)
                 else:
-                    wikipedia.output(u"Ignoring unknown language code %s"%newcode)
+                    if wikipedia.verbose:
+                        wikipedia.output(u"Ignoring unknown language code %s"%newcode)
 
     # Autotranslate dates into all other languages, the rest will come from existing interwiki links.
     if auto:





More information about the Pywikipedia-l mailing list