Mercurial > wow > mylilpony
diff MyLilPony.lua @ 34:1d9a8aa6d72e
Merging localization work from branch.
author | syzler |
---|---|
date | Sat, 30 Apr 2011 22:26:16 +0000 |
parents | af32bee5a3d1 |
children | 83e9649a6606 |
line wrap: on
line diff
--- a/MyLilPony.lua Sat Apr 30 21:54:01 2011 +0000 +++ b/MyLilPony.lua Sat Apr 30 22:26:16 2011 +0000 @@ -43,7 +43,7 @@ SLASH_MyLilPony2 = "/mlp"; SLASH_MyLilPony3 = "/mylilpony"; - MyLilPony.Log(format("Version %s loaded", MYLILPONY_VERSION)); + MyLilPony.Log(format(L["msgVersionLoaded"], MYLILPONY_VERSION)); MyLilPony.LoadDefaults(); end @@ -53,22 +53,22 @@ function MyLilPony.AutoMount() if UnitIsDead("player") or UnitIsGhost("player") then - MyLilPony.Log("You are dead"); + MyLilPony.Log(L["msgYouAreDead"]); return; end if InCombatLockdown() then - MyLilPony.Log("You are in combat"); + MyLilPony.Log(L["msgYouAreInCombat"]); return; end if IsMounted() and not MyLilPony.AutoDismount then - MyLilPony.Log("You are already mounted"); + MyLilPony.Log(L["msgYouAreMounted"]); return; end if IsMounted() and IsFlying() then - MyLilPony.Log("You are already flying"); + MyLilPony.Log(L["msgYouAreFlying"]); return; end @@ -154,14 +154,14 @@ if unit == "" or unit == nil then unit = "target" end local result = MyLilPony.CallMountByMatch(unit); if not result then - MyLilPony.Log("No matching mounts were found"); + MyLilPony.Log(L["msgNoMatchingMountsFound"]); end elseif MyLilPony.StringMatchIgnoreCase(arg, "^exact .+$") or MyLilPony.StringMatchIgnoreCase(arg, "^x .+$") then local param = MyLilPony.StringMatchIgnoreCase(arg, "^.+ (.+)$"); local result = MyLilPony.CallMountByName(param); if not result then - MyLilPony.Log(format("No matching mounts were found with NAME='%s'", param)); + MyLilPony.Log(format(L["msgNoMatchingMountsForName"], param)); end elseif MyLilPony.StringMatchIgnoreCase(arg, "^list .+$") or MyLilPony.StringMatchIgnoreCase(arg, "^find .+$") @@ -169,36 +169,37 @@ local param = MyLilPony.StringMatchIgnoreCase(arg, "^.+ (.+)$"); local result = MyLilPony.ListMountsByPattern(param); if not result then - MyLilPony.Log(format("No matching mounts were found with NAME like '%s'", param)); + MyLilPony.Log(format(L["msgNoMatchingMountsForPattern"], param)); else for _, name in pairs(result) do MyLilPony.Print(name); end + MyLilPony.Print(format(L["msgCountMatchingMountsForPattern"], #result)); end elseif MyLilPony.StringMatchIgnoreCase(arg, "^%d+$") then local result = MyLilPony.CallMountById(tonumber(arg)); if not result then - MyLilPony.Log(format("No matching mounts were found with ID=%s", arg)); + MyLilPony.Log(format(L["msgNoMatchingMountsForId"], arg)); end elseif MyLilPony.StringMatchIgnoreCase(arg, "^.+$") then local result = MyLilPony.CallMountByPattern(arg); if not result then - MyLilPony.Log(format("No matching mounts were found with NAME like '%s'", arg)); + MyLilPony.Log(format(L["msgNoMatchingMountsForPattern"], arg)); end else MyLilPony.Print(format("MyLilPony %s", MYLILPONY_VERSION)); - MyLilPony.Print("Slash Command: /mylilpony (/pony, /mlp)"); - MyLilPony.Print(" /mylilpony auto - Summons a \"suitable\" mount"); - MyLilPony.Print(" /mylilpony random - Summons random mount"); - MyLilPony.Print(" /mylilpony ground - Summons random ground mount"); - MyLilPony.Print(" /mylilpony flying - Summons random flying mount"); - MyLilPony.Print(" /mylilpony aquatic - Summons random aquatic mount"); - MyLilPony.Print(" /mylilpony match - Summons same mount as targeted unit"); - MyLilPony.Print(" /mylilpony [@<UNITID>] match - Summons same mount as specified unit"); - MyLilPony.Print(" /mylilpony list <NAME> - Lists mounts matching name"); - MyLilPony.Print(" /mylilpony exact <NAME> - Summons mount by exact name"); - MyLilPony.Print(" /mylilpony <ID> - Summons mount by spell or creature ID"); - MyLilPony.Print(" /mylilpony <NAME> - Summons random mount matching name"); + MyLilPony.Print(L["szCommandHelp"].." (/mylilpony, /pony, /mlp)"); + MyLilPony.Print(" /mylilpony auto - "..L["msgHelpCommandAuto"]); + MyLilPony.Print(" /mylilpony random - "..L["msgHelpCommandRandom"]); + MyLilPony.Print(" /mylilpony ground - "..L["msgHelpCommandGround"]); + MyLilPony.Print(" /mylilpony flying - "..L["msgHelpCommandFlying"]); + MyLilPony.Print(" /mylilpony aquatic - "..L["msgHelpCommandAquatic"]); + MyLilPony.Print(" /mylilpony match - "..L["msgHelpCommandTarget"]); + MyLilPony.Print(" /mylilpony [@<UNITID>] match - "..L["msgHelpCommandMatch"]); + MyLilPony.Print(" /mylilpony list <NAME> - "..L["msgHelpCommandList"]); + MyLilPony.Print(" /mylilpony exact <NAME> - "..L["msgHelpCommandExact"]); + MyLilPony.Print(" /mylilpony <ID> - "..L["msgHelpCommandId"]); + MyLilPony.Print(" /mylilpony <NAME> - "..L["msgHelpCommandName"]); end end