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.
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 now succeeds, without patch it fails
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
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...