-- ChatTranslateDictionary_Vocab10.lua
--
-- Zehntes EN-DE Wortschatz-Modul: Familie/Beziehungen weiter, Podcasts,
-- Wassersport, Nachhilfe, Gesundheitsdokumente, Cloud/Streaming,
-- Persönlichkeit, Klima, Bahn/Flug, Naturphänomene, Business-Verben.
-- Enthält NUR Wörter, die in keinem vorherigen Modul vorkommen.
-- Muss NACH allen vorherigen Dateien geladen werden.

CT_Dictionary = CT_Dictionary or {}
CT_Dictionary.words = CT_Dictionary.words or {}

local vocab10 = {
    -- Weitere Familie und Beziehungen
    { en = "half-brother", de = "Halbbruder" },
    { en = "half-sister", de = "Halbschwester" },
    { en = "stepbrother", de = "Stiefbruder" },
    { en = "stepsister", de = "Stiefschwester" },
    { en = "engagement", de = "Verlobung" },
    { en = "ex-wife", de = "Exfrau" },
    { en = "ex-husband", de = "Exmann" },
    { en = "guardian (family)", de = "Erziehungsberechtigter" },
    { en = "adoption", de = "Adoption" },
    { en = "orphan", de = "Waisenkind" },
    { en = "sibling rivalry", de = "Geschwisterrivalität" },

    -- Podcast und moderne Medien
    { en = "podcast", de = "Podcast" },
    { en = "blog", de = "Blog" },
    { en = "vlog", de = "Vlog" },
    { en = "host (media)", de = "Moderator" },
    { en = "audience engagement", de = "Publikumsbindung" },
    { en = "monetization", de = "Monetarisierung" },

    -- Wassersport
    { en = "kayaking", de = "Kajakfahren" },
    { en = "canoeing", de = "Kanufahren" },
    { en = "windsurfing", de = "Windsurfen" },
    { en = "water skiing", de = "Wasserski" },
    { en = "rafting", de = "Rafting" },
    { en = "jet ski", de = "Jetski" },
    { en = "wetsuit", de = "Neoprenanzug" },
    { en = "paddle", de = "Paddel" },

    -- Nachhilfe und Fernunterricht
    { en = "tutoring", de = "Nachhilfe" },
    { en = "tutor", de = "Nachhilfelehrer" },
    { en = "online course", de = "Online-Kurs" },
    { en = "distance learning", de = "Fernunterricht" },
    { en = "self-study", de = "Selbststudium" },
    { en = "study group", de = "Lerngruppe" },

    -- Gesundheitsdokumente
    { en = "vaccination card", de = "Impfpass" },
    { en = "over-the-counter", de = "rezeptfrei" },
    { en = "dosage", de = "Dosierung" },
    { en = "side effect", de = "Nebenwirkung" },
    { en = "checkup", de = "Vorsorgeuntersuchung" },
    { en = "referral", de = "Überweisung (Arzt)" },

    -- Cloud und Streaming-Dienste
    { en = "cloud storage", de = "Cloud-Speicher" },
    { en = "streaming service", de = "Streaming-Dienst" },
    { en = "buffering", de = "Puffern" },
    { en = "playlist", de = "Wiedergabeliste" },
    { en = "bitrate", de = "Bitrate" },
    { en = "codec", de = "Codec" },

    -- Weitere Persönlichkeit und Verhalten
    { en = "diplomatic", de = "diplomatisch" },
    { en = "decisive", de = "entschlossen (Verhalten)" },
    { en = "hesitant", de = "zögerlich" },
    { en = "meticulous", de = "akribisch" },
    { en = "spontaneous", de = "spontan" },
    { en = "consistent", de = "konsequent" },
    { en = "unpredictable", de = "unberechenbar" },
    { en = "dependable", de = "verlässlich" },

    -- Klimaadjektive
    { en = "tropical", de = "tropisch" },
    { en = "arid", de = "trocken (Klima)" },
    { en = "humid climate", de = "feuchtes Klima" },
    { en = "temperate", de = "gemäßigt (Klima)" },
    { en = "frigid", de = "eisig" },
    { en = "mild (climate)", de = "mild (Klima)" },

    -- Weitere Alltagsgegenstände
    { en = "keychain", de = "Schlüsselanhänger" },
    { en = "eraser", de = "Radiergummi" },
    { en = "ruler", de = "Lineal" },
    { en = "highlighter", de = "Textmarker" },
    { en = "paperclip", de = "Büroklammer" },
    { en = "rubber band", de = "Gummiband" },

    -- Bahn- und Flugreise weitere
    { en = "platform (train)", de = "Bahnsteig" },
    { en = "ticket machine", de = "Fahrkartenautomat" },
    { en = "connecting flight", de = "Anschlussflug" },
    { en = "delay", de = "Verspätung" },
    { en = "departure", de = "Abflug" },
    { en = "arrival", de = "Ankunft" },

    -- Weitere Naturphänomene
    { en = "rainforest", de = "Regenwald" },
    { en = "permafrost", de = "Permafrost" },
    { en = "erosion", de = "Erosion" },
    { en = "food chain", de = "Nahrungskette" },
    { en = "food web", de = "Nahrungsnetz" },

    -- Weitere Verben Business
    { en = "to launch (product)", de = "einführen (Produkt)" },
    { en = "to pitch", de = "präsentieren (Idee)" },
    { en = "to brainstorm", de = "brainstormen" },
    { en = "to outsource", de = "auslagern" },
    { en = "to streamline", de = "optimieren (Prozess)" },
    { en = "to prioritize", de = "priorisieren" },

}

for _, entry in ipairs(vocab10) do
    table.insert(CT_Dictionary.words, entry)
end

local function BuildIndex(sourceTable, destIndex)
    for _, entry in ipairs(sourceTable) do
        for srcLang, srcText in pairs(entry) do
            local key = srcText:lower()
            for tgtLang, tgtText in pairs(entry) do
                if tgtLang ~= srcLang then
                    destIndex[tgtLang] = destIndex[tgtLang] or {}
                    destIndex[tgtLang][key] = tgtText
                end
            end
        end
    end
end

CT_Dictionary.wordIndex = CT_Dictionary.wordIndex or {}
BuildIndex(CT_Dictionary.words, CT_Dictionary.wordIndex)