diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-07-03 11:28:16 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-07-06 11:54:42 (GMT) |
commit | 20d73ef1bf23569b09ca862f6c5e5971098613d6 (patch) | |
tree | 88f3aa79ab7827281b3e244ad18c10397f3e2f72 /src/corelib/kernel | |
parent | e446729d99bebaf7fac0110fcf22fc867d7229cb (diff) | |
download | Qt-20d73ef1bf23569b09ca862f6c5e5971098613d6.zip Qt-20d73ef1bf23569b09ca862f6c5e5971098613d6.tar.gz Qt-20d73ef1bf23569b09ca862f6c5e5971098613d6.tar.bz2 |
support for id-based translations
unlike in an earlier attempt, ids are textual this time.
the developer is able to provide a template for the string. when lupdate
and lrelease are integrated into the build process, this makes it
possible to avoid a round-trip to a dedicated string designer during the
early development stage.
Requirement-id: QT-435
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index e2708c3..054be70 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1675,6 +1675,12 @@ QString QCoreApplication::translate(const char *context, const char *sourceText, return result; } +// Declared in qglobal.h +QString qtTrId(const char *id, int n) +{ + return QCoreApplication::translate(0, id, 0, QCoreApplication::UnicodeUTF8, n); +} + bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator) { return QCoreApplication::self |