(data)
| 127 | return newdata |
| 128 | |
| 129 | def check(data): |
| 130 | # Check that all alias definitions from the X11 file |
| 131 | # are actually mapped to the correct alias locales. |
| 132 | errors = 0 |
| 133 | for k, v in data.items(): |
| 134 | if locale.normalize(k) != v: |
| 135 | print(f'ERROR: {k!a} -> {locale.normalize(k)!a} != {v!a}', |
| 136 | file=sys.stderr) |
| 137 | errors += 1 |
| 138 | return errors |
| 139 | |
| 140 | if __name__ == '__main__': |
| 141 | import argparse |