D14473: Fix KCatalog::translate when translation is same as original text
This revision was automatically updated to reflect the committed changes. Closed by commit R249:34a22e5ee5d4: Fix KCatalog::translate when translation is same as original text (authored by aacid). REPOSITORY R249 KI18n CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D14473?vs=38730&id=38815 REVISION DETAIL https://phabricator.kde.org/D14473 AFFECTED FILES autotests/klocalizedstringtest.cpp autotests/klocalizedstringtest.h autotests/po/ca/ki18n-test.po src/kcatalog.cpp To: aacid, ilic Cc: ilic, kde-frameworks-devel, michaelh, ngraham, bruns
D14473: Fix KCatalog::translate when translation is same as original text
ilic accepted this revision. ilic added a comment. This revision is now accepted and ready to land. I distinctly remember having had the same quandry once, and then someone from the gettext side said to compare pointers. Even the comment to dngettext call in the plural version of KCatalog::translate mentions comparison of pointers to this effect. So, "someone" simply screwed up on porting from kdelibs4, when replacing char*'s with QByteArray's... REPOSITORY R249 KI18n BRANCH master REVISION DETAIL https://phabricator.kde.org/D14473 To: aacid, ilic Cc: ilic, kde-frameworks-devel, michaelh, ngraham, bruns
D14473: Fix KCatalog::translate when translation is same as original text
aacid created this revision. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: kde-frameworks-devel. aacid requested review of this revision. REVISION SUMMARY We need to be compare the pointer passed to gettext with the one we get back. If it is the same it means no translation was found, if it is different then it means the translation was found. TEST PLAN Test now succeeds, without patch it fails REPOSITORY R249 KI18n BRANCH master REVISION DETAIL https://phabricator.kde.org/D14473 AFFECTED FILES autotests/klocalizedstringtest.cpp autotests/klocalizedstringtest.h autotests/po/ca/ki18n-test.po src/kcatalog.cpp To: aacid Cc: kde-frameworks-devel, michaelh, ngraham, bruns