From 098dc533d659a9ee6e987d46dfcd918bfb133ca3 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Tue, 30 Sep 2025 12:10:55 -0400 Subject: Allow CustomTarget source for i18n.xgettext Fixes #15054 --- docs/markdown/i18n-module.md | 5 ++++- docs/markdown/snippets/xgettext-custom-tgt.md | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 docs/markdown/snippets/xgettext-custom-tgt.md (limited to 'docs/markdown') diff --git a/docs/markdown/i18n-module.md b/docs/markdown/i18n-module.md index ac6146dd5..6cdd74a28 100644 --- a/docs/markdown/i18n-module.md +++ b/docs/markdown/i18n-module.md @@ -90,7 +90,7 @@ for each executable. Positional arguments are the following: * name `str`: the name of the resulting pot file. -* sources `array[str|File|build_tgt|custom_tgt]`: +* sources `array[str|File|build_tgt|custom_tgt|custom_idx]`: source files or targets. May be a list of `string`, `File`, [[@build_tgt]], or [[@custom_tgt]] returned from other calls to this function. @@ -120,4 +120,7 @@ included to generate the final pot file. Therefore, adding a dependency to source target will automatically add the translations of that dependency to the needed translations for that source target. +*New in 1.10.0* sources can be result of [[@custom_tgt]] or [[@custom_idx]]. +Before 1.10.0, custom targets were silently ignored. + *Added 1.8.0* diff --git a/docs/markdown/snippets/xgettext-custom-tgt.md b/docs/markdown/snippets/xgettext-custom-tgt.md new file mode 100644 index 000000000..37ec43823 --- /dev/null +++ b/docs/markdown/snippets/xgettext-custom-tgt.md @@ -0,0 +1,7 @@ +## `i18n.xgettext` now accepts CustomTarget and CustomTargetIndex as sources + +Previously, [[@custom_tgt]] were accepted but silently ignored, and +[[@custom_idx]] were not accepted. + +Now, they both can be used, and the generated outputs will be scanned to extract +translation strings. -- cgit v1.2.3