mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Google: Fix Language.normalize to not prepend the empty string with 'lang_'
This commit is contained in:
parent
10342acd11
commit
125d542706
@ -54,7 +54,7 @@ class Language(registry.OnlySomeStrings):
|
||||
'tr'.split()]
|
||||
validStrings.append('')
|
||||
def normalize(self, s):
|
||||
if not s.startswith('lang_'):
|
||||
if s and not s.startswith('lang_'):
|
||||
s = 'lang_' + s
|
||||
if not s.endswith('CN') or s.endswith('TW'):
|
||||
s = s.lower()
|
||||
|
Loading…
Reference in New Issue
Block a user