We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 099c99f commit 2fb3270Copy full SHA for 2fb3270
src/sentry/conf/locale.py
@@ -3,6 +3,15 @@
3
import sentry
4
5
6
+# change locale file dir name to locale code
7
+def dirname_to_local(dir_name):
8
+ if '_' in dir_name:
9
+ pre, post = dir_name.split('_', 1)
10
+ dir_name = '{}-{}'.format(pre, post.lower())
11
+ return dir_name
12
+
13
14
with open(os.path.join(os.path.dirname(sentry.__file__),
15
'locale', 'catalogs.json'), 'r') as f:
16
CATALOGS = json.load(f)['supported_locales']
17
+ CATALOGS = [dirname_to_local(dirname) for dirname in CATALOGS]
0 commit comments