diff Modules/FailSafe.lua @ 68:eadff31e61e8

Localization of all files. Testing packager settings (especially automatic locale exports), localization is not yet finished.
author Zerotorescue
date Wed, 15 Sep 2010 13:10:56 +0200
parents 8168280420ae
children f01e0184a275
line wrap: on
line diff
--- a/Modules/FailSafe.lua	Tue Sep 14 11:17:38 2010 +0200
+++ b/Modules/FailSafe.lua	Wed Sep 15 13:10:56 2010 +0200
@@ -1,7 +1,7 @@
 local MailOpener = LibStub("AceAddon-3.0"):GetAddon("MailOpener");
 local mod = MailOpener:NewModule("FailSafe", "AceEvent-3.0", "AceTimer-3.0");
 
-mod.moduleDescription = "Prevents the mail opening from completely stopping when the opening of a single mail gets stuck.";
+mod.moduleDescription = L["Prevents the mail opening from completely stopping when the opening of a single mail gets stuck."];
 mod.moduleRequired = false;
 
 function mod:OnInitialize()
@@ -74,32 +74,32 @@
 function mod:Continue()
 	MailOpener:GetModule("OpenAll"):Continue();
 	
-	print("|cff15ff00Mail Opener|r (FailSafe): Mail opening timeout, continueing with the next mail.");
+	MailOpener:Print(L["(FailSafe) Mail opening timeout, continuing with the next mail."]);
 end
 
 function mod:GetOptionsGroup()
 	local configGroup = {
 		order = 0,
 		type = "modulesSubGroup",
-		name = "FailSafe",
-		desc = "Change settings for the FailSafe module.",
+		name = L["FailSafe"],
+		desc = L["Change settings for the FailSafe module."],
 		args = {
 			General = {
 				order = 10,
 				type = "group",
 				inline = true,
-				name = "General",
+				name = L["General"],
 				args = {
 					description = {
 						order = 10,
 						type = "description",
 						name = function()
-							local descText = "With this button you can completely toggle this module |cff00ff00on|r or |cffff0000off|r. This setting will be remembered and the module will be automatically toggled |cff00ff00on|r or |cffff0000off|r upon logon as it was last set.\n\n";
+							local descText = L["With this button you can completely toggle this module |cff00ff00on|r or |cffff0000off|r. This setting will be remembered and the module will be automatically toggled |cff00ff00on|r or |cffff0000off|r upon logon as it was last set."] .. "\n\n";
 							
 							if self:IsEnabled() then
-								descText = descText .. "Status: |cff00ff00Enabled|r";
+								descText = descText .. L["Status: %s"]:format(L["|cff00ff00Enabled|r"]);
 							else
-								descText = descText .. "Status: |cffff0000Disabled|r";
+								descText = descText .. L["Status: %s"]:format(L["|cffff0000Disabled|r"]);
 							end
 							
 							return descText;
@@ -110,12 +110,12 @@
 						type = "execute",
 						name = function()
 							if self:IsEnabled() then
-								return "Disable Module";
+								return L["Disable Module"];
 							else
-								return "Enable Module";
+								return L["Enable Module"];
 							end
 						end,
-						desc = "Click here to completely toggle this module on or off.",
+						desc = L["Click here to completely toggle this module on or off."],
 						width = "double",
 						func = function()
 							if self:IsEnabled() then
@@ -135,12 +135,12 @@
 				order = 20,
 				type = "group",
 				inline = true,
-				name = "Single Mail Opening Timeout",
+				name = L["Single Mail Opening Timeout"],
 				args = {
 					description = {
 						order = 10,
 						type = "description",
-						name = "Change how long FailSafe should wait before skipping the last mail and continueing with the next. This will prevent mail opening getting stuck forever because a single mail is frozen for whatever reason.",
+						name = L["Change how long FailSafe should wait before skipping the last mail and continuing with the next. This will prevent mail opening getting stuck forever because a single mail is frozen for whatever reason."],
 					},
 					timeout = {
 						order = 20,
@@ -149,8 +149,8 @@
 						min = 1,
 						max = 60,
 						step = 0.5,
-						name = "Single Mail Timeout",
-						desc = "Change how long FailSafe should wait before skipping the last mail and continueing with the next. This should prevent mail opening getting stuck because a single mail is stuck for whatever reason.\n\nDefault value is 20 seconds.",
+						name = L["Single Mail Timeout"],
+						desc = L["Change how long FailSafe should wait before skipping the last mail and continuing with the next. This should prevent mail opening getting stuck because a single mail is stuck for whatever reason.\n\nDefault value is 20 seconds."],
 						get = function() return self.db.profile.timeout; end,
 						set = function(i, v) self.db.profile.timeout = v; end,
 					},