equal
deleted
inserted
replaced
49 return u.encode(encoding.encoding, "replace") |
49 return u.encode(encoding.encoding, "replace") |
50 except LookupError: |
50 except LookupError: |
51 # An unknown encoding results in a LookupError. |
51 # An unknown encoding results in a LookupError. |
52 return message |
52 return message |
53 |
53 |
54 if 'HGPLAIN' in os.environ: |
54 def _plain(): |
|
55 if 'HGPLAIN' not in os.environ and 'HGPLAINEXCEPT' not in os.environ: |
|
56 return False |
|
57 exceptions = os.environ.get('HGPLAINEXCEPT', '').strip().split(',') |
|
58 return 'i18n' not in exceptions |
|
59 |
|
60 if _plain(): |
55 _ = lambda message: message |
61 _ = lambda message: message |
56 else: |
62 else: |
57 _ = gettext |
63 _ = gettext |
58 |
64 |