diff --git a/Localization.enUS.lua b/Localization.enUS.lua
index af05183..4465217 100644
--- a/Localization.enUS.lua
+++ b/Localization.enUS.lua
@@ -1,6 +1,8 @@
--Localization.enUS.lua
TomTomLocals = {
+ ["%s (%.2f, %.2f)"] = "%s (%.2f, %.2f)",
+ ["%s yards away"] = "%s yards away",
["Accept waypoints from guild and party members"] = "Accept waypoints from guild and party members",
["Allow control-right clicking on map to create new waypoint"] = "Allow control-right clicking on map to create new waypoint",
["Are you sure you would like to remove ALL TomTom waypoints?"] = "Are you sure you would like to remove ALL TomTom waypoints?",
@@ -28,6 +30,8 @@ TomTomLocals = {
["Enable world map waypoints"] = "Enable world map waypoints",
["Enables a floating block that displays your current position in the current zone"] = "Enables a floating block that displays your current position in the current zone",
["Font size"] = "Font size",
+ ["Found %d possible matches for zone %s. Please be more specific"] = "Found %d possible matches for zone %s. Please be more specific",
+ ["Found multiple matches for zone '%s'. Did you mean: %s"] = "Found multiple matches for zone '%s'. Did you mean: %s",
["General Options"] = "General Options",
["Good color"] = "Good color",
["Lock coordinate block"] = "Lock coordinate block",
@@ -63,6 +67,7 @@ TomTomLocals = {
["The color to be displayed when you are moving in the opposite direction of the active waypoint"] = "The color to be displayed when you are moving in the opposite direction of the active waypoint",
["The display of the coordinate block can be customized by changing the options below."] = "The display of the coordinate block can be customized by changing the options below.",
["The floating waypoint arrow can change color depending on whether or nor you are facing your destination. By default it will display green when you are facing it directly, and red when you are facing away from it. These colors can be changed in this section. Setting these options to the same color will cause the arrow to not change color at all"] = "The floating waypoint arrow can change color depending on whether or nor you are facing your destination. By default it will display green when you are facing it directly, and red when you are facing away from it. These colors can be changed in this section. Setting these options to the same color will cause the arrow to not change color at all",
+ ["There were no waypoints to remove in %s"] = "There were no waypoints to remove in %s",
["This option will not remove any waypoints that are currently set to persist, but only effects new waypoints that get set"] = "This option will not remove any waypoints that are currently set to persist, but only effects new waypoints that get set",
["This setting will control the distance at which the waypoint arrow switches to a downwards arrow, indicating you have arrived at your destination"] = "This setting will control the distance at which the waypoint arrow switches to a downwards arrow, indicating you have arrived at your destination",
["TomTom"] = "TomTom",
@@ -73,16 +78,24 @@ TomTomLocals = {
["TomTom can hide waypoints in other zones, this setting toggles that functionality"] = "TomTom can hide waypoints in other zones, this setting toggles that functionality",
["TomTom provides an arrow that can be placed anywhere on the screen. Similar to the arrow in \"Crazy Taxi\" it will point you towards your next waypoint"] = "TomTom provides an arrow that can be placed anywhere on the screen. Similar to the arrow in \"Crazy Taxi\" it will point you towards your next waypoint",
["TomTom provides you with a floating coordinate display that can be used to determine your current position. These options can be used to enable or disable this display, or customize the block's display."] = "TomTom provides you with a floating coordinate display that can be used to determine your current position. These options can be used to enable or disable this display, or customize the block's display.",
+ ["TomTom waypoint"] = "TomTom waypoint",
["TomTom's saved variables are organized so you can have shared options across all your characters, while having different sets of waypoints for each. These options sections allow you to change the saved variable configurations so you can set up per-character options, or even share waypoints between characters"] = "TomTom's saved variables are organized so you can have shared options across all your characters, while having different sets of waypoints for each. These options sections allow you to change the saved variable configurations so you can set up per-character options, or even share waypoints between characters",
["Waypoint Arrow"] = "Waypoint Arrow",
["Waypoint Options"] = "Waypoint Options",
["Waypoint communication"] = "Waypoint communication",
+ ["Waypoint from %s"] = "Waypoint from %s",
["Waypoints can be automatically cleared when you reach them. This slider allows you to customize the distance in yards that signals your \"arrival\" at the waypoint. A setting of 0 turns off the auto-clearing feature\n\nChanging this setting only takes effect after reloading your interface."] = "Waypoints can be automatically cleared when you reach them. This slider allows you to customize the distance in yards that signals your \"arrival\" at the waypoint. A setting of 0 turns off the auto-clearing feature\n\nChanging this setting only takes effect after reloading your interface.",
["Waypoints profile"] = "Waypoints profile",
["When a new waypoint is added, TomTom can automatically set the new waypoint as the \"Crazy Arrow\" waypoint."] = "When a new waypoint is added, TomTom can automatically set the new waypoint as the \"Crazy Arrow\" waypoint.",
["World Map"] = "World Map",
["Yes"] = "Yes",
["\"Arrival Distance\""] = "\"Arrival Distance\"",
+ ["|cffffff78/way <x> <y> [desc]|r - Adds a waypoint at x,y with descrtiption desc"] = "|cffffff78/way <x> <y> [desc]|r - Adds a waypoint at x,y with descrtiption desc",
+ ["|cffffff78/way <zone> <x> <y> [desc]|r - Adds a waypoint at x,y in zone with description desc"] = "|cffffff78/way <zone> <x> <y> [desc]|r - Adds a waypoint at x,y in zone with description desc",
+ ["|cffffff78/way reset <zone>|r - Resets all waypoints in zone"] = "|cffffff78/way reset <zone>|r - Resets all waypoints in zone",
+ ["|cffffff78/way reset all|r - Resets all waypoints"] = "|cffffff78/way reset all|r - Resets all waypoints",
+ ["|cffffff78TomTom |r/way |cffffff78Usage:|r"] = "|cffffff78TomTom |r/way |cffffff78Usage:|r",
+ ["|cffffff78TomTom|r: Added '%s' (sent from %s) to zone %s"] = "|cffffff78TomTom|r: Added '%s' (sent from %s) to zone %s",
}
setmetatable(TomTomLocals, {__index=function(t,k) rawset(t, k, k); return k; end})
diff --git a/TomTom.lua b/TomTom.lua
index 4b4ea6f..e61326d 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -278,7 +278,8 @@ function WorldMapButton_OnClick(...)
end
end
-WorldMapMagnifyingGlassButton:SetText(ZOOM_OUT_BUTTON_TEXT .. "\n" .. L["Ctrl+Right Click To Add a Waypoint"])
+local oldText = WorldMapMagnifyingGlassButton:GetText()
+WorldMapMagnifyingGlassButton:SetText(oldText .. "\n" .. L["Ctrl+Right Click To Add a Waypoint"])
local function WaypointCallback(event, arg1, arg2, arg3)
if event == "OnDistanceArrive" then
@@ -286,11 +287,11 @@ local function WaypointCallback(event, arg1, arg2, arg3)
elseif event == "OnTooltipShown" then
local tooltip = arg1
if arg3 then
- tooltip:SetText("TomTom waypoint")
- tooltip:AddLine(string.format("%s yards away", math.floor(arg2)), 1, 1 ,1)
+ tooltip:SetText(L["TomTom waypoint"])
+ tooltip:AddLine(string.format(L["%s yards away"], math.floor(arg2)), 1, 1 ,1)
tooltip:Show()
else
- tooltip.lines[2]:SetFormattedText("%s yards away", math.floor(arg2), 1, 1, 1)
+ tooltip.lines[2]:SetFormattedText(L["%s yards away"], math.floor(arg2), 1, 1, 1)
end
end
end
@@ -327,7 +328,7 @@ local dropdown_info = {
func = function()
local uid = TomTom.dropdown.uid
local data = waypoints[uid]
- TomTom:SetCrazyArrow(uid, TomTom.profile.arrow.arrival, data.title or "TomTom waypoint")
+ TomTom:SetCrazyArrow(uid, TomTom.profile.arrow.arrival, data.title or L["TomTom waypoint"])
end,
},
{
@@ -499,13 +500,14 @@ function TomTom:CHAT_MSG_ADDON(event, prefix, data, channel, sender)
local zone,coord,title = string.split(":", data)
if not title:match("%S") then
- title = "Waypoint from " .. sender
+ title = string.format(L["Waypoint from %s"], sender)
end
local c,z = self:GetCZ(zone)
local x,y = self:GetXY(tonumber(coord))
self:AddZWaypoint(c, z, x*100, y*100, title)
- ChatFrame1:AddMessage("|cffffff78TomTom|r: Added '" .. title .. "' (sent from " .. sender .. ") to zone " .. zone)
+ local msg = string.format(L["|cffffff78TomTom|r: Added '%s' (sent from %s) to zone %s"], title, sender, zone)
+ ChatFrame1:AddMessage(msg)
end
--[[-------------------------------------------------------------------
@@ -519,9 +521,9 @@ end
local function _both_tooltip_show(event, tooltip, uid, dist)
local data = waypoints[uid]
- tooltip:SetText(data.title or "TomTom waypoint")
- tooltip:AddLine(string.format("%s yards away", math.floor(dist)), 1, 1, 1)
- tooltip:AddLine(string.format("%s (%.2f, %.2f)", data.zone, data.x, data.y), 0.7, 0.7, 0.7)
+ tooltip:SetText(data.title or L["TomTom waypoint"])
+ tooltip:AddLine(string.format(L["%s yards away"], math.floor(dist)), 1, 1, 1)
+ tooltip:AddLine(string.format(L["%s (%.2f, %.2f)"], data.zone, data.x, data.y), 0.7, 0.7, 0.7)
tooltip:Show()
end
@@ -542,7 +544,7 @@ local function _world_tooltip_show(event, tooltip, uid, dist)
end
local function _both_tooltip_update(event, tooltip, uid, dist)
- tooltip.lines[2]:SetFormattedText("%s yards away", math.floor(dist), 1, 1, 1)
+ tooltip.lines[2]:SetFormattedText(L["%s yards away"], math.floor(dist), 1, 1, 1)
end
local function _both_clear_distance(event, uid, range, distance, lastdistance)
@@ -631,7 +633,6 @@ function TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world)
tooltip_show = _world_tooltip_show,
tooltip_update = _both_tooltip_show,
},
- remove = _remove,
distance = {
},
}
@@ -800,11 +801,11 @@ do
end
local function usage()
- ChatFrame1:AddMessage("|cffffff78TomTom |r/way |cffffff78Usage:|r")
- ChatFrame1:AddMessage("|cffffff78/way <x> <y> [desc]|r - Adds a waypoint at x,y with descrtiption desc")
- ChatFrame1:AddMessage("|cffffff78/way <zone> <x> <y> [desc]|r - Adds a waypoint at x,y in zone with description desc")
- ChatFrame1:AddMessage("|cffffff78/way reset all|r - Resets all waypoints")
- ChatFrame1:AddMessage("|cffffff78/way reset <zone>|r - Resets all waypoints in zone")
+ ChatFrame1:AddMessage(L["|cffffff78TomTom |r/way |cffffff78Usage:|r"])
+ ChatFrame1:AddMessage(L["|cffffff78/way <x> <y> [desc]|r - Adds a waypoint at x,y with descrtiption desc"])
+ ChatFrame1:AddMessage(L["|cffffff78/way <zone> <x> <y> [desc]|r - Adds a waypoint at x,y in zone with description desc"])
+ ChatFrame1:AddMessage(L["|cffffff78/way reset all|r - Resets all waypoints"])
+ ChatFrame1:AddMessage(L["|cffffff78/way reset <zone>|r - Resets all waypoints in zone"])
end
local zlist = {}
@@ -841,7 +842,8 @@ SlashCmdList["WAY"] = function(msg)
end
if #matches > 5 then
- ChatFrame1:AddMessage("Found " .. #matches .. " possible matches for zone '" .. tokens[2] .. "'. Please be more specific.")
+ local msg = string.format(L["Found %d possible matches for zone %s. Please be more specific"], #matches, tokens[2])
+ ChatFrame1:AddMessage(msg)
return
elseif #matches > 1 then
local poss = {}
@@ -850,7 +852,7 @@ SlashCmdList["WAY"] = function(msg)
end
table.sort(poss)
- ChatFrame1:AddMessage("Found multiple matches for zone '" .. tokens[2] .. "'. Did you mean: " .. table.concat(poss, ", "))
+ ChatFrame1:AddMessage(string.format(L["Found multiple matches for zone '%s'. Did you mean: %s"], tokens[2], table.concat(poss, ", ")))
return
end
@@ -861,7 +863,7 @@ SlashCmdList["WAY"] = function(msg)
TomTom:RemoveWaypoint(uid)
end
else
- ChatFrame1:AddMessage("There were no waypoints to remove in " .. name)
+ ChatFrame1:AddMessage(L["There were no waypoints to remove in %s"]:format(name))
end
end
elseif tokens[1] and not tonumber(tokens[1]) then
@@ -891,7 +893,8 @@ SlashCmdList["WAY"] = function(msg)
end
if #matches ~= 1 then
- ChatFrame1:AddMessage("Found " .. #matches .. " possible matches for zone '" .. tokens[1] .. "'. Please be more specific.")
+ local msg = string.format(L["Found %d possible matches for zone %s. Please be more specific"], #matches, tokens[1])
+ ChatFrame1:AddMessage(msg)
return
end