Adnane Belmadiaf has proposed merging 
lp:~adnane002/loco-directory/fix.languages-menu into lp:loco-directory.

Requested reviews:
  loco-directory-dev (loco-directory-dev)
Related bugs:
  #648293 Add Asturian language to language selector
  https://bugs.launchpad.net/bugs/648293
  #648296 Languages in language selector should be listed alphabetically
  https://bugs.launchpad.net/bugs/648296

-- 
https://code.launchpad.net/~adnane002/loco-directory/fix.languages-menu/+merge/38042
Your team loco-directory-dev is requested to review the proposed merge of 
lp:~adnane002/loco-directory/fix.languages-menu into lp:loco-directory.
=== added file 'loco_directory/common/languages.py'
--- loco_directory/common/languages.py	1970-01-01 00:00:00 +0000
+++ loco_directory/common/languages.py	2010-10-09 11:39:44 +0000
@@ -0,0 +1,71 @@
+# XXX: Workaround for https://bugs.launchpad.net/loco-directory/+bug/648293
+
+LANGUAGES = (
+    ('ar', 'Arabic'),
+    ('ast', 'Asturian'),
+    ('bg', 'Bulgarian'),
+    ('bn', 'Bengali'),
+    ('bs', 'Bosnian'),
+    ('ca', 'Catalan'),
+    ('cs', 'Czech'),
+    ('cy', 'Welsh'),
+    ('da', 'Danish'),
+    ('de', 'German'),
+    ('el', 'Greek'),
+    ('en', 'English'),
+    ('en-gb', 'British English'),
+    ('es', 'Spanish'),
+    ('es-ar', 'Argentinian Spanish'),
+    ('et', 'Estonian'),
+    ('eu', 'Basque'),
+    ('fa', 'Persian'),
+    ('fi', 'Finnish'),
+    ('fr', 'French'),
+    ('fy-nl', 'Frisian'),
+    ('ga', 'Irish'),
+    ('gl', 'Galician'),
+    ('he', 'Hebrew'),
+    ('hi', 'Hindi'),
+    ('hr', 'Croatian'),
+    ('hu', 'Hungarian'),
+    ('id', 'Indonesian'),
+    ('is', 'Icelandic'),
+    ('it', 'Italian'),
+    ('ja', 'Japanese'),
+    ('ka', 'Georgian'),
+    ('km', 'Khmer'),
+    ('kn', 'Kannada'),
+    ('ko', 'Korean'),
+    ('lt', 'Lithuanian'),
+    ('lv', 'Latvian'),
+    ('mk', 'Macedonian'),
+    ('ml', 'Malayalam'),
+    ('mn', 'Mongolian'),
+    ('nl', 'Dutch'),
+    ('no', 'Norwegian'),
+    ('nb', 'Norwegian Bokmal'),
+    ('nn', 'Norwegian Nynorsk'),
+    ('pl', 'Polish'),
+    ('pt', 'Portuguese'),
+    ('pt-br', 'Brazilian Portuguese'),
+    ('ro', 'Romanian'),
+    ('ru', 'Russian'),
+    ('sk', 'Slovak'),
+    ('sl', 'Slovenian'),
+    ('sq', 'Albanian'),
+    ('sr', 'Serbian'),
+    ('sr-latn', 'Serbian Latin'),
+    ('sv', 'Swedish'),
+    ('ta', 'Tamil'),
+    ('te', 'Telugu'),
+    ('th', 'Thai'),
+    ('tr', 'Turkish'),
+    ('uk', 'Ukrainian'),
+    ('vi', 'Vietnamese'),
+    ('zh-cn', 'Simplified Chinese'),
+    ('zh-tw', 'Traditional Chinese'),
+)
+
+# XXX: Workaround for https://bugs.launchpad.net/loco-directory/+bug/648296
+LANGUAGES = sorted(LANGUAGES, key=lambda LANGUAGES: LANGUAGES[1])
+

=== modified file 'loco_directory/settings.py'
--- loco_directory/settings.py	2010-09-01 15:50:09 +0000
+++ loco_directory/settings.py	2010-10-09 11:39:44 +0000
@@ -153,6 +153,12 @@
 FLICKR_API_KEY = '8c969a1e8a49629bb89b411930ab1cc8'
 
 import logging
+# Import the new LANGUAGES tuples
+try:
+  from common.languages import LANGUAGES
+except ImportError:
+  logging.warning("No LANGUAGES tuples were found. The LoCo Directory will use the default one.")
+
 try:
   from local_settings import *
 except ImportError:

_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to