Added some more localisation.
hisdad [12-12-14 - 02:09]
Added some more localisation.
diff --git a/AIResearchGrid.lua b/AIResearchGrid.lua
index 7bf8895..0e001e5 100644
--- a/AIResearchGrid.lua
+++ b/AIResearchGrid.lua
@@ -10,7 +10,7 @@ AIRG.name = "AIResearchGrid"
AIRG.version = "3.1.5"
AIRG.initialised = false
AIRG.processing = false
-AIRG.all = " #ALL" -- displayname for Virtual character
+AIRG.all = " #ALL" -- Default displayname for Virtual character, overrwritten by Localised version
AIRG.ShowRelative = false -- State of Button
AIRG.relative= {}
AIRG.L = {} -- declare language strings
@@ -130,6 +130,7 @@ function AIRG.initUI()
-- CREATE BUTTON FOR "Update Other" AT TOP_RIGHT
--AIRG.UI.btnUpdateOther = WINDOW_MANAGER:CreateControl("AIResearchGridButtonUpdateOther", AIResearchGrid, CT_BUTTON)
AIRG.UI.btnUpdateOther = WINDOW_MANAGER:CreateControlFromVirtual("AIResearchGridButtonUpdateOther", AIResearchGrid, "ZO_DefaultButton")
+ --Attempt to adjust button size to content, but units are different. May not be fixable. leave for meantime.
local textlen = 0
if string.len(AIRG.L["btnRelativeOn"]) > string.len(AIRG.L["btnRelativeOff"])
then textlen = string.len(AIRG.L["btnRelativeOn"])
@@ -710,16 +711,17 @@ function AIRG.Initialise(eventCode, addOnName)
-- Load the saved variables
AIRG.vars = ZO_SavedVars:NewAccountWide("AIRG_SavedVariables", 2, nil, AIRG.defaults)
-
+ AIRG.all = AIRG.L["All"] -- replace Default with localise string
+
-- Register Keybinding
ZO_CreateStringId("SI_BINDING_NAME_TOGGLE_AIRG", "Toggle AI Research Grid")
-- Set-up some variables we'll want to refer to.
AIRG.craftNames = {}
AIRG.relative = {}
- AIRG.craftNames[CRAFTING_TYPE_BLACKSMITHING] = "BLACKSMITHING"
- AIRG.craftNames[CRAFTING_TYPE_CLOTHIER] = "CLOTHING"
- AIRG.craftNames[CRAFTING_TYPE_WOODWORKING] = "WOODWORKING"
+ AIRG.craftNames[CRAFTING_TYPE_BLACKSMITHING] = AIRG.L["BS"]
+ AIRG.craftNames[CRAFTING_TYPE_CLOTHIER] = AIRG.L["Clothing"]
+ AIRG.craftNames[CRAFTING_TYPE_WOODWORKING] = AIRG.L["Woodwork"]
AIRG.curCraft= CRAFTING_TYPE_WOODWORKING
AIRG.playerName = GetUnitName("player")
AIRG.curCharacter = GetUnitName("player") -- Default the display to the current character
diff --git a/Language/en.lua b/Language/en.lua
index 045bec5..073a2d0 100644
--- a/Language/en.lua
+++ b/Language/en.lua
@@ -20,6 +20,15 @@ function AIRG.InitialiseLanguage()
AIRG.L["DeleteTrue"] = "|c8080ffAI Research Grid|r: Deleted character data for "
+
AIRG.L["btnRelativeOff"] = "Set Relative to:"
AIRG.L["btnRelativeOn"] = "|c4AFF6ERelative to:|r"
+
+ AIRG.L["ALL"] = " #ALL"
+
+ -- Page Titles
+ AIRG.L["Clothing"] = "CLOTHING"
+ AIRG.L["BS"] = "BLACKSMITHING"
+ AIRG.L["Woodwork"] = "WOODWORKING"
+
end
\ No newline at end of file