diff --git a/py/maketranslationdata.py b/py/maketranslationdata.py index 938e8de667..fbf396c73f 100644 --- a/py/maketranslationdata.py +++ b/py/maketranslationdata.py @@ -380,8 +380,8 @@ def compute_huffman_coding(translation_name, translations, f): f.write("#define word_end {}\n".format(word_end)) f.write("#define minlen {}\n".format(minlen)) f.write("#define maxlen {}\n".format(maxlen)) - f.write("#define offstart {}\n".format(offstart)) - f.write("#define offset {}\n".format(offset)) + f.write("#define translation_offstart {}\n".format(offstart)) + f.write("#define translation_offset {}\n".format(offset)) return EncodingTable(values, lengths, words, canonical, extractor, apply_offset, remove_offset) diff --git a/supervisor/shared/translate/translate.c b/supervisor/shared/translate/translate.c index 423c5444fd..b07aa584ca 100644 --- a/supervisor/shared/translate/translate.c +++ b/supervisor/shared/translate/translate.c @@ -57,8 +57,8 @@ STATIC void get_word(int n, const mchar_t **pos, const mchar_t **end) { } STATIC int put_utf8(char *buf, int u) { - if (u >= offstart) { - u += offset; + if (u >= translation_offstart) { + u += translation_offset; } if (u <= 0x7f) { *buf = u;