aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmltranslation/data/translation.js
blob: 52699266042e1018613e1e7ff396237f205d7e52 (plain)
1
2
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

function basic() {
    return qsTr("hello")
}

function basic2() {
    return qsTranslate("CustomContext", "goodbye")
}

function basic3() {
    if (1)
        return qsTr("hello")
    return "";
}

function disambiguation() {
    return qsTr("hi", "informal 'hello'")
}

function disambiguation2() {
    return qsTranslate("CustomContext", "see ya", "informal 'goodbye'")
}

function disambiguation3() {
    if (1)
        return qsTr("hi", "informal 'hello'")
    return "";
}

function noop() {
    var _noop = QT_TR_NOOP("hello")
    return qsTr(_noop)
}

function noop2() {
    var _noop2 = QT_TRANSLATE_NOOP("CustomContext", "goodbye")
    return qsTranslate("CustomContext", _noop2)
}

function singular() {
    return qsTr("%n duck(s)", "", 1)
}

function singular2() {
    if (1)
        return qsTr("%n duck(s)", "", 1)
    return "";
}

function plural() {
    return qsTr("%n duck(s)", "", 2)
}

function plural2() {
    if (1)
        return qsTr("%n duck(s)", "", 2)
    return "";
}

function emptyContext() {
    return qsTranslate("", "hello")
}