|
11/04/19, 05:51 AM | #1 |
Help with "LorePlay" addon - German
Hello,
the addon "LorePlay" by Justinon is discontinued and I cannot ask him for help. With the English client the addon works fine but with the German client it does not recognize if one is in a specific city or region. I attach Justinon's English locales lua for regions and cities, his original German one and my translations. There is only one difference to the English language lua which I can see. English Justinon: Code:
-- Add Wayshrines local temp = {} for i,v in pairs(languageTable.defaultEmotesByCity) do local cityWayshrine = i.." Wayshrine" temp[i] = languageTable.defaultEmotesByCity[i] temp[cityWayshrine] = languageTable.defaultEmotesByCity[i] end languageTable.defaultEmotesByCity = temp Code:
local cityWayshrine for i,v in pairs(languageTable.defaultEmotesByCity) do cityWayshrine = i.." Wayshrine" languageTable.defaultEmotesByCity[cityWayshrine] = languageTable.defaultEmotesByCity[i] end Code:
local cityWayshrine for i,v in pairs(languageTable.defaultEmotesByCity) do cityWayshrine = "Der Wegschrein von "..i languageTable.defaultEmotesByCity[cityWayshrine] = languageTable.defaultEmotesByCity[i] end |
|
11/04/19, 06:29 AM | #2 |
At least for the zones:
I'd recommand you to switch to LibZone and use the unique zoneIds instead of the translated names, so you are not dependent on any texts anymore. The lib provides API functions to get the zoneNames in multilanguages (de, em, fr, ru) already + the zoneIds and indices + parentZone IDs. LibSets e.g. provides wayshrine data (wayshrine node indices) for maps/zone if you need them. Edit: Did not read the sentence you are not familiar with the code, sorry. |
|
11/04/19, 06:51 AM | #3 |
Hello Baertram,
thanks for the reply! That sounds good but I fear this is a little too much for my little knowledge. Do you have any idea why Justinion's German locales don't work? |
|
11/04/19, 10:09 AM | #4 |
Sorry, got currently no time to check this
Maybe in the future. Edit: Checked the code at a glance, try this: Lua Code:
Last edited by Baertram : 11/04/19 at 10:41 AM. |
|
11/04/19, 10:58 AM | #5 |
Schau mal in deine übersetzte Datei.
Da sind weiter unten unter der Zeile hier noch Städte Namen in der defaults Tabelle auf Englisch. Die müssen vermutlich auch korrekt übersetzt sein und identisch mit deiner Tabelle weiter oben: Lua Code:
|
|
11/04/19, 11:30 AM | #6 |
Try to use this version as base for your changes please.
I've removed bundled old libraries and added LibEventHandler with version 1.3 (without LibStub), removed the total global varioables and added then to the addon's namespace LorePlay instead. -> Variables like "Heads" or "Costume" will most likley be overwritten by other addons ... LorePlay v1.60 Baertram -> Currently investigating a few found errors! -> Okay, free for download now! Should work now! The German translations base on your file, but the non-translated zone names (see my pst before) are still needed to be done. If you want to test it with your local file be sure to rename it to de.lua and add the following inside your file at the top Code:
--[[ ################################################################### A huge thank you to @iladrion for providing this de_ translation of LorePlay! ################################################################### ]]-- LorePlay = LorePlay or {} LorePlay.languageTable = {} local languageTable = LorePlay.languageTable Code:
LorePlay = LorePlay or {} LorePlay.languageTable = {} local languageTable = LorePlay.languageTable Last edited by Baertram : 11/04/19 at 01:37 PM. |
|
11/04/19, 01:18 PM | #7 |
Hello Baertram,
thank you so much! I will rework the translations and test it tomorrow with your changes . |
|
11/04/19, 01:38 PM | #8 |
Be sure to download the link AGAIN as I've updated it this evening to fix some errors I had overseen.
The file structure changed so PLEASE delete the old folder completely and use the one from the zip file download link! Removed files: Code:
code/LPCategoryStrings.lua Code:
code/basics.lua |
|
11/05/19, 08:00 AM | #9 |
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 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 |
|
11/05/19, 09:03 AM | #10 |
Hm not using the addon and really got no time to invest more into this, sorry.
If the chanegd version does not work properly anymore try to rename the EN's file loop for the wayshrines again so it uses the "Wayshrine " .. i again. If this does not help I must say: I do not know without having to get infos how to test and then find the time to test and fix -> Which I'm not willing to atm. Please ask for someone playing roleplay and using the addon to fix this. Thanks for your understanding. |
|
11/05/19, 11:10 AM | #11 |
Hello Baertram,
I completely understand you don't have the time for further investigations but anyhow, thanks alot for looking into this |
|
ESOUI » Developer Discussions » Lua/XML Help » Help with "LorePlay" addon - German |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|