On Sat, Oct 05, 2024 at 01:02:03PM +0200, Patrice Dumas wrote: > On Sat, Oct 05, 2024 at 11:28:53AM +0100, Gavin Smith wrote: > > I see that this was fixed in commit b0eb920e16320727196c (2024-10-03); > > however the effect of this is that all the translated versions of these > > strings will now be wrong: > > > > - - Variable d\'instance de fr : BBB CCC > > + -- Variable d\'instance of fr: BBB CCC > > erreur→ > > > > I see two ways of fixing this. One is to change it back to the way > > the code was before. The other is to use the > > po_document/adjust-translations.pl script (which would be more work). > > Any suggestions? > > The previous output was incorrect, as the whole definition line was > formatted as code, which is incorrect for the category of the definition, > which is normal text. Now, the translation tree arguments are formatted > as code when needed (for {class}, {name}, {type} {arguments}), but the > whole line is formatted as normal text.
It may have been incorrect, but "fixing" it has made the output worse... > I can imagine other ways to obtain the same result, for instance using > @t{--}, or outputting separately the leading '@tie{}--- ' and the > remaining, but those options entail a change in the translations. > > There could be an option, maybe, which would be to add a new pseudo > type _no_code such that code style is removed for {category} but the > whole line is formatted as code. Would that be better? I think it's better to patch the translations as a temporary measure as this entails no extra complexity. Eventually translators will update the translated strings. Here's a change to adjust-translations.pl to do this: diff --git a/po_document/adjust-translations.pl b/po_document/adjust-translation s.pl index c35f7b3fdb..fed6a5d99e 100755 --- a/po_document/adjust-translations.pl +++ b/po_document/adjust-translations.pl @@ -30,6 +30,9 @@ if (!close ($fh)) { # $data =~ s/#, fuzzy\n((#.*\n)*msgctxt)/$1/g; +# Translated string changed -- to --- +$data =~ s/#, fuzzy, perl-brace-format\n#\| msgid "\@tie\{\}-- .*\n(msgid "\@ti e\{)/$1/g; + # Overwrite original file print $data >$input_file; if (!open($fh, '>', $input_file)) { I will commit this once I have updated the test results.