Bug 490802 - Lokalize adds newlines to source and target language translations when reading from PO files
Summary: Lokalize adds newlines to source and target language translations when readin...
Status: ASSIGNED
Alias: None
Product: lokalize
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-25 04:02 UTC by Finley Watson
Modified: 2024-07-25 16:33 UTC (History)
2 users (show)

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


Attachments
PO file with long strings (869 bytes, text/x-gettext-translation)
2024-07-25 04:02 UTC, Finley Watson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Finley Watson 2024-07-25 04:02:23 UTC
Created attachment 171971 [details]
PO file with long strings

SUMMARY
PO files can have their source and target strings split over multiple lines (if the string is long, for instance). Lokalize reads them as having newlines added to the strings themselves, rather than processing the PO files and stripping out those newlines

STEPS TO REPRODUCE
1. Open a simple PO file with a long untranslated source string
2. Make a change that counts as a translation of any string
3. Save the file
4. Close Lokalize
5. Reopen Lokalize and the file

OBSERVED RESULT
Both source and target strings that are long have been modified by Lokalize when saving the file, correctly formatting them for PO strings over multiple lines. But the data is not parsed properly when reading the data back, and displays with the newlines still in the strings.

EXPECTED RESULT
Correctly parse strings.

SOFTWARE/OS VERSIONS
Lokalize version: git main

Included is a simple PO file you can test with.
Comment 1 Bug Janitor Service 2024-07-25 16:33:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/138