diff options
Diffstat (limited to 'doc/translations/extract.py')
-rw-r--r-- | doc/translations/extract.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/doc/translations/extract.py b/doc/translations/extract.py index d53ee91488..45e747d5dd 100644 --- a/doc/translations/extract.py +++ b/doc/translations/extract.py @@ -8,8 +8,8 @@ from collections import OrderedDict EXTRACT_TAGS = ["description", "brief_description", "member", "constant", "theme_item", "link"] HEADER = """\ # LANGUAGE translation of the Godot Engine class reference. -# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. -# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). +# Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. +# Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). # This file is distributed under the same license as the Godot source code. # # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -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, location_line=False): 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("#:") |