Quantcast ESOUI - View Single Post - Help with "LorePlay" addon - German
View Single Post
11/05/19, 08:00 AM   #9
Neverlands
 
Neverlands's Avatar
Join Date: Jul 2017
Posts: 6
Hello Baertram,

thank you for the new download!
You will find my new de.lua at the end of this post.

For each case I saved a different costume for LoreWear: Home, City, Adventure and Dungeon (I don't use the Emotes feature).




First I tried your suggestion:
Code:
    --New English
     -- Add Wayshrines
        local temp = {}
        for cityName, cityData in pairs(languageTable.defaultEmotesByCity) do
            local cityWayshrine = string.format(GetString(SI_DEATH_PROMPT_WAYSHRINE) .. " %s", cityName)
            temp[cityName] = languageTable.defaultEmotesByCity[cityName]
            temp[cityWayshrine] = languageTable.defaultEmotesByCity[cityName]
        end
        languageTable.defaultEmotesByCity = temp
     
     
    --new German
    -- Add Wayshrines
        local tempDe
        for cityName, cityData in pairs(languageTable.defaultEmotesByCity) do
            local cityWayshrine = string.format(GetString(SI_DEATH_PROMPT_WAYSHRINE) .. " %s", cityName)
            tempDe[cityName] = languageTable.defaultEmotesByCity[cityName]
            tempDe[cityWayshrine] = languageTable.defaultEmotesByCity[cityName]
        end
        languageTable.defaultEmotesByCity = tempDe

EN worked fine but DE gave me an error message:
Code:
user:/AddOns/LorePlay/code/locales/de.lua:423: attempt to index a nil value
stack traceback:
user:/AddOns/LorePlay/code/locales/de.lua:423: in function 'languageTable.CreateEmotesByCityTable'
|caaaaaa<Locals> defaultCityToRegionEmotes = [table:1]{}, cityName = "Aldfelden", cityData = [table:2]{}, cityWayshrine = "Wegschrein Aldfelden" </Locals>|r
user:/AddOns/LorePlay/code/SmartEmotes.lua:425: in function 'SmartEmotes.CreateDefaultEmoteTables'
user:/AddOns/LorePlay/code/SmartEmotes.lua:1242: in function 'SmartEmotes.InitializeEmotes'
user:/AddOns/LorePlay/LorePlay.lua:15: in function 'LorePlay.OnAddOnLoaded'
|caaaaaa<Locals> event = 65536, addonName = "LorePlay" </Locals>|r
Propably because "Wegschrein Aldfelden" should be "Der Wegschrein von Aldfelden"


Then I compared Justinion's latest version with your latest one.
Here are my test results.


Justinion's latest version (working yes/no):
- Home(Old Mistveil Manor): EN: Yes, DE: Yes
- City (Riften): EN: Yes, DE: No (uses Dungeon costume)
- Adventure (The Rift): EN: Yes, DE: No (uses Dungeon costume)
- Dungeon (Shroud Hearth Barrow): EN: Yes, DE: Yes

Baertram's version (working yes/no):
- Home(Old Mistveil Manor): EN: No (uses Adventure costume), DE: No (does not change at all)
- City (Riften): EN: Yes, DE: No (does not change at all)
- Adventure (The Rift): EN: Yes, DE: No (does not change at all)
- Dungeon (Shroud Hearth Barrow): EN: No (uses Adventure costume), DE: No (does not change at all)


My new de.lua
Code:
--[[
    ###################################################################
    A huge thank you to @iladrion for providing this de_ translation of
    LorePlay!
    ###################################################################
]]--
LorePlay = LorePlay or {}

LorePlay.languageTable = {}
local languageTable = LorePlay.languageTable

function languageTable.CreateZoneToRegionEmotesTable()
    languageTable.zoneToRegionEmotes = {
        ["Auridon"] = LorePlay.defaultEmotesByRegion["ad1"],
        ["Grahtwald"] = LorePlay.defaultEmotesByRegion["ad2"],
        ["Grünschatten"] = LorePlay.defaultEmotesByRegion["ad2"],
        ["Khenarthis Rast"] = LorePlay.defaultEmotesByRegion["ad1"],
        ["Malabal Tor"] = LorePlay.defaultEmotesByRegion["ad2"],
        ["Schnittermark"] = LorePlay.defaultEmotesByRegion["ad2"],
        ["Alik'r-Wüste"] = LorePlay.defaultEmotesByRegion["dc1"],
        ["Bangkorai"] = LorePlay.defaultEmotesByRegion["dc1"],
        ["Betnikh"] = LorePlay.defaultEmotesByRegion["dc2"],
        ["Glenumbra"] = LorePlay.defaultEmotesByRegion["dc2"],
        ["Kluftspitze"] = LorePlay.defaultEmotesByRegion["dc2"],
        ["Sturmhafen"] = LorePlay.defaultEmotesByRegion["dc2"],
        ["Stros M'Kai"] = LorePlay.defaultEmotesByRegion["dc1"],
        ["Bal Foyen"] = LorePlay.defaultEmotesByRegion["ep2"],
        ["Ödfels"] = LorePlay.defaultEmotesByRegion["ep2"],
        ["Deshaan"] = LorePlay.defaultEmotesByRegion["ep2"],
        ["Ostmarsch"] = LorePlay.defaultEmotesByRegion["ep1"],
        ["Rift"] = LorePlay.defaultEmotesByRegion["ep1"],
        ["Schattenfenn"] = LorePlay.defaultEmotesByRegion["ep3"],
        ["Steinfälle"] = LorePlay.defaultEmotesByRegion["ep2"],
        ["Kalthafen"] = LorePlay.defaultEmotesByRegion["ch"],
        ["Kargstein"] = LorePlay.defaultEmotesByRegion["other"],
        ["Cyrodiil"] = LorePlay.defaultEmotesByRegion["ip"],
        ["Die Goldküste"] = LorePlay.defaultEmotesByRegion["other"],
        ["Hews Fluch"] = LorePlay.defaultEmotesByRegion["other"],
        ["Bangkorai"] = LorePlay.defaultEmotesByRegion["dc1"],
        ["Wrothgar"] = LorePlay.defaultEmotesByRegion["other"],
        ["Vvardenfell"] = LorePlay.defaultEmotesByRegion["ep1"],
        ["Trübmoor"] = LorePlay.defaultEmotesByRegion["ep3"],
        ["Sommersend"] = LorePlay.defaultEmotesByRegion["other"],
        ["Das nördliches Elsweyr"] = LorePlay.defaultEmotesByRegion["other"],
        ["Das südliche Elsweyr"] = LorePlay.defaultEmotesByRegion["other"],
    }
end


function languageTable.CreatePlayerTitles()
    languageTable.playerTitles = {
        ["Kaiser"] = "Emperor",
        ["Kaiserin"] = "Empress",
        ["Ehemaliger Kaiser"] = "Former Emperor",
        ["Ehemalige Kaiserin"] = "Former Empress",
        ["Ophidischer Befehlshaber"] = "Ophidian Overlord",
        ["Ophidische Befehlshaberin"] = "Ophidian Overlord",
        ["Retter von Nirn"] = "Savior of Nirn",
        ["Retterin von Nirn"] = "Savior of Nirn",
        ["Schlächter der Daedraherren"] = "Daedric Lord Slayer",
        ["Schlächterin der Daedraherren"] = "Daedric Lord Slayer",
        ["Held von Tamriel"] = "Tamriel Hero",
        ["Heldin von Tamriel"] = "Tamriel Hero",
        ["Champion der Mahlstrom-Arena"] = "Maelstrom Arena Champion",
        ["Champion der Drachenstern-Arena"] = "Dragonstar Arena Champion",
        ["makeloser Eroberer"] = "The Flawless Conqueror",
        ["makelose Eroberin"] = "The Flawless Conqueror"
    }
end

-- STILL NEEDS TRANSLATION
function languageTable.CreateEmotesByCityTable()
    local defaultCityToRegionEmotes = {
        ["AD"] = {
            [1] = 177,
            [2] = 174,
            [3] = 202,
            [4] = 99,
            [5] = 8,
            [6] = 52,
            [7] = 184,
            [8] = 5,
            [9] = 6,
            [10] = 7,
            [11] = 72,
            [12] = 72,
            [13] = 182,
            [14] = 187,
            [15] = 52,
            [16] = 8,
            [17] = 79
        },
        ["EP"] = {
            [1] = 174,
            [2] = 8,
            [3] = 52,
            [4] = 7,
            [5] = 203,
            [6] = 169,
            [7] = 121,
            [8] = 185,
            [9] = 5,
            [10] = 6,
            [11] = 72,
            [12] = 72,
            [13] = 188,
            [14] = 183,
            [15] = 100,
            [16] = 8,
            [17] = 79
        },
        ["DC"] = {
            [1] = 25,
            [2] = 52,
            [3] = 201,
            [4] = 11,
            [5] = 6,
            [6] = 122,
            [7] = 91,
            [8] = 38,
            [9] = 9,
            [10] = 72,
            [11] = 95,
            [12] = 7,
            [13] = 181,
            [14] = 5,
            [15] = 189,
            [16] = 190,
            [17] = 8,
            [18] = 79
        },
        ["Other"] = {
            [1] = 177,
            [2] = 8,
            [3] = 72,
            [4] = 72,
            [5] = 52,
            [6] = 5,
            [7] = 6,
            [8] = 7,
            [9] = 211,
            [10] = 100,
            [11] = 8,
            [12] = 79
        }
    }


    languageTable.defaultEmotesByCity = {
        ["Eldenwurz"] = {
            ["Emotes"] = {
                [1] = 203,
                [2] = 203,
                [3] = 203,
                [4] = 203,
                [5] = 177,
                [6] = 174,
                [7] = 202,
                [8] = 99,
                [9] = 8,
                [10] = 52,
                [11] = 184,
                [12] = 5,
                [13] = 6,
                [14] = 7,
                [15] = 79
            }
        },
        ["Vulkhelwacht"] = { 
            ["Emotes"] = {
                [1] = 174,
                [2] = 8,
                [3] = 38,
                [4] = 191,
                [5] = 210,
                [6] = 11,
                [7] = 121,
                [8] = 52,
                [9] = 9,
                [10] = 91,
                [11] = 182,
                [12] = 5,
                [13] = 6,
                [14] = 7,
                [15] = 79,
                [16] = 8
            }
        },
        ["Gramfeste"] = {
            ["Emotes"] = {
                [1] = 174,
                [2] = 8,
                [3] = 52,
                [4] = 52,
                [5] = 203,
                [6] = 203,
                [7] = 121,
                [8] = 185,
                [9] = 5,
                [10] = 6,
                [11] = 7,
                [12] = 79,
                [13] = 8
            }
        },
        ["Windhelm"] = { 
            ["Emotes"] = {
                [1] = 8,
                [2] = 139,
                [3] = 163,
                [4] = 169,
                [5] = 5,
                [6] = 79,
                [7] = 209,
                [8] = 64,
                [9] = 174,
                [10] = 52,
                [11] = 188,
                [12] = 6,
                [13] = 7,
                [14] = 8
            }
        },
        ["Riften"] = { 
            ["Emotes"] = {
                [1] = 8,
                [2] = 139,
                [3] = 163,
                [4] = 169,
                [5] = 5,
                [6] = 79,
                [7] = 209,
                [8] = 64,
                [10] = 52,
                [11] = 188,
                [12] = 6,
                [13] = 7,
                [14] = 8
            }
        },
        ["Wegesruh"] = {
            ["Emotes"] = {
                [1] = 25,
                [2] = 52,
                [3] = 201,
                [4] = 11,
                [5] = 110,
                [6] = 122,
                [7] = 91,
                [8] = 38,
                [9] = 9,
                [10] = 91,
                [11] = 95,
                [12] = 95,
                [13] = 203,
                [14] = 203,
                [15] = 181,
                [16] = 5,
                [17] = 6,
                [18] = 7,
                [19] = 8,
                [20] = 79
            }
        },
        ["Abahs Landung"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Aldfelden"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Anwil"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Arenthia"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Der Baandari-Handelsposten"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Der Wegschrein des Baandari-Handelspostens"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Belkarth"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Camlorn"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Die Messingfeste"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Dolchsturz"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Das Kastell Dolchsturz"] = {
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Die Kastellstadt von Dolchsturz"] = {
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Das Hafenviertel von Dolchsturz"] = {
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Das Handelsviertel von Dolchsturz"] = {
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Davons Wacht"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Düne"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Ebenherz"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Elinhir"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Immerfort"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Ersthalt"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Hallins Wehr"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Anfurt"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Die Leere Stadt"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Kaiserstadt"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Kozanset"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Kragenmoor"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Kvatch"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Marbruk"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Mistral"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Nordspitz"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Orsinium"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Hundingshafen"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Knurr'kha"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Schildwacht"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Schornhelm"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Silvenar"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Die Audienzhalle des Silvenars"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Sturmfeste"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Tavas Segen"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["DC"]
        },
        ["Himmelswacht"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Waldheim"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Vivec"] = {
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Seyda Neen"] = {
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Balmora"] = {
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Sadrith Mora"] = {
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Lilmoth"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Das Totwasserdorf"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["EP"]
        },
        ["Schimmerheim"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Alinor"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Lillandril"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["AD"]
        },
        ["Krempen"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Stromfeste"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Stiche"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Senchal"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
        ["Die Gezeiteninsel"] = { 
            ["Emotes"] = defaultCityToRegionEmotes["Other"]
        },
    }

    local cityWayshrine
    for i,v in pairs(languageTable.defaultEmotesByCity) do
        cityWayshrine = GetString(SI_DEATH_PROMPT_WAYSHRINE) .. " " .. tostring(i)
        languageTable.defaultEmotesByCity[cityWayshrine] = languageTable.defaultEmotesByCity[i]
    end

end
  Reply With Quote