mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
correct translation of text that is not actually translated
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
372a70cc84
commit
373a43eeea
1 changed files with 5 additions and 1 deletions
|
@ -163,7 +163,11 @@ QString QTranslator::translate(const char *context, const char *sourceText) cons
|
|||
QByteArray msgwithctx(context);
|
||||
msgwithctx.append('\004');
|
||||
msgwithctx.append(sourceText);
|
||||
return QString::fromUtf8(dgettext(d->domain.constData(), msgwithctx.constData()));
|
||||
const char* result = dgettext(d->domain.constData(), msgwithctx.constData());
|
||||
if (result == msgwithctx.constData()) {
|
||||
return QString::fromUtf8(sourceText);
|
||||
}
|
||||
return QString::fromUtf8(result);
|
||||
}
|
||||
return QString::fromUtf8(dgettext(d->domain.constData(), sourceText));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue