Please test Lokalize master (if you can)

Karl Ove Hufthammer karl at huftis.org
Mon Jul 29 19:47:20 BST 2024


Albert Astals Cid skreiv 12.07.2024 14:29:
> We (well mostly Volker) have just ported it to KF6 and some [small]
> regressions may have sneaked in.

I found another regression. When displaying results from the translation 
memory, HTML tags seems to mess up the diffs. Reproducible example:

Create a PO file with this entry:

     msgid "<b>VeryUnique FooBaz StringTest</b>"
     msgstr "some translation"

Make sure it gets added to the translation memory.

Now (preferably in another file, to avoid the TM getting updated 
automatically), add this string:

     msgid "VeryUnique FooBaz StringTest"
     msgstr ""

The only difference is the removal of the <b> and </b> tags. In the old 
version, the TM would correctly show the difference as:

[--<b>--]VeryUnique FooBaz StringTest[--</b>--]

(I use the [--x--] to mark deleted (red) text and [++x++] to mark added 
(blue) text.)

But in the latest version (Git master), the difference shown is 
completely messed up:

[--<--]VeryUnique[-->--][++ ++] FooBaz StringTest[-- --]


I did a ‘git bisect’ and found that the bug was introduced in this commit:

commit 1644e10eb59c5fc1a7db54b45810c766126ca10d (HEAD)
Author: Volker Krause <vkrause at kde.org>
Date:   Wed May 22 17:11:49 2024 +0200

     Port the remaining QRegExp uses that are portable in Qt 5

     What's left now are three uses of lastIndexIn with (positive) offsets,
     something that needs QStringView API not available in Qt 5 yet.

  src/common/diff.cpp   | 14 ++++++++++----
  src/xlifftextedit.cpp | 18 +++++++++++-------
  2 files changed, 21 insertions(+), 11 deletions(-)


-- 
Karl Ove Hufthammer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20240729/784afa6d/attachment.htm>


More information about the kde-i18n-doc mailing list