"Updated locale files and command registrations to use localized strings; modified environment detection logic to include retail build."

CiscOH Bellic 2 years ago
parent 93fda2da61
commit bd8b1f57d3
  1. 20
      scripts/Locales/enUS/enUS.lua
  2. 2
      src/Environment/Environment.lua
  3. 34
      src/_bastion.lua

@ -2,6 +2,24 @@ local Tinkr, Bastion = ...
local L = Bastion.Locale:NewLocale("Bastion", "enUS", true)
L["Tinkr"] = true
L["Available commands:"] = true
L["[MythicPlusUtils] Unknown command"] = true
L["Bastion"] = true
L["Cast logging "] = true
L["Debuff logging "] = true
L["Debug mode disabled"] = true
L["Debug mode enabled"] = true
L["Disabled"] = true
L["Dump spells to a file"] = true
L["Enabled"] = true
L["Module not found"] = true
L["Tinkr"] = true
L["Toggle a module on/off"] = true
L["Toggle bastion on/off"] = true
L["Toggle debug mode on/off"] = true
L["Toggle m+ module on/off"] = true
L["Toggle trace mode on/off"] = true
L["Trace mode disabled"] = true
L["Trace mode enabled"] = true

@ -23,7 +23,7 @@ local IsAddOnLoaded = IsAddOnLoaded or nil
local buildNum = select(4, GetBuildInfo())
local buildName = "CLASSIC"
if buildNum > 110000 then
if buildNum >= 110000 then
buildName = "RETAIL"
elseif buildNum > 40000 then
buildName = "CATA"

@ -245,7 +245,7 @@ end
local Command = Bastion.Command:New('bastion')
Command:Register('toggle', 'Toggle bastion on/off', function()
Command:Register('toggle', L["Toggle bastion on/off"], function()
Bastion.Enabled = not Bastion.Enabled
if Bastion.Enabled then
Bastion:Print("Enabled")
@ -254,25 +254,25 @@ Command:Register('toggle', 'Toggle bastion on/off', function()
end
end)
Command:Register('debug', 'Toggle debug mode on/off', function()
Command:Register('debug', L["Toggle debug mode on/off"], function()
Bastion.DebugMode = not Bastion.DebugMode
if Bastion.DebugMode then
Bastion:Print("Debug mode enabled")
Bastion:Print(L["Debug mode enabled"])
else
Bastion:Print("Debug mode disabled")
Bastion:Print(L["Debug mode disabled"])
end
end)
Command:Register('trace', 'Toggle trace mode on/off', function()
Command:Register('trace', L["Toggle trace mode on/off"], function()
Bastion.TraceMode = not Bastion.TraceMode
if Bastion.TraceMode then
Bastion:Print("Trace mode enabled")
Bastion:Print(L["Trace mode enabled"])
else
Bastion:Print("Trace mode disabled")
Bastion:Print(L["Trace mode disabled"])
end
end)
Command:Register('dumpspells', 'Dump spells to a file', function()
Command:Register('dumpspells', L["Dump spells to a file"], function()
local i = 1
local rand = math.random(100000, 999999)
while true do
@ -295,36 +295,36 @@ Command:Register('dumpspells', 'Dump spells to a file', function()
end
end)
Command:Register('module', 'Toggle a module on/off', function(args)
Command:Register('module', L["Toggle a module on/off"], function(args)
local module = Bastion:FindModule(args[2])
if module then
module:Toggle()
if module.enabled then
Bastion:Print("Enabled", module.name)
Bastion:Print(L["Enabled"], module.name)
else
Bastion:Print("Disabled", module.name)
Bastion:Print(L["Disabled"], module.name)
end
else
Bastion:Print("Module not found")
Bastion:Print(L["Module not found"])
end
end)
Command:Register('mplus', 'Toggle m+ module on/off', function(args)
Command:Register('mplus', L["Toggle m+ module on/off"], function(args)
local cmd = args[2]
if cmd == 'debuffs' then
Bastion.MythicPlusUtils:ToggleDebuffLogging()
Bastion:Print("Debuff logging", Bastion.MythicPlusUtils.debuffLogging and "enabled" or "disabled")
Bastion:Print(L["Debuff logging "], Bastion.MythicPlusUtils.debuffLogging and L["Enabled"] or L["Disabled"])
return
end
if cmd == 'casts' then
Bastion.MythicPlusUtils:ToggleCastLogging()
Bastion:Print("Cast logging", Bastion.MythicPlusUtils.castLogging and "enabled" or "disabled")
Bastion:Print(L["Cast logging "], Bastion.MythicPlusUtils.castLogging and L["Enabled"] or L["Disabled"])
return
end
Bastion:Print("[MythicPlusUtils] Unknown command")
Bastion:Print("Available commands:")
Bastion:Print(L["[MythicPlusUtils] Unknown command"])
Bastion:Print(L["Available commands:"] )
Bastion:Print("debuffs")
Bastion:Print("casts")
end)

Loading…
Cancel
Save