diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f5022df0..44d719d76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -642,7 +642,7 @@ if(PYTHONINTERP_FOUND) endif() add_custom_target(update_locale - COMMAND xgettext --keyword=tr:1c,2 --keyword=tr:1 --keyword=trMark:1c,2 --keyword=trMark:1 --omit-header -d resources/locale/main.en ${MAIN_SOURCES} ${GUI_LIB_SOURCES} + COMMAND xgettext --keyword=tr:1c,2 --keyword=tr:1 --keyword=trMark:1c,2 --keyword=trMark:1 --add-comments=TRANSLATORS --omit-header -d resources/locale/main.en ${MAIN_SOURCES} ${GUI_LIB_SOURCES} COMMAND python3 update_locale.py WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) diff --git a/update_locale.py b/update_locale.py index 331f7b2bb..cd33b39f4 100644 --- a/update_locale.py +++ b/update_locale.py @@ -71,7 +71,7 @@ def update_other_languages(base): cmd = ["xgettext", "--keyword=_:1c,2", "--keyword=_:1", "--omit-header", "-j", "-d", output[:-3], "-C", "-"] subprocess.run(cmd, check=True, input=b"") pre = open(output, "rt").read() - cmd = ["xgettext", "--keyword=_:1c,2", "--keyword=_:1", "--omit-header", "-j", "-d", output[:-3], script] + cmd = ["xgettext", "--keyword=_:1c,2", "--keyword=_:1", "--add-comments=TRANSLATORS", "--omit-header", "-j", "-d" , output[:-3], script] subprocess.run(cmd, check=True) post = open(output, "rt").read() if pre == post and "name" not in info: