mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
i18n: Simplify logic for translation data in page_params.
This refactors the get_translation_data function to return an empty dict when 'en' language is passed, to avoid repetition of code in stats and home.
This commit is contained in:
committed by
Tim Abbott
parent
4e6c0989db
commit
d9d51e32c1
@@ -69,7 +69,9 @@ def get_available_language_codes() -> List[str]:
|
||||
return codes
|
||||
|
||||
def get_language_translation_data(language: str) -> Dict[str, str]:
|
||||
if language == 'zh-hans':
|
||||
if language == 'en':
|
||||
return {}
|
||||
elif language == 'zh-hans':
|
||||
language = 'zh_Hans'
|
||||
elif language == 'zh-hant':
|
||||
language = 'zh_Hant'
|
||||
|
||||
Reference in New Issue
Block a user