[Differential] [Commented On] D4023: kformat: Make it possible to properly translate relative days of the week
aspotashev (Alexander Potashev)
noreply at phabricator.kde.org
Sun Jan 8 19:04:17 UTC 2017
aspotashev added inline comments.
INLINE COMMENTS
> kformatprivate.cpp:381
> {
> - return tr("Last %1").arg(m_locale.dayName(date.dayOfWeek(), format));
> + switch(date.dayOfWeek()) {
> + case 1: return tr("Last Monday", "day in the previous week");
Needs a space: "switch ("
> kformatprivate.cpp:382
> + switch(date.dayOfWeek()) {
> + case 1: return tr("Last Monday", "day in the previous week");
> + case 2: return tr("Last Tuesday", "day in the previous week");
Indentation of "case " lines is probably against the coding style.
> kformatprivate.cpp:400
> + case 7: return tr("Next Sunday", "day in the week after this");
> + }
> }
http://doc.qt.io/qt-5/qdate.html#dayOfWeek says "Returns 0 if the date is invalid". What happens when the input date is invalid?
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D4023
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: mpyne, #frameworks, kde-i18n-doc, aspotashev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170108/be9075f9/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list