--8e0381625fd24bb9b401a53e5a8f20ff Content-Type: text/plain; charset="ascii" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit mpyne created this revision. mpyne added reviewers: Frameworks, kde-i18n-doc, aspotashev. mpyne set the repository for this revision to R244 KCoreAddons. Restricted Application added a project: Frameworks. REVISION SUMMARY KFormat::formatRelativeDate allows one to obtain a human-readable date like "Last Wednesday" or "Next Thursday" for dates within a week of the current date. The returned string cannot be properly translated in all languages since it's generated using a placeholder of the form "Next %1" -- the word Next (or Last) may itself need to be modified to be correct which can't be done with the current translation system. The fix is just to return "Next $dayName" directly, based on the day name as appropriate, and allow the translators to translate the entire phrase. The auto tests are adjusted as well. They were actually incorrect before this change, since the API documentation for `formatRelativeDate` makes clear that the date format is only applied if the date is *not* within a week of the current date. See also Bug 335106 . TEST PLAN Change builds and installs properly, and all kcoreaddons tests continue to pass (with the `kformattest` autotest revised per this change). REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D4023 AFFECTED FILES autotests/kformattest.cpp src/lib/util/kformatprivate.cpp EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: mpyne, #frameworks, kde-i18n-doc, aspotashev --8e0381625fd24bb9b401a53e5a8f20ff Content-Type: text/html; charset="ascii" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable View Revision=
mpyne created this revision.
mpyne added rev= iewers: Frameworks, kde-i18n-doc, aspotashev.
mpyne set the repository= for this revision to R244 KCoreAddons.
Restricted Application added a= project: Frameworks.

REVISION SUMMARY

KFormat::formatRelativeDate allows one to obtain a human-r= eadable date like "Last Wednesday" or "Next Thursday" f= or dates within a week of the current date.

The returned string cannot be properly translated in all languages since= it's generated using a placeholder of the form "Next %1" --= the word Next (or Last) may itself need to be modified to be correct which= can't be done with the current translation system.

The fix is just to return "Next $dayName" directly, based on t= he day name as appropriate, and allow the translators to translate the enti= re phrase.

The auto tests are adjusted as well. They were actually incorrect befor= e this change, since the API documentation for formatRelativeDate makes clear that the date f= ormat is only applied if the date is *not* within a week of the current dat= e.

See also Bug 335106.

=

TEST PLAN

Change builds and = installs properly, and all kcoreaddons tests continue to pass (with the kformattest autotest = revised per this change).


REPOSITORY
R244 KCoreAddons

REVISION= DETAIL
https://phabricator.kde.org/D4023

AFFECTED FILES
autotests/kformattest.cpp
src/lib/util/kformatprivate.cpp

EMAIL P= REFERENCES
https://phabricator.kde.org/settin= gs/panel/emailpreferences/

To: m= pyne, Frameworks, kde-i18n-doc, aspotashev
--8e0381625fd24bb9b401a53e5a8f20ff--