| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
.pragma library |
| 30 |
.import QtQuick 2.0 as Quick2 |
| 31 |
|
| 32 |
qsTranslate(); |
| 33 |
qsTranslate(10); |
| 34 |
qsTranslate(10, 20); |
| 35 |
qsTranslate("10", 20); |
| 36 |
qsTranslate(10, "20"); |
| 37 |
|
| 38 |
QT_TRANSLATE_NOOP(); |
| 39 |
QT_TRANSLATE_NOOP(10); |
| 40 |
QT_TRANSLATE_NOOP(10, 20); |
| 41 |
QT_TRANSLATE_NOOP("10", 20); |
| 42 |
QT_TRANSLATE_NOOP(10, "20"); |
| 43 |
|
| 44 |
qsTr(); |
| 45 |
qsTr(10); |
| 46 |
|
| 47 |
QT_TR_NOOP(); |
| 48 |
QT_TR_NOOP(10); |
| 49 |
|
| 50 |
qsTrId(); |
| 51 |
qsTrId(10); |
| 52 |
|
| 53 |
QT_TRID_NOOP(); |
| 54 |
QT_TRID_NOOP(10); |
| 55 |
|
| 56 |
//% This is wrong |
| 57 |
//% "This is not wrong" This is wrong |
| 58 |
//% "I forgot to close the meta string |
| 59 |
//% "Being evil \ |
| 60 |
|
| 61 |
//% "Should cause a warning" |
| 62 |
qsTranslate("FooContext", "Hello"); |
| 63 |
//% "Should cause a warning" |
| 64 |
QT_TRANSLATE_NOOP("FooContext", "World"); |
| 65 |
//% "Should cause a warning" |
| 66 |
qsTr("Hello"); |
| 67 |
//% "Should cause a warning" |
| 68 |
QT_TR_NOOP("World"); |
| 69 |
|
| 70 |
//: This comment will be discarded. |
| 71 |
Math.sin(1); |
| 72 |
//= id_foobar |
| 73 |
Math.cos(2); |
| 74 |
//~ underflow False |
| 75 |
Math.tan(3); |
| 76 |
|
| 77 |
/* |
| 78 |
Not tested for now, because these should perhaps not cause |
| 79 |
translation entries to be generated at all; see QTBUG-11843. |
| 80 |
|
| 81 |
//= qtn_foo |
| 82 |
qsTrId("qtn_foo"); |
| 83 |
//= qtn_bar |
| 84 |
QT_TRID_NOOP("qtn_bar"); |
| 85 |
*/ |