diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-12-21 10:53:07 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-12-21 13:47:11 +0100 |
commit | b98785309f9e8f64299fa39403266cc743bde722 (patch) | |
tree | ad0f76a6d9f2236b0071f3d1172b7c939e5e6e90 /doc/translations | |
parent | d321858732c83f1aecfbc7e3de4c347cd509639e (diff) |
i18n: Add `--lang` option to `make_rst.py` to write translated headings
Add a few missing headings to the translation templates.
Diffstat (limited to 'doc/translations')
-rw-r--r-- | doc/translations/extract.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/translations/extract.py b/doc/translations/extract.py index 68ac5d59f5..6550cff5aa 100644 --- a/doc/translations/extract.py +++ b/doc/translations/extract.py @@ -26,17 +26,22 @@ msgstr "" """ # Some strings used by make_rst.py are normally part of the editor translations, # so we need to include them manually here for the online docs. -BASE_STRINGS = [ +HEADINGS = [ "Description", "Tutorials", "Properties", + "Constructors", "Methods", + "Operators", "Theme Properties", "Signals", "Enumerations", "Constants", "Property Descriptions", + "Constructor Descriptions", "Method Descriptions", + "Operator Descriptions", + "Theme Property Descriptions", ] ## <xml-line-number-hack from="https://stackoverflow.com/a/36430270/10846399"> @@ -224,12 +229,12 @@ def _make_translation_catalog(classes): def _generate_translation_catalog_file(unique_msgs, output): with open(output, "w", encoding="utf8") as f: f.write(HEADER) - for msg in BASE_STRINGS: + for msg in HEADINGS: f.write("#: doc/tools/make_rst.py\n") f.write('msgid "{}"\n'.format(msg)) f.write('msgstr ""\n\n') for msg in unique_msgs: - if len(msg) == 0 or msg in BASE_STRINGS: + if len(msg) == 0 or msg in HEADINGS: continue f.write("#:") |