r660 - in zope-plonelanguagetool/trunk: . debian tests

Fabio Tranchitella kobold at alioth.debian.org
Fri Feb 9 15:46:01 CET 2007


Author: kobold
Date: 2007-02-09 15:46:00 +0100 (Fri, 09 Feb 2007)
New Revision: 660

Added:
   zope-plonelanguagetool/trunk/tests/test_negotiation.py
Removed:
   zope-plonelanguagetool/trunk/tests/testSkeleton.py
Modified:
   zope-plonelanguagetool/trunk/HISTORY.txt
   zope-plonelanguagetool/trunk/LanguageTool.py
   zope-plonelanguagetool/trunk/availablelanguages.py
   zope-plonelanguagetool/trunk/debian/changelog
   zope-plonelanguagetool/trunk/version.txt
Log:
New upstream release.


Modified: zope-plonelanguagetool/trunk/HISTORY.txt
===================================================================
--- zope-plonelanguagetool/trunk/HISTORY.txt	2007-02-09 14:45:16 UTC (rev 659)
+++ zope-plonelanguagetool/trunk/HISTORY.txt	2007-02-09 14:46:00 UTC (rev 660)
@@ -2,6 +2,24 @@
 
     (name of developer listed in brackets)
 
+PloneLanguageTool 1.5 - Released December 15, 2006
+
+    - Fixed bug in request language negotiation. If the tool is configured not
+      to use combined language codes, we have to use the basic language code in
+      all places. This closes http://dev.plone.org/plone/ticket/5804 and
+      http://dev.plone.org/plone/ticket/5941.
+      [hannosch]
+
+    - Added missing Chamorro language to the basic listing.
+      This closes http://dev.plone.org/plone/ticket/5836.
+      [hannosch]
+
+    - Removed obsolete testSkeleton.
+      [hannosch]
+
+    - Changed the native Name of 'rm' to 'Rumantsch'. 
+      [jensens]
+
 PloneLanguageTool 1.4 - Released September 8, 2006
 
     - Changed the browser language based negotiation to recognize combined

Modified: zope-plonelanguagetool/trunk/LanguageTool.py
===================================================================
--- zope-plonelanguagetool/trunk/LanguageTool.py	2007-02-09 14:45:16 UTC (rev 659)
+++ zope-plonelanguagetool/trunk/LanguageTool.py	2007-02-09 14:46:00 UTC (rev 660)
@@ -320,6 +320,10 @@
         """Gets the preferred site language."""
         l = self.getLanguageBindings()
         if l[0]:
+            if not self.use_combined_language_codes:
+                return l[0].split('-')[0]
+            else:
+                return l[0]
             return l[0]
         # this is the default language
         return l[1]
@@ -399,8 +403,9 @@
                     # if we only use simply language codes, we should recognize
                     # combined codes as their base code. So 'de-de' is treated
                     # as 'de'.
-                    if language.split('-')[0] in self.getSupportedLanguages():
-                        langs.append((quality, language))
+                    baselanguage = language.split('-')[0]
+                    if baselanguage in self.getSupportedLanguages():
+                        langs.append((quality, baselanguage))
                 i = i + 1
 
         # Sort and reverse it

Modified: zope-plonelanguagetool/trunk/availablelanguages.py
===================================================================
--- zope-plonelanguagetool/trunk/availablelanguages.py	2007-02-09 14:45:16 UTC (rev 659)
+++ zope-plonelanguagetool/trunk/availablelanguages.py	2007-02-09 14:46:00 UTC (rev 660)
@@ -48,6 +48,10 @@
 # This is a dictionary of dictonaries:
 #
 # 'langcode-variation' : {native : 'Native name', english : 'English name', flag : 'flag-*.gif'}
+#
+# The current structure is to have language codes following ISO639-1 and to
+# have flags which are named according to country codes following ISO3166-1.
+#
 
 languages = {
 'aa' : {'native' : 'магIарул мацI', 'english' : 'Afar', 'flag' : 'flag-dj.gif'},
@@ -62,12 +66,13 @@
 'be' : {'native' : 'Беларускі', 'english' : 'Belarussian', 'flag' : 'flag-by.gif'},
 'bg' : {'native' : 'Български', 'english' : 'Bulgarian', 'flag' : 'flag-bg.gif'},
 'bh' : {'native' : 'Bihari', 'english' : 'Bihari'},
-'bi' : {'native' : 'Bislama', 'english' : 'Bislama'},
+'bi' : {'native' : 'Bislama', 'english' : 'Bislama', 'flag' : 'flag-vu.gif'},
 'bn' : {'native' : 'বাংলা', 'english' : 'Bengali'},
 'bo' : {'native' : 'བོད་སྐད་', 'english' : 'Tibetan'},
 'bs' : {'native' : 'Bosanski', 'english' : 'Bosnian', 'flag' : 'flag-ba.gif'},
 'br' : {'native' : 'Brezhoneg', 'english' : 'Breton'},
 'ca' : {'native' : 'Català', 'english' : 'Catalan', 'flag' : 'flag-cat.gif'},
+'ch' : {'native' : 'Chamoru', 'english' : 'Chamorro'},
 'co' : {'native' : 'Corsu', 'english' : 'Corsican'},
 'cs' : {'native' : 'Čeština', 'english' : 'Czech', 'flag' : 'flag-cz.gif'},
 'cy' : {'native' : 'Cymraeg', 'english' : 'Welsh', 'flag' : 'flag-cym.gif'},
@@ -148,7 +153,7 @@
 'ps' : {'native' : 'پښتو', 'english' : 'Pashto'},
 'pt' : {'native' : 'Português', 'english' : 'Portuguese', 'flag' : 'flag-pt.gif'},
 'qu' : {'native' : 'Quechua', 'english' : 'Quechua'},
-'rm' : {'native' : 'Rhaeto-Romance', 'english' : ''},
+'rm' : {'native' : 'Rumantsch', 'english' : 'Rhaeto-Romance'},
 'rn' : {'native' : 'Kirundi', 'english' : 'Kirundi'},
 'ro' : {'native' : 'Română', 'english' : 'Romanian', 'flag' : 'flag-ro.gif'},
 'ru' : {'native' : 'Русский', 'english' : 'Russian', 'flag' : 'flag-ru.gif'},

Modified: zope-plonelanguagetool/trunk/debian/changelog
===================================================================
--- zope-plonelanguagetool/trunk/debian/changelog	2007-02-09 14:45:16 UTC (rev 659)
+++ zope-plonelanguagetool/trunk/debian/changelog	2007-02-09 14:46:00 UTC (rev 660)
@@ -1,3 +1,9 @@
+zope-plonelanguagetool (1.5-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Fabio Tranchitella <kobold at debian.org>  Fri,  9 Feb 2007 15:45:42 +0100
+
 zope-plonelanguagetool (1.4-1) unstable; urgency=low
 
   * New upstream release.

Deleted: zope-plonelanguagetool/trunk/tests/testSkeleton.py
===================================================================
--- zope-plonelanguagetool/trunk/tests/testSkeleton.py	2007-02-09 14:45:16 UTC (rev 659)
+++ zope-plonelanguagetool/trunk/tests/testSkeleton.py	2007-02-09 14:46:00 UTC (rev 660)
@@ -1,25 +0,0 @@
-#
-# PloneLanguageTool TestCase
-#
-
-import os, sys
-if __name__ == '__main__':
-    execfile(os.path.join(sys.path[0], 'framework.py'))
-
-from Testing import ZopeTestCase
-
-ZopeTestCase.installProduct('PloneLanguageTool')
-
-class TestSomething(ZopeTestCase.ZopeTestCase):
-
-    def afterSetUp(self):
-        pass
-
-def test_suite():
-    from unittest import TestSuite, makeSuite
-    suite = TestSuite()
-    suite.addTest(makeSuite(TestSomething))
-    return suite
-
-if __name__ == '__main__':
-    framework()

Copied: zope-plonelanguagetool/trunk/tests/test_negotiation.py (from rev 635, zope-plonelanguagetool/branches/upstream/current/tests/test_negotiation.py)

Modified: zope-plonelanguagetool/trunk/version.txt
===================================================================
--- zope-plonelanguagetool/trunk/version.txt	2007-02-09 14:45:16 UTC (rev 659)
+++ zope-plonelanguagetool/trunk/version.txt	2007-02-09 14:46:00 UTC (rev 660)
@@ -1 +1 @@
-1.4
+1.5




More information about the pkg-zope-commits mailing list