Bug 410392

Summary: Date localization string can easily break
Product: [Applications] dolphin Reporter: Guo Yunhe <i>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: akselmo, aspotashev, elvis.angelaccio, lueck, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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