D18769: Fix context for QDateTime::toString() translations
Albert Astals Cid
noreply at phabricator.kde.org
Sat Feb 16 22:38:57 GMT 2019
aacid added a comment.
I didn't realize you moved the text out of the i18n call.
If you do that gettext won't extract it and thus it'll be untranslatable.
I see that you did that so you can reuse it untranslated later.
Maybe this would work (haven't tried it)?
KLocalizedString s = ki18nc(context, text);
const QString translatedFormat = s.toString();
if (translatedFormat.count(QLatin1Char('\'')) == 2) { /* good */ }
else { qCWarning(); newGroupValue = s.toString({"en"}); }
i think that would mean "no" translation in the else since it is asking for an en translation.
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D18769
To: elvisangelaccio, lueck, aacid, cfeck
Cc: ltoscano, kfm-devel, alexde, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190216/2ffe6692/attachment.htm>
More information about the kfm-devel
mailing list