diff options
Diffstat (limited to 'tools/linguist/tests/data')
-rw-r--r-- | tools/linguist/tests/data/main.cpp | 35 | ||||
-rw-r--r-- | tools/linguist/tests/data/test.pro | 9 |
2 files changed, 44 insertions, 0 deletions
diff --git a/tools/linguist/tests/data/main.cpp b/tools/linguist/tests/data/main.cpp new file mode 100644 index 0000000..ebbda0a --- /dev/null +++ b/tools/linguist/tests/data/main.cpp @@ -0,0 +1,35 @@ + +#include <QtGui> +#include <QtCore> + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + QStringList args = app.arguments(); + + if (argc <= 1) { + qDebug() << "Usage: " << qPrintable(args[0]) << " <ts-file>"; + return 1; + } + + QTranslator trans; + trans.load(args[1], "."); + app.installTranslator(&trans); + + QWidget w; + QVBoxLayout *layout = new QVBoxLayout(&w); + + QLabel label1(QObject::tr("XXXXXXXXX \33 XXXXXXXXXXX • and → "), 0); + QLabel label2(QObject::tr("\32"), 0); + QLabel label3(QObject::tr("\176"), 0); + QLabel label4(QObject::tr("\301"), 0); + + layout->addWidget(&label1); + layout->addWidget(&label2); + layout->addWidget(&label3); + layout->addWidget(&label4); + + w.show(); + + return app.exec(); +} diff --git a/tools/linguist/tests/data/test.pro b/tools/linguist/tests/data/test.pro new file mode 100644 index 0000000..90e5704 --- /dev/null +++ b/tools/linguist/tests/data/test.pro @@ -0,0 +1,9 @@ +TEMPLATE = app +TARGET += +DEPENDPATH += . +INCLUDEPATH += . + +SOURCES += main.cpp + +TRANSLATIONS += t1_en.ts +TRANSLATIONS += t1_de.ts |