(code, modifier)
| 373 | return langname + '.' + encoding |
| 374 | |
| 375 | def _append_modifier(code, modifier): |
| 376 | if modifier == 'euro': |
| 377 | if '.' not in code: |
| 378 | # Linux appears to require keeping the "@euro" modifier in place, |
| 379 | # even when using the ".ISO8859-15" encoding. |
| 380 | return code + '.ISO8859-15@euro' |
| 381 | _, _, encoding = code.partition('.') |
| 382 | if encoding == 'UTF-8': |
| 383 | return code |
| 384 | if encoding == 'ISO8859-1': |
| 385 | code = _replace_encoding(code, 'ISO8859-15') |
| 386 | return code + '@' + modifier |
| 387 | |
| 388 | def normalize(localename): |
| 389 |
no test coverage detected
searching dependent graphs…