From c88a1dc55c58830b0e23feb29a1be49a3eade571 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 22 Mar 2022 21:53:45 -0400 Subject: fix bug in i18n merge_file/itstool_join revealed by previous commit Logically, i18n.merge_file cannot ever take a MULTI_OUTPUT_KW, but it does take a CT_OUTPUT_KW-like interface. Actually trying to pass multiple merge_file outputs causes the msgfmthelper script to be entirely malformed in the arguments it accepts, and treat the broken one like a --flag, then exit with argparse errors. Even if we somehow assumed that somehow it was designed to actually allow this, msgfmt doesn't support conceptually passing multiple outputs so that would be a msgfmt error instead of an error inside the guts of `meson --internal msgfmthelper`. Same logic applies again for the itstool command and the itstool internal helper. Catch this error at configuration time by using the single-output kwarg form. Likewise, it's totally nonsense to accept multiple install_dir or install_tags, and ever since commit 11f96380351a88059ec55f1070fdebc1b1033117 the CustomTarget itself won't even check this. --- docs/markdown/i18n-module.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/markdown/i18n-module.md') diff --git a/docs/markdown/i18n-module.md b/docs/markdown/i18n-module.md index 13c64f8..dc4186a 100644 --- a/docs/markdown/i18n-module.md +++ b/docs/markdown/i18n-module.md @@ -49,6 +49,9 @@ This merges translations into a text file using `msgfmt`. See [[@custom_tgt]] for normal keywords. In addition it accepts these keywords: +* `output`: same as `custom_target` but only accepts one item +* `install_dir`: same as `custom_target` but only accepts one item +* `install_tag`: same as `custom_target` but only accepts one item * `data_dirs`: (*Added 0.41.0*) list of directories for its files (See also `i18n.gettext()`) * `po_dir`: directory containing translations, relative to current directory @@ -63,6 +66,9 @@ This joins translations into a XML file using `itstool`. See [[@custom_tgt]] for normal keywords. In addition it accepts these keywords: +* `output`: same as `custom_target` but only accepts one item +* `install_dir`: same as `custom_target` but only accepts one item +* `install_tag`: same as `custom_target` but only accepts one item * `its_files`: filenames of ITS files that should be used explicitly (XML translation rules are autodetected otherwise). * `mo_targets` *required*: mo file generation targets as returned by `i18n.gettext()`. -- cgit v1.1