Localise some strings
His Dad [12-23-14 - 22:50]
diff --git a/Language/en.lua b/Language/en.lua
index 125a808..c1c17c6 100644
--- a/Language/en.lua
+++ b/Language/en.lua
@@ -4,13 +4,16 @@ function CRT.InitialiseLanguage()
CRT.L = {}
-- Settings / Config menu stuff
+ CRL.L["PanelHeading"] = "|c96FF00Craft Research Timer|r Settings"
CRT.L["General Options"] = "|c45D7F7General Options|r"
CRT.L["Keybinds"] = "|c45D7F7Keybinds|r"
- -- Page Titles
+
CRT.L["Clothing"] = "CLOTHING"
CRT.L["BS"] = "BLACKSMITHING"
CRT.L["Woodwork"] = "WOODWORKING"
+ CRT.L["Finished"] ="|cFF0000Finished|r"
+ CRT.L["Completed"] ="Research completed on"
end
diff --git a/lua/ALERT.lua b/lua/ALERT.lua
index 6c82b52..a8cae7e 100644
--- a/lua/ALERT.lua
+++ b/lua/ALERT.lua
@@ -5,8 +5,8 @@
function CRT.Research_Alert(k, id_craft, simcraft, start)
if (start == true) then
for i = 0, 2, 1 do
- local MaxResearch = CRT.SV.data.Craft[k][i]["MaxResearch"]
- local Simu_craft = CRT.SV.data.Craft[k][i]["Simu_craft"]
+ local MaxResearch = CRT.SV.data.Craft[k][i].MaxResearch
+ local Simu_craft = CRT.SV.data.Craft[k][i].Simu_craft
if(Simu_craft < MaxResearch) then
if (i == 0 and CRT.SV.Settings.ALERT.BS == true) then
local msg = "Warning only "..Simu_craft.." / "..MaxResearch.." on Blacksmithing ( "..k.." )"
@@ -24,9 +24,9 @@ function CRT.Research_Alert(k, id_craft, simcraft, start)
-- UPDATE SIMU_CRAFT
- local MaxResearch = CRT.SV.data.Craft[k][id_craft]["MaxResearch"]
- local Simu_craft = CRT.SV.data.Craft[k][id_craft]["Simu_craft"] - 1 -- set new simucraft
- CRT.SV.data.Craft[k][id_craft]["Simu_craft"] = Simu_craft -- save new simucraft
+ local MaxResearch = CRT.SV.data.Craft[k][id_craft].MaxResearch
+ local Simu_craft = CRT.SV.data.Craft[k][id_craft].Simu_craft - 1 -- set new simucraft
+ CRT.SV.data.Craft[k][id_craft].Simu_craft = Simu_craft -- save new simucraft
if (id_craft == 0) then
id_text = "BS_Text"
elseif(id_craft == 1) then
@@ -39,7 +39,7 @@ function CRT.Research_Alert(k, id_craft, simcraft, start)
local Item_name = CRT.SV.data.Craft[k][id_craft][simcraft]["Item_name"]
local Trait_name = CRT.SV.data.Craft[k][id_craft][simcraft]["Trait_name"]
- local msg = "Reseach completed on "..k.." ( "..Item_name.." - "..Trait_name.." )"
+ local msg = CRT.L["Completed"].." "..k.." ( "..Item_name.." - "..Trait_name.." )"
CRT.UI.ALERT_WD:AddMessage(msg,1,0,0)
end
end
@@ -85,7 +85,7 @@ function CRT.ALERT_Update(timestamp)
CRT.SV.data.Craft[CRT.playername]["Start"] = false
CRT.Research_Alert(CRT.playername, nil, nil, true)
for j, _ in pairs(CRT.SV.data.Craft) do
- if ((k ~= CRT.playername) and (CRT.SV.data.Craft[k][0]["Simu_craft"] ~= 0 or CRT.SV.data.Craft[k][1]["Simu_craft"] ~= 0 or CRT.SV.data.Craft[k][2]["Simu_craft"] ~= 0)) then
+ if ((k ~= CRT.playername) and (CRT.SV.data.Craft[k][0]].Simu_craft ~= 0 or CRT.SV.data.Craft[k][1].Simu_craft ~= 0 or CRT.SV.data.Craft[k][2]].Simu_craft ~= 0)) then
CRT.Research_Alert(k, nil, nil, true)
end
end
diff --git a/lua/CRAFT.lua b/lua/CRAFT.lua
index 5b34900..f68c9f6 100644
--- a/lua/CRAFT.lua
+++ b/lua/CRAFT.lua
@@ -149,11 +149,11 @@ function CRT.CRAFT_Update(timestamp)
local title = "error"
if (CRT.SV.Settings.mode == "Text" and id_craft == 0) then
- title = "BLACKSMITHING: "..Simu_craft.." / "..MaxResearch
+ title = CRT.L["BS"] .. " : " .. "Simu_craft.. / "..MaxResearch
elseif (CRT.SV.Settings.mode == "Text" and id_craft == 1) then
- title = "CLOTHING: "..Simu_craft.." / "..MaxResearch
+ title = CRT.L["Clothing"] .. " : "..Simu_craft.." / "..MaxResearch
elseif (CRT.SV.Settings.mode == "Text" and id_craft == 2) then
- title = "WOODWORKING: "..Simu_craft.." / "..MaxResearch
+ title = CRT.L["Woodwork"] .. " : "..Simu_craft.." / "..MaxResearch
elseif (CRT.SV.Settings.mode == "Icon") then
title = " "..Simu_craft.." / "..MaxResearch
end
@@ -179,11 +179,10 @@ function CRT.CRAFT_Update(timestamp)
if (currenttimer > 0) then
CRT.UI.CRAFT_WD[id_craft][simcraft]["text"]:SetHidden(false)
-
CRT.UI.CRAFT_WD[id_craft][simcraft]["text"]:SetText(msg)
- elseif (currenttimer <= 0) then
+ else
CRT.UI.CRAFT_WD[id_craft][simcraft]["text"]:SetHidden(false)
- CRT.UI.CRAFT_WD[id_craft][simcraft]["text"]:SetText("|cFF0000Finished|r")
+ CRT.UI.CRAFT_WD[id_craft][simcraft]["text"]:SetText(CRT.L["Finished"])
end
end
diff --git a/lua/CraftResearchTimer.lua b/lua/CraftResearchTimer.lua
index 9401f1d..03c69d2 100644
--- a/lua/CraftResearchTimer.lua
+++ b/lua/CraftResearchTimer.lua
@@ -45,7 +45,7 @@ function CRT.Init(eventCode, addOnName)
local panelData = {
type = "panel",
name = "Craft Research Timer",
- displayName = "|c96FF00Craft Research Timer|r Settings"
+ displayName=CRT.L["PanelHeading"]
}
local optionsTable = {
diff --git a/lua/GRID.lua b/lua/GRID.lua
index 9ab61ce..24a50b6 100644
--- a/lua/GRID.lua
+++ b/lua/GRID.lua
@@ -232,9 +232,9 @@ function CRT.GRID_Update(timestamp)
if (currenttimer > 0) then
CRT.UI.GRID_WD[k][id_craft][simcraft]["text"]:SetHidden(false)
CRT.UI.GRID_WD[k][id_craft][simcraft]["text"]:SetText(CRT.Converthms(currenttimer))
- elseif (currenttimer <= 0) then
+ else
CRT.UI.GRID_WD[k][id_craft][simcraft]["text"]:SetHidden(false)
- CRT.UI.GRID_WD[k][id_craft][simcraft]["text"]:SetText("|cFF0000Finished|r")
+ CRT.UI.GRID_WD[k][id_craft][simcraft]["text"]:SetText(CRT.L["Finished"])
CRT.UI.GRID_WD[k].label:SetText("|cFF0000" .. string.upper(k) .."|r" )
end
end