mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-26 17:14:42 +00:00
Use set() instead of a list for the set of supported languages
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3703 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
b074ed1157
commit
cfc651550a
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ import locale
|
|||
import gettext
|
||||
|
||||
# more supported languages are added in init()
|
||||
supported_languages = ['en']
|
||||
supported_languages = set(['en'])
|
||||
default_language = 'en'
|
||||
default_encoding = locale.getpreferredencoding()
|
||||
# It can happen that the preferrec encoding is not determinable, which
|
||||
|
|
@ -83,7 +83,7 @@ def init (domain, directory):
|
|||
for lang in os.listdir(directory):
|
||||
path = os.path.join(directory, lang, 'LC_MESSAGES')
|
||||
if os.path.exists(os.path.join(path, '%s.mo' % domain)):
|
||||
supported_languages.append(lang)
|
||||
supported_languages.add(lang)
|
||||
loc = get_locale()
|
||||
if loc in supported_languages:
|
||||
default_language = loc
|
||||
|
|
|
|||
Loading…
Reference in a new issue