For example, if the alternative translation field has the content “Branco-Cinzento (horizontal)” and I get it copied to the main field, a parentheses, “)”, is attached at the end, resulting in the main translation field being filled with the following string: “Branco-Cinzento (horizontal))”. Reproducible: Always
I can confirm this with the latest Lokalize version. It also happens with other punctuation (e.g., a full stop: .). One example I tried makes me *suspect* that the extra character is actually from the original (English) string, not from the alternative translation.
This is caused by some "magic" (this word is used in the code itself) trying to preserve non-word characters at the start and end of the string: - https://invent.kde.org/sdk/lokalize/-/blob/master/src/tm/tmview.cpp#L830 This feature was introduced 14 years ago and I am not sure what was the original motivation - https://invent.kde.org/sdk/lokalize/-/commit/3765f371f02b4a2b33118c0e7f95e3fc5ae6134f . It might make sense in some very limited use case related to KDE. Would be nice if this "black magic" can be at least turn off if not completely removed. Disclamer: I am not KDE app developer and I am using (or trying to use) Lokalize for personal translation project.