changeset 554:8a7a6dda6add trunk

[svn] make lirc strings translatable
author nenolod
date Wed, 01 Feb 2006 13:09:25 -0800
parents 82346a6312c2
children c4d4bf876e3f
files Plugins/General/lirc/about.c Plugins/General/lirc/lirc.c
diffstat 2 files changed, 20 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/General/lirc/about.c	Wed Feb 01 13:09:00 2006 -0800
+++ b/Plugins/General/lirc/about.c	Wed Feb 01 13:09:25 2006 -0800
@@ -27,6 +27,8 @@
 #  include "config.h"
 #endif
 
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
 #include "lirc.h"
@@ -54,13 +56,13 @@
 	GtkWidget *bbox,*about_credits_logo_box,*about_credits_logo_frame;
 	GtkWidget *about_credits_logo;
 	GtkWidget *button,*label;
-        GString *logo_text;
+	GString *logo_text;
 	
 	if(dialog) return;
 	
 	dialog=gtk_dialog_new();
 	gtk_window_set_title(GTK_WINDOW(dialog),
-			     "About LIRC xmms-plugin " VERSION);
+			     _("About LIRC Audacious Plugin"));
 	g_signal_connect(G_OBJECT(dialog),"destroy",
 			   G_CALLBACK(gtk_widget_destroyed),
 			   &dialog);
@@ -87,18 +89,18 @@
 	gtk_container_border_width(GTK_CONTAINER(dialog),5);
 
         logo_text = g_string_new( "" );
-        g_string_append( logo_text , "LIRC Plugin " );
+        g_string_append( logo_text , _("LIRC Plugin "));
         g_string_append( logo_text , VERSION );
-        g_string_append( logo_text , "\n"
+        g_string_append( logo_text , _("\n"
 "A simple plugin that lets you control\n"
-"audacious using the LIRC remote control daemon\n\n"
-"Adapted for audacious usage by Tony Vroon <chainsaw@gentoo.org>\n"
+"Audacious using the LIRC remote control daemon\n\n"
+"Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n"
 "from the XMMS LIRC plugin by:\n"
 "Carl van Schaik <carl@leg.uct.ac.za>\n"
 "Christoph Bartelmus <xmms@bartelmus.de>\n"
 "You can get LIRC information at:\n"
-"http://fsinfo.cs.uni-sb.de/~columbus/lirc/index.html" );
-	
+"http://fsinfo.cs.uni-sb.de/~columbus/lirc/index.html"));
+
 	label=gtk_label_new( logo_text->str );
         g_string_free( logo_text, TRUE );
 
@@ -111,7 +113,7 @@
 	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area),
 			   bbox, FALSE, FALSE, 0);
 	
-	button = gtk_button_new_with_label(("Close"));
+	button = gtk_button_new_with_label(_("Close"));
 	g_signal_connect_object(G_OBJECT(button), "clicked",
 				  G_CALLBACK(about_close_cb), NULL,G_CONNECT_SWAPPED) ;
 	
--- a/Plugins/General/lirc/lirc.c	Wed Feb 01 13:09:00 2006 -0800
+++ b/Plugins/General/lirc/lirc.c	Wed Feb 01 13:09:25 2006 -0800
@@ -39,6 +39,7 @@
 #include <gtk/gtk.h>
 
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "audacious/plugin.h"
 #include "libaudacious/configdb.h"
@@ -63,7 +64,7 @@
 
 GeneralPlugin *get_gplugin_info(void)
 {
-        lirc_plugin.description = g_strdup_printf("LIRC Plugin"); 
+        lirc_plugin.description = g_strdup_printf(_("LIRC Plugin")); 
         return(&lirc_plugin);
 }
 
@@ -494,7 +495,7 @@
 	
 	if((lirc_fd=lirc_init("audacious",1))==-1)
 	{
-		fprintf(stderr,"%s: could not init LIRC support\n",
+		fprintf(stderr,_("%s: could not init LIRC support\n"),
 			plugin_name);
 		return;
 	}
@@ -502,9 +503,9 @@
 	{
 		lirc_deinit();
 		fprintf(stderr,
-			"%s: could not read LIRC config file\n"
-			"%s: please read the documentation of LIRC \n"
-			"%s: how to create a proper config file\n",
+			_("%s: could not read LIRC config file\n"
+			"%s: please read the documentation of LIRC\n"
+			"%s: how to create a proper config file\n"),
 			plugin_name,plugin_name,plugin_name);
 		return;
 	}
@@ -896,7 +897,7 @@
 			}
 			else
 			{
-				fprintf(stderr,"%s: unknown command \"%s\"\n",
+				fprintf(stderr,_("%s: unknown command \"%s\"\n"),
 					plugin_name,c);
 			}
 		}
@@ -906,7 +907,7 @@
 	if(ret==-1)
 	{
 		/* something went badly wrong */
-		fprintf(stderr,"%s: disconnected from LIRC\n",plugin_name);
+		fprintf(stderr,_("%s: disconnected from LIRC\n"),plugin_name);
 		cleanup();
 		return;
 	}
@@ -919,7 +920,7 @@
 		GtkWidget *window;
 		
 		window=gtk_font_selection_dialog_new
-			("Please choose font for SELECT popup.");
+			(_("Please choose font for SELECT popup."));
 		g_return_if_fail(GTK_IS_FONT_SELECTION_DIALOG(window));
 		
 		fsd=window;