Commits

Dimitris Glezos  committed ff95276

bugfix: Remove duplicated entries from available UI languages (#428).

  • Participants
  • Parent commits a209c7d

Comments (0)

Files changed (2)

File transifex/settings/10-base.conf

 
 LOCALE_PATHS = os.path.join(PROJECT_PATH, 'locale/')
 
+# Take the languages automatically from the correct places
 LANGUAGES = available_languages(LOCALE_PATHS)
-LANGUAGES.append((LANGUAGE_CODE, LANGUAGE_CODE))
 
 # If you set this to False, Django will make some optimizations so as not
 # to load the internationalization machinery.

File transifex/settings/95-methods.conf

         filemode = 'a+'
     )
 
-# Let's sort the languages.
+# Languages
+# The default language should always be there
+LANGUAGES.append((LANGUAGE_CODE, LANGUAGE_CODE))
+# Remove any duplicated entries and sort
+LANGUAGES = list(set(LANGUAGES))
 LANGUAGES.sort()
 
 # If caching is enabled, the necessary middleware needs to be used.