[libvirt PATCH 00/51] Use permutable format strings in translations

Ján Tomko jtomko at redhat.com
Fri Mar 10 16:34:43 UTC 2023


On a Friday in 2023, Jiri Denemark wrote:
>On Fri, Mar 10, 2023 at 16:14:00 +0000, Daniel P. Berrangé wrote:
>> On Fri, Mar 10, 2023 at 05:09:16PM +0100, Jiri Denemark wrote:
>> > See 01/51 for rationale. Enforced by the last two patches of this
>> > series. The rest is quite boring mechanical update, partially done using
>> > a perl oneliner
>> >
>> >     perl -pe 'for (my $i=1; $i<=12; $i++) { s/(N?_\("[^"]*?%)([^%$ ]*[a-zA-Z][^"]*")/\1$i\$\2/; }'
>> >
>> > and tuned manually to fix cases not covered by the regexp above and to
>> > merge multiline messages into a single line. I merged only those that
>> > were touched anyway. Some very long messages consisting of several
>> > sentences were merged only partially and split on sentence boundary.
>> >
>> > I will also update libvirt.pot once this is pushed.
>>
>> Are we *100% sure* weblate is going to handle this intelligently.
>>
>> This will change almost all of the msgid strings in libvirt.pot,
>> and translations are associatd with msgid strings.
>>
>> IOW, this risks throwing all our translations away putting us back
>> to near zero translation coverage, unless weblate is intelligent
>> enough to map numbered format strings, to non-numbered format
>> strings, and I'm not convinced that it can do that.
>
>I don't know is there a way to check this?

We could change a small subset of the strings for a start. Preferably
those that are not likely to be exposed to users.

Jano

>Technically we should be able
>to update the translations as well to make sure we don't lose any work
>done by translators. But can that be pushed into weblate somehow (I
>guess it must have some kind of import in case you do the translation in
>a separate tool).
>
>Jirka
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230310/a931c63d/attachment.sig>


More information about the libvir-list mailing list