mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	i18n: Add English locale to language list if missing.
The English locale data is only present if the user has run `manage.py makemigrations` on the system.
This commit is contained in:
		@@ -25,7 +25,11 @@ class Command(compilemessages.Command):
 | 
			
		||||
        data = {'languages': []}  # type: Dict[str, List[Dict[str, str]]]
 | 
			
		||||
        lang_name_re = re.compile('"Language-Team: (.*?) \(')
 | 
			
		||||
 | 
			
		||||
        for locale in os.listdir(locale_path):
 | 
			
		||||
        locales = os.listdir(locale_path)
 | 
			
		||||
        locales.append('en')
 | 
			
		||||
        locales = list(set(locales))
 | 
			
		||||
 | 
			
		||||
        for locale in locales:
 | 
			
		||||
            info = {}
 | 
			
		||||
            if locale == 'en':
 | 
			
		||||
                data['languages'].append({'code': 'en', 'name': 'English'})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user