Added en lang file,
His Dad [12-22-14 - 19:12]
Added en lang file,
Trailing space removal
diff --git a/CraftResearchTimer.txt b/CraftResearchTimer.txt
index dc8b3a5..09065de 100644
--- a/CraftResearchTimer.txt
+++ b/CraftResearchTimer.txt
@@ -1,18 +1,21 @@
-## Title: |c96FF00Craft Research Timer|r - |c96FF000.4.11|r
-## APIVersion: 100010
-## SavedVariables: CraftResearchTimer_SavedVariables
-## Version: 0.4.11
-## Author: @aTo (EU) + Patch by @GarulfoX
-
-lib\LibStub.lua
-
-lua\header.lua
-lua\CORE.lua
-lua\ALERT.lua
-lua\GRID.lua
-lua\CRAFT.lua
-lua\CraftResearchTimer.lua
-lua\Menu-function.lua
-
-xml\Bindings.xml
-xml\CraftResearchTimer.xml
+## Title: |c96FF00Craft Research Timer|r - |c96FF000.4.11|r
+## APIVersion: 100010
+## SavedVariables: CraftResearchTimer_SavedVariables
+## Version: 0.4.11
+## Author: @aTo (EU) + Patch by @GarulfoX
+
+lib\LibStub.lua
+
+lua\header.lua
+lua\CORE.lua
+lua\ALERT.lua
+lua\GRID.lua
+lua\CRAFT.lua
+lua\CraftResearchTimer.lua
+lua\Menu-function.lua
+
+xml\Bindings.xml
+xml\CraftResearchTimer.xml
+
+Language/en.lua
+Language/$(language).lua
diff --git a/Language/en.lua b/Language/en.lua
new file mode 100644
index 0000000..125a808
--- /dev/null
+++ b/Language/en.lua
@@ -0,0 +1,16 @@
+-- Language file: ENGLISH
+
+function CRT.InitialiseLanguage()
+ CRT.L = {}
+
+ -- Settings / Config menu stuff
+ 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"
+
+end
diff --git a/lua/CraftResearchTimer.lua b/lua/CraftResearchTimer.lua
index ad9e8aa..0fe2336 100644
--- a/lua/CraftResearchTimer.lua
+++ b/lua/CraftResearchTimer.lua
@@ -18,22 +18,23 @@ function CRT.Init(eventCode, addOnName)
if(addOnName == CRT.name) then
CRT.Init_done = false
CRT.playername = GetUnitName("player")
-
+
-- SavedVariables
CRT.SV.Settings = ZO_SavedVars:New(CRT.svName, CRT.svVersion*100, nil, CRT.svDefaults, nil)
CRT.SV.data = ZO_SavedVars:NewAccountWide(CRT.svName, 1, nil, CRT.data_defaults,nil )
-
+ CRT.InitialiseLanguage()
--get rid of bad "version" key from CRT releases prior to this one
-- CRT.SV.data.Craft.versionx = nil
-- CRT.SV.Hireling_data.versionxx = nil
-
+
-- Slash commands
SLASH_COMMANDS[CRT.cmdsetup] = CRT.CommandText_setup
-
+
-- Default sort
CRT.SortFunction = SortTimeA
-
-
+
+
+
-- Create Keybinds
ZO_CreateStringId("SI_BINDING_NAME_CRT_ToggleUI", "|c96FF00Toggle craft windows|r")
ZO_CreateStringId("SI_BINDING_NAME_CRT_toggleGRID", "|c96FF00Toggle GRID|r")
@@ -417,13 +418,13 @@ function CRT.toggleGUI()
end
end
end
-
+
local hide0 ={}
hide0[0] = CRT.SV.Settings.BS.Hide_0
hide0[1] = CRT.SV.Settings.CL.Hide_0
hide0[2] = CRT.SV.Settings.WO.Hide_0
-
-
+
+
if (hide0[id_craft] == true and hidemenu[id_craft] ~= "Toggle keybind" and CRT.SV.data.Craft[CRT.playername][id_craft]["Simu_craft"] == 0) then
CRT.UI.CRAFT_TLW[id_craft]:SetHidden(true)
end
@@ -490,18 +491,18 @@ function CRT.Save_position(id_craft)
elseif (id_craft == "ALERT") then
CRT.SV.Settings.ALERT.offset.X = math.floor(CRT.UI.ALERT_TLW:GetLeft())
CRT.SV.Settings.ALERT.offset.Y = math.floor(CRT.UI.ALERT_TLW:GetTop())
- end
+ end
end
function CRT.CommandText_setup(lparam)
- if (lparam == "info") then
+ if (lparam == "info") then
d("Craft Research Timer (CRT) by @aTo (EU)")
d("Version " .. CRT.version)
d("The CRT have moved to the normal game settings")
d("Player: " .. CRT.playername)
- d("Shortest: " .. CRT.Converthms(CRT.SV.data.Craft[CRT.playername].shortest))
+ d("Shortest: " .. CRT.Converthms(CRT.SV.data.Craft[CRT.playername].shortest))
elseif (lparam == "grid") then
CRT.toggleGRID()
elseif (lparam == "sortA") then