Add a non-fuzzy translation to the dictionary.
(ctxt, id, str, fuzzy)
| 47 | |
| 48 | |
| 49 | def add(ctxt, id, str, fuzzy): |
| 50 | "Add a non-fuzzy translation to the dictionary." |
| 51 | global MESSAGES |
| 52 | if not fuzzy and str: |
| 53 | if ctxt is None: |
| 54 | MESSAGES[id] = str |
| 55 | else: |
| 56 | MESSAGES[b"%b\x04%b" % (ctxt, id)] = str |
| 57 | |
| 58 | |
| 59 | def generate(): |