D24884: I18N_NOOP2 was deprecated but we can't replace by I18NC_NOOP as it expends it as 2 elements (context + text)
Albert Astals Cid
noreply at phabricator.kde.org
Wed Oct 23 21:36:10 BST 2019
aacid added a comment.
Discarding the context is bad practice, if you discard it, it's very easy you will make a mistake when you try to i18n the text again and not pass the correct context.
I'm against bringing any I18NC_NOOP variant that strips the context.
This would also break since I18NC_NOOP_STRIP is unknown to the extraction scripts so nothing would be extracted for translation.
Ideally we would even deprecated I18NC_NOOP too, we now have KLocalizedString that is a string-to-be-localizaed but that hasn't been yet, so that fixes the same problem that _NOOP does, that you're translating too early.
Unfortunately for this case it seems that you also need the untranslated text and KLocalizedString doesn't have a getter for that. I'll propose that API.
REPOSITORY
R249 KI18n
REVISION DETAIL
https://phabricator.kde.org/D24884
To: mlaurent, dfaure, ilic
Cc: aacid, vkrause, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191023/e36296da/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list