Bug 410392 - Date localization string can easily break
Summary: Date localization string can easily break
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-30 12:27 UTC by Guo Yunhe
Modified: 2026-01-26 13:36 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2019-07-30 12:27:35 UTC
https://cgit.kde.org/dolphin.git/tree/src/kitemviews/kfileitemmodel.cpp#n2124

The source strings are like:

'Earlier on' MMMM, yyyy

In some languages, translators tend to translate single quotes with ‘’ or don't use quotes. Then the translation won't be accepted by GetText. Even I have been translating KDE for seven years, I still made a mistake when translating these strings.

The code should be rewritten in a way that can be easier understood by translators.

First you string template is:

Earlier on %1

%1 is the date string you generated from source string:

MMMM, yyyy
Comment 1 Burkhard Lück 2019-07-31 04:03:40 UTC
see also https://bugs.kde.org/show_bug.cgi?id=401382
Comment 2 Elvis Angelaccio 2019-08-03 10:01:59 UTC
Hmm, https://phabricator.kde.org/D18769 initially had the following warning in the context:

"Do not replace single quotes with other characters such as «...», otherwise the translation will break."

but I don't remember why I removed in the last version of the patch...
Comment 3 Akseli Lahtinen 2026-01-26 13:36:15 UTC
Looks like these are now properly explained.  https://invent.kde.org/system/dolphin/-/blob/master/src/kitemviews/kfileitemmodel.cpp?ref_type=heads#L2551