core: add translations to all texts

This commit is contained in:
shikulja
2024-01-25 23:20:32 +01:00
committed by shagu
parent a07351c4ea
commit fd56ed9192
40 changed files with 340 additions and 112 deletions
+8 -7
View File
@@ -1,10 +1,11 @@
local _G = ShaguTweaks.GetGlobalEnv()
local T = ShaguTweaks.T
local module = ShaguTweaks:register({
title = "WorldMap Coordinates",
description = "Adds coordinates to the bottom of the World Map.",
title = T["WorldMap Coordinates"],
description = T["Adds coordinates to the bottom of the World Map."],
expansions = { ["vanilla"] = true, ["tbc"] = true },
category = "World & MiniMap",
category = T["World & MiniMap"],
enabled = nil,
})
@@ -49,15 +50,15 @@ module.enable = function(self)
local px, py = GetPlayerMapPosition("player")
if px > 0 and py > 0 then
WorldMapButton.player.text:SetText(string.format('|cffffcc00Player: |r%.1f / %.1f', px*100, py*100))
WorldMapButton.player.text:SetText(string.format('|cffffcc00' .. T['Player:'] .. ' |r%.1f / %.1f', px*100, py*100))
else
WorldMapButton.player.text:SetText(string.format('|cffffcc00Player: |rN/A'))
WorldMapButton.player.text:SetText(string.format('|cffffcc00' .. T['Player:'] .. ' |r' .. T['N/A']))
end
if MouseIsOver(WorldMapButton) then
WorldMapButton.coords.text:SetText(string.format('|cffffcc00Cursor: |r%.1f / %.1f', mx, my))
WorldMapButton.coords.text:SetText(string.format('|cffffcc00' .. T['Cursor:'] .. ' |r%.1f / %.1f', mx, my))
else
WorldMapButton.coords.text:SetText(string.format('|cffffcc00Cursor: |rN/A'))
WorldMapButton.coords.text:SetText(string.format('|cffffcc00' .. T['Cursor:'] .. ' |r' .. T['N/A']))
end
end)
end