Bug 496916 - String status in .ts files is unusable
Summary: String status in .ts files is unusable
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: 24.08.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-02 06:06 UTC by Yaron Shahrabani
Modified: 2024-12-03 19:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yaron Shahrabani 2024-12-02 06:06:33 UTC
SUMMARY
I have a .ts file I want to translate, in Qt Linguist I can see the string status whether it's translated or missing etc.
Opening the same file in Lokalize shows a gray box with X inside (missing) for all the strings regardless of their statuses.
Changing the status to 'Approved' doesn't change the status of the string.

STEPS TO REPRODUCE
1. Download any ts file from here (Better have translations): https://github.com/qt/qttranslations/tree/dev/translations
2. Load this file into Lokalize.
3. Observe the missing strings which are actually there.

OBSERVED RESULT
All the translated strings appear as missing.

EXPECTED RESULT
I should be able to control the status of the strings from withing Lokalize.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux rolling
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.1-4-MANJARO (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
The same results in Qt Linguist look completely different.
Comment 1 Bug Janitor Service 2024-12-02 20:54:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/189
Comment 2 Albert Astals Cid 2024-12-03 18:59:08 UTC
Git commit 3c294d0b504f8c15a476213d15d900be0ec9d676 by Albert Astals Cid.
Committed on 03/12/2024 at 18:54.
Pushed by aacid into branch 'master'.

Make TsStorage/XliffStorage::isEmpty work again

In e7f783daddd813128aed9ef8c4fd6c092d56096d the condition

-        || (!result.isEmpty() && data && data->actionType == ContentEditingData::CheckLength))
was changed to
+        || (data && data->actionType == ContentEditingData::CheckLength))
on the basis that result.isEmpty was always false

Well then then correct change is to remove the || altogether not to
remove the code that is turning that check into false

M  +1    -1    src/catalog/ts/tsstorage.cpp
M  +1    -1    src/catalog/xliff/xliffstorage.cpp

https://invent.kde.org/sdk/lokalize/-/commit/3c294d0b504f8c15a476213d15d900be0ec9d676
Comment 3 Albert Astals Cid 2024-12-03 19:01:27 UTC
Git commit 56cfc8f0a938a000cf36bc74e43ef3830e5152dc by Albert Astals Cid.
Committed on 03/12/2024 at 19:01.
Pushed by aacid into branch 'release/24.12'.

Make TsStorage/XliffStorage::isEmpty work again

In e7f783daddd813128aed9ef8c4fd6c092d56096d the condition

-        || (!result.isEmpty() && data && data->actionType == ContentEditingData::CheckLength))
was changed to
+        || (data && data->actionType == ContentEditingData::CheckLength))
on the basis that result.isEmpty was always false

Well then then correct change is to remove the || altogether not to
remove the code that is turning that check into false
(cherry picked from commit 3c294d0b504f8c15a476213d15d900be0ec9d676)

M  +1    -1    src/catalog/ts/tsstorage.cpp
M  +1    -1    src/catalog/xliff/xliffstorage.cpp

https://invent.kde.org/sdk/lokalize/-/commit/56cfc8f0a938a000cf36bc74e43ef3830e5152dc