Skip to content

Commit dbfa82c

Browse files
mattncrazymaster
andauthored
Add japanese translation files (#4490)
* Add japanese translation * Add translations * rename * Add fallback to match Accept-Language to the UNIX locale. * Fix supported_languages * Do not add if exists * Do not add en * Fix translation * Add translation * Fix typo * Update notebook/i18n/ja_JP/LC_MESSAGES/nbjs.po Co-Authored-By: mattn <[email protected]> * Update notebook/i18n/ja_JP/LC_MESSAGES/nbjs.po Co-Authored-By: mattn <[email protected]> * Update notebook/i18n/ja_JP/LC_MESSAGES/nbjs.po Co-Authored-By: mattn <[email protected]> * Update notebook/i18n/ja_JP/LC_MESSAGES/nbjs.po Co-Authored-By: mattn <[email protected]> * Update notebook/i18n/ja_JP/LC_MESSAGES/nbjs.po Co-Authored-By: mattn <[email protected]> * Update notebook/i18n/ja_JP/LC_MESSAGES/nbui.po Co-Authored-By: mattn <[email protected]> * Update notebook/i18n/ja_JP/LC_MESSAGES/nbjs.po Co-Authored-By: mattn <[email protected]> * Update notebook/i18n/ja_JP/LC_MESSAGES/notebook.po Co-Authored-By: mattn <[email protected]> * Fixes some pointed by review * Add translation Co-authored-by: Kenichi Ito <[email protected]>
1 parent 866f4f8 commit dbfa82c

File tree

6 files changed

+3208
-2
lines changed

6 files changed

+3208
-2
lines changed

notebook/i18n/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ def parse_accept_lang_header(accept_lang):
4545
if qvalue == 0:
4646
continue # 0 means not accepted
4747
by_q[qvalue].append(lang)
48+
if '_' in lang:
49+
short = lang.split('_')[0]
50+
if short != 'en':
51+
by_q[qvalue].append(short)
4852

4953
res = []
5054
for qvalue, langs in sorted(by_q.items()):

0 commit comments

Comments
 (0)