summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-10 22:26:15 +0100
committerGitHub <noreply@github.com>2022-02-10 22:26:15 +0100
commit80332049ee8ef9c3ac4c5b9e0c2a8d5267c57cd6 (patch)
treed734bcbd9ab06360de4c5b90b08d64ec99ee8302 /doc
parentba8973d663278bf651d291dd0e49e02b9e4b0b3a (diff)
parent2b35ecaee4e7173e6c5e99386344d794eac0158e (diff)
Merge pull request #57932 from pycbouh/docs-extract-links
Diffstat (limited to 'doc')
-rw-r--r--doc/translations/extract.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/translations/extract.py b/doc/translations/extract.py
index 1295495392..5708e0072d 100644
--- a/doc/translations/extract.py
+++ b/doc/translations/extract.py
@@ -222,12 +222,14 @@ def _make_translation_catalog(classes):
desc_list = classes[class_name]
for elem in desc_list.doc.iter():
if elem.tag in EXTRACT_TAGS:
- if not elem.text or len(elem.text) == 0:
+ elem_text = elem.text
+ if elem.tag == "link":
+ elem_text = elem.attrib["title"] if "title" in elem.attrib else ""
+ if not elem_text or len(elem_text) == 0:
continue
- if elem.tag == "link" and "$DOCS_URL" in elem.text: # No need to localize.
- continue
- line_no = elem._start_line_number if elem.text[0] != "\n" else elem._start_line_number + 1
- desc_str = elem.text.strip()
+
+ line_no = elem._start_line_number if elem_text[0] != "\n" else elem._start_line_number + 1
+ desc_str = elem_text.strip()
code_block_regions = _make_codeblock_regions(desc_str, desc_list.path)
desc_msg = _strip_and_split_desc(desc_str, code_block_regions)
desc_obj = Desc(line_no, desc_msg, desc_list)