summaryrefslogtreecommitdiff
path: root/doc/translations
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-07 09:23:57 +0100
committerGitHub <noreply@github.com>2022-01-07 09:23:57 +0100
commit0905f81c0a5d289396beb2bfbf488eb518d14f9f (patch)
tree51e3134d54b047a153075297531573a2adcd602c /doc/translations
parent897afb69a7f1130894d4e76857fb52ff5bd37544 (diff)
parentfd1d0c28c26eaf7f3da59d322099cdc012dd73e0 (diff)
Merge pull request #56162 from akien-mga/i18n-make_rst-more-translatable
i18n: Make more `make_rst.py` strings translatable
Diffstat (limited to 'doc/translations')
-rw-r--r--doc/translations/extract.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/doc/translations/extract.py b/doc/translations/extract.py
index 45e747d5dd..f8223701d5 100644
--- a/doc/translations/extract.py
+++ b/doc/translations/extract.py
@@ -26,7 +26,7 @@ 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.
-HEADINGS = [
+BASE_STRINGS = [
"Description",
"Tutorials",
"Properties",
@@ -42,6 +42,19 @@ HEADINGS = [
"Method Descriptions",
"Operator Descriptions",
"Theme Property Descriptions",
+ "Inherits:",
+ "Inherited By:",
+ "(overrides %s)",
+ "Default",
+ "Setter",
+ "value",
+ "Getter",
+ "This method should typically be overridden by the user to have any effect.",
+ "This method has no side effects. It doesn't modify any of the instance's member variables.",
+ "This method accepts any number of arguments after the ones described here.",
+ "This method is used to construct a type.",
+ "This method doesn't need an instance to be called, so it can be called directly using the class name.",
+ "This method describes a valid operator to use with this type as left-hand operand.",
]
## <xml-line-number-hack from="https://stackoverflow.com/a/36430270/10846399">
@@ -229,12 +242,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 HEADINGS:
+ for msg in BASE_STRINGS:
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 HEADINGS:
+ if len(msg) == 0 or msg in BASE_STRINGS:
continue
f.write("#:")