summaryrefslogtreecommitdiff
path: root/raveos-calamares-module/desktopselect/ui/Translations.qml
blob: 389bf72b2c52e805f0f5da663ad98fbfed485d11 (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
pragma Singleton
import QtQuick 2.15

/**
 * Desktop Selector Modul Fordítások
 * ==================================
 *
 * Támogatott nyelvek:
 *   - hu_HU: Magyar
 *   - de_DE: Német
 *   - en_US, en_GB, stb.: Angol (alapértelmezett)
 *
 * Használat QML-ben:
 *   Text { text: Translations.title }
 */

QtObject {
    id: root

    // Aktuális nyelv kód (pl. "hu_HU", "en_US")
    property string currentLanguage: "en_US"

    // Modul fő címe
    property string title: "Select Desktop"

    // Figyelmeztető banner
    property string banner: "Choose a desktop environment. You can only choose one!"

    function setLanguage(locale) {
        currentLanguage = locale

        // ==================
        // MAGYAR
        // ==================
        if (locale.startsWith("hu")) {
            title = "Desktop kiválasztása"
            banner = "Válassz egy desktop környezetet. Csak egyet választhatsz!"
        }
        // ==================
        // NÉMET
        // ==================
        else if (locale.startsWith("de")) {
            title = "Desktop auswählen"
            banner = "Wähle eine Desktop-Umgebung. Du kannst nur eine auswählen!"
        }
        // ==================
        // ANGOL (alapértelmezett)
        // ==================
        else {
            title = "Select Desktop"
            banner = "Choose a desktop environment. You can only choose one!"
        }
    }
}