[fix] languages_intialized
This commit is contained in:
@@ -21,12 +21,12 @@ road_language_overrides = defaultdict(OrderedDict)
|
|||||||
|
|
||||||
languages = set()
|
languages = set()
|
||||||
|
|
||||||
initialized = False
|
languages_initialized = False
|
||||||
|
|
||||||
|
|
||||||
def init_languages(languages_dir=LANGUAGES_DIR):
|
def init_languages(languages_dir=LANGUAGES_DIR):
|
||||||
global initialized
|
global languages_initialized
|
||||||
if initialized:
|
if languages_initialized:
|
||||||
return
|
return
|
||||||
path = os.path.join(languages_dir, 'countries', 'country_language.tsv')
|
path = os.path.join(languages_dir, 'countries', 'country_language.tsv')
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
@@ -56,7 +56,7 @@ def init_languages(languages_dir=LANGUAGES_DIR):
|
|||||||
if lang not in languages:
|
if lang not in languages:
|
||||||
languages.add(lang)
|
languages.add(lang)
|
||||||
|
|
||||||
initialized = True
|
languages_initialized = True
|
||||||
|
|
||||||
|
|
||||||
def get_country_languages(country, official=True, overrides=True):
|
def get_country_languages(country, official=True, overrides=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user