LEFT | RIGHT |
1 #!@PYTHON@ | |
2 #-*- coding: utf-8 -*- | 1 #-*- coding: utf-8 -*- |
3 | 2 |
4 """ | 3 """ |
5 Documentation i18n module | 4 Documentation i18n module |
6 """ | 5 """ |
7 | 6 |
8 import re | 7 import re |
9 import sys | 8 import sys |
10 import os | 9 import os |
11 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 for l in LANGUAGES: | 93 for l in LANGUAGES: |
95 if l.enabled and l.code != 'en': | 94 if l.enabled and l.code != 'en': |
96 t = gettext.translation('lilypond-doc', | 95 t = gettext.translation('lilypond-doc', |
97 os.environ['LYDOC_LOCALEDIR'], | 96 os.environ['LYDOC_LOCALEDIR'], |
98 [l.code]) | 97 [l.code]) |
99 translation[l.code] = t.gettext | 98 translation[l.code] = t.gettext |
100 except: | 99 except: |
101 if 'LYDOC_LOCALEDIR' in os.environ: | 100 if 'LYDOC_LOCALEDIR' in os.environ: |
102 sys.stderr.write ('langdefs.py: warning: lilypond-doc gettext domain
not found.\n') | 101 sys.stderr.write ('langdefs.py: warning: lilypond-doc gettext domain
not found.\n') |
103 translation = dict ([(l.code, lambda x: x) for l in LANGUAGES]) | 102 translation = dict ([(l.code, lambda x: x) for l in LANGUAGES]) |
LEFT | RIGHT |