Revision: 5411 Author: malafaya Date: 2008-05-20 13:27:38 +0000 (Tue, 20 May 2008)
Log Message: ----------- * interwiki sort order for fy.wiktionary
Modified Paths: -------------- trunk/pywikipedia/families/wiktionary_family.py
Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2008-05-20 09:26:38 UTC (rev 5410) +++ trunk/pywikipedia/families/wiktionary_family.py 2008-05-20 13:27:38 UTC (rev 5411) @@ -378,6 +378,15 @@ 'zh-cn': 'zh' }
+ # Order for fy: alphabetical by code, but y counts as i + # TODO: This code is duplicated from wikipedia_family.py + def fycomp(x,y): + x = x.replace("y","i")+x.count("y")*"!" + y = y.replace("y","i")+y.count("y")*"!" + return cmp(x,y) + self.fyinterwiki = self.alphabetic[:] + self.fyinterwiki.sort(fycomp) + # Which languages have a special order for putting interlanguage links, # and what order is it? If a language is not in interwiki_putfirst, # alphabetical order on language code is used. For languages that are in @@ -390,6 +399,7 @@ 'et': self.alphabetic, 'fi': self.alphabetic, 'fr': self.alphabetic, + 'fy': self.fyinterwiki, 'he': ['en'], 'hu': ['en'], 'pl': self.alphabetic,