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