diff main.lua @ 2:4d9949e554ef

Add trivial localization.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Sat, 19 Feb 2011 01:05:01 +0000
parents cf3106134425
children e76c327b62e4
line wrap: on
line diff
--- a/main.lua	Sat Oct 30 19:13:05 2010 +0000
+++ b/main.lua	Sat Feb 19 01:05:01 2011 +0000
@@ -1,10 +1,28 @@
 local nametag, addon = ...
 
+-----------------------------------------------------------------------------
+local on = false
+local L = GetLocale()
 
------------------------------------------------------------------------------
--- other locals
-local on = false
-
+-- Please use the Localization App on WoWAce to Update this
+-- http://www.wowace.com/addons/what-just-procced/localization/
+if L == 'deDE' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+elseif L == 'enUS' or L == 'enGB' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+elseif L == 'esES' or L == 'esMX' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+elseif L == 'frFR' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+elseif L == 'koKR' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+elseif L == 'ruRU' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+elseif L == 'zhCN' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+elseif L == 'zhTW' then
+	L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
+end
 
 -----------------------------------------------------------------------------
 addon = LibStub("AceAddon-3.0"):NewAddon(addon, nametag,
@@ -22,13 +40,13 @@
 	else
 		self:UnregisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW")
 	end
-	self:Print(on and "Activated" or "Deactivated")
+	self:Print(on and L["Activated"] or L["Deactivated"])
 end
 
 function addon:SPELL_ACTIVATION_OVERLAY_SHOW(...)
 	local _,spellID,_,positions = ...
 	local spell = GetSpellLink(spellID) or GetSpellInfo(spellID) or spellID
-	self:Printf("%s at position:  %s.", spell, positions)
+	self:Printf(L["%s at position %s ."], spell, positions)
 end
 
 -- vim:noet