summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-06-21 22:11:37 -0400
committerTingPing <tingping@tingping.se>2014-06-21 22:11:37 -0400
commit3342af4185eccba3cf5a9c6e2d2d426911afa0c6 (patch)
treeb31be935dd354fafdbc33f942f2d741969b7cc66 /src/common
parent7374637d34a4eb1b0e7461e2721fe936e6f31105 (diff)
Make plugin-timer translatable
Diffstat (limited to 'src/common')
-rw-r--r--src/common/plugin-timer.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c
index 7f5f5cb4..e6944330 100644
--- a/src/common/plugin-timer.c
+++ b/src/common/plugin-timer.c
@@ -26,6 +26,8 @@
 #define g_ascii_strcasecmp stricmp
 #endif
 
+#define _(x) hexchat_gettext(ph,x)
+
 static hexchat_plugin *ph;	/* plugin handle */
 static GSList *timer_list = NULL;
 
@@ -68,13 +70,13 @@ timer_del_ref (int ref, int quiet)
 		{
 			timer_del (tim);
 			if (!quiet)
-				hexchat_printf (ph, "Timer %d deleted.\n", ref);
+				hexchat_printf (ph, _("Timer %d deleted.\n"), ref);
 			return;
 		}
 		list = list->next;
 	}
 	if (!quiet)
-		hexchat_print (ph, "No such ref number found.\n");
+		hexchat_print (ph, _("No such ref number found.\n"));
 }
 
 static int
@@ -138,17 +140,17 @@ timer_showlist (void)
 
 	if (timer_list == NULL)
 	{
-		hexchat_print (ph, "No timers installed.\n");
-		hexchat_print (ph, HELP);
+		hexchat_print (ph, _("No timers installed.\n"));
+		hexchat_print (ph, _(HELP));
 		return;
 	}
 							 /*  00000 00000000 0000000 abc */
-	hexchat_print (ph, "\026 Ref#  Seconds  Repeat  Command \026\n");
+	hexchat_print (ph, _("\026 Ref#  Seconds  Repeat  Command \026\n"));
 	list = timer_list;
 	while (list)
 	{
 		tim = list->data;
-		hexchat_printf (ph, "%5d %8.1f %7d  %s\n", tim->ref, tim->timeout,
+		hexchat_printf (ph, _("%5d %8.1f %7d  %s\n"), tim->ref, tim->timeout,
 						  tim->repeat, tim->command);
 		list = list->next;
 	}
@@ -221,7 +223,7 @@ hexchat_plugin_init
 	*plugin_desc = "IrcII style /TIMER command";
 	*plugin_version = "";
 
-	hexchat_hook_command (ph, "TIMER", HEXCHAT_PRI_NORM, timer_cb, HELP, 0);
+	hexchat_hook_command (ph, "TIMER", HEXCHAT_PRI_NORM, timer_cb, _(HELP), 0);
 
 	return 1;       /* return 1 for success */
 }