| 1 | // Copyright (C) 2022 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QTTRANSLATION_H |
| 5 | #define QTTRANSLATION_H |
| 6 | |
| 7 | #include <QtCore/qtconfigmacros.h> // QT_NO_TRANSLATION should be defined here as well |
| 8 | #include <QtCore/qtcoreexports.h> |
| 9 | |
| 10 | #if 0 |
| 11 | #pragma qt_class(QtTranslation) |
| 12 | #pragma qt_sync_stop_processing |
| 13 | #endif |
| 14 | |
| 15 | QT_BEGIN_NAMESPACE |
| 16 | |
| 17 | class QString; |
| 18 | |
| 19 | #define QT_TR_NOOP(x) x |
| 20 | #define QT_TR_NOOP_UTF8(x) x |
| 21 | #define QT_TRANSLATE_NOOP(scope, x) x |
| 22 | #define QT_TRANSLATE_NOOP_UTF8(scope, x) x |
| 23 | #define QT_TRANSLATE_NOOP3(scope, x, comment) {x, comment} |
| 24 | #define QT_TRANSLATE_NOOP3_UTF8(scope, x, comment) {x, comment} |
| 25 | |
| 26 | #ifndef QT_NO_TRANSLATION |
| 27 | |
| 28 | #define QT_TR_N_NOOP(x) x |
| 29 | #define QT_TRANSLATE_N_NOOP(scope, x) x |
| 30 | #define QT_TRANSLATE_N_NOOP3(scope, x, comment) {x, comment} |
| 31 | |
| 32 | // Defined in qcoreapplication.cpp |
| 33 | // The better name qTrId() is reserved for an upcoming function which would |
| 34 | // return a much more powerful QStringFormatter instead of a QString. |
| 35 | Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1); |
| 36 | |
| 37 | #define QT_TRID_NOOP(id) id |
| 38 | #define QT_TRID_N_NOOP(id) id |
| 39 | |
| 40 | #endif // QT_NO_TRANSLATION |
| 41 | |
| 42 | QT_END_NAMESPACE |
| 43 | |
| 44 | #endif /* QTTRANSLATION_H */ |
| 45 | |