changeset 1325:a33da9237bed

Several "i18n" improvements.
author Stany HENRY <StrassBoy@gmail.com>
date Sat, 21 Jul 2007 17:55:46 +0200
parents f7b7dfaf1e33
children 4f9bea634312
files src/aac/src/libmp4.c src/flacng/plugin.c src/null/null.c src/spectrum/spectrum.c src/tta/libtta.c src/wavpack/ui.cxx
diffstat 6 files changed, 66 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/src/aac/src/libmp4.c	Sat Jul 21 10:26:23 2007 -0500
+++ b/src/aac/src/libmp4.c	Sat Jul 21 17:55:46 2007 +0200
@@ -304,10 +304,9 @@
 				 about_text,
 				 _("Ok"), FALSE, NULL, NULL);
 
-    g_free(about_text);
-
     g_signal_connect(G_OBJECT(aboutbox), "destroy",
                      G_CALLBACK(gtk_widget_destroyed), &aboutbox);
+    g_free(about_text);
 }
 
 static void mp4_pause(InputPlayback *playback, short flag)
--- a/src/flacng/plugin.c	Sat Jul 21 10:26:23 2007 -0500
+++ b/src/flacng/plugin.c	Sat Jul 21 17:55:46 2007 +0200
@@ -755,7 +755,7 @@
                                      about_text,
                                      _("OK"), FALSE, NULL, NULL);
 
-    g_free(about_text);
     g_signal_connect(G_OBJECT(about_window), "destroy",
                      G_CALLBACK(gtk_widget_destroyed), &about_window);
+    g_free(about_text);
 }
--- a/src/null/null.c	Sat Jul 21 10:26:23 2007 -0500
+++ b/src/null/null.c	Sat Jul 21 17:55:46 2007 +0200
@@ -66,10 +66,9 @@
 				  about_text,
 				  _("Ok"), FALSE, NULL, NULL);
 
-	g_free(about_text);
-
 	g_signal_connect(G_OBJECT(about), "destroy",
 			 G_CALLBACK(gtk_widget_destroyed), &about);
+	g_free(about_text);
 }
 
 static void null_configure_ok_cb(GtkButton *w, gpointer data)
--- a/src/spectrum/spectrum.c	Sat Jul 21 10:26:23 2007 -0500
+++ b/src/spectrum/spectrum.c	Sat Jul 21 17:55:46 2007 +0200
@@ -1,7 +1,7 @@
 /*  Spectrum Analyzer Visualization Plugin for Audacious
  *
  *  Copyright (C) 2006 William Pitcock
- *  Copyright (C) 1998-2001 Vágvölgyi Attila, Peter Alm, Mikael Alm,
+ *  Copyright (C) 1998-2001 V�gv�lgyi Attila, Peter Alm, Mikael Alm,
  *    Olle Hallnas, Thomas Nilsson and 4Front Technologies
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,7 @@
 #include <math.h>
 #include <audacious/plugin.h>
 #include <audacious/util.h>
+#include <audacious/i18n.h>
 
 #include "logo.xpm"
 
@@ -64,7 +65,7 @@
 	NULL,
 	"Spectrum Analyzer",
 	0,
-	1,		
+	1,
 	fsanalyzer_init, /* init */
 	fsanalyzer_cleanup, /* cleanup */
 	NULL, /* about */
@@ -92,7 +93,7 @@
 		return;
 
 	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-	gtk_window_set_title(GTK_WINDOW(window),"Spectrum Analyzer");
+	gtk_window_set_title(GTK_WINDOW(window), _("Spectrum Analyzer"));
 	gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
 	gtk_widget_realize(window);
 	bg_pixmap = gdk_pixmap_create_from_xpm_d(window->window,NULL,NULL,logo_xpm);
@@ -102,13 +103,13 @@
 	gtk_widget_set_size_request(GTK_WIDGET(window), WIDTH, HEIGHT);
 	gc = gdk_gc_new(window->window);
 	draw_pixmap = gdk_pixmap_new(window->window,WIDTH,HEIGHT,gdk_rgb_get_visual()->depth);
-	
+
 	bar = gdk_pixmap_new(window->window,25, HEIGHT, gdk_rgb_get_visual()->depth);
 	for(i = 0; i < HEIGHT / 2; i++) {
 		color.red = 0xFFFF;
 		color.green = ((i * 255) / (HEIGHT / 2)) << 8;
 		color.blue = 0;
-		
+
 		gdk_color_alloc(gdk_colormap_get_system(),&color);
 		gdk_gc_set_foreground(gc,&color);
 		gdk_draw_line(bar,gc,0,i,24,i);
@@ -117,17 +118,17 @@
 		color.red = (255 - ((i * 255) / (HEIGHT / 2))) <<8;
 		color.green = 0xFFFF;
 		color.blue = 0;
-		
+
 		gdk_color_alloc(gdk_colormap_get_system(),&color);
 		gdk_gc_set_foreground(gc,&color);
 		gdk_draw_line(bar,gc,0,i + (HEIGHT / 2),24,i + (HEIGHT / 2));
 	}
-	
+
 	scale = HEIGHT / ( log((1 - d) / d) * 2 );
 	x00 = d*d*32768.0/(2 * d - 1);
 	y00 = -log(-x00) * scale;
 
-/* d=0.2, HEIGHT=128 
+/* d=0.2, HEIGHT=128
 	scale = 46.1662413084;
 	x00 = -2184.53333333;
 	y00 = -354.979500941;
@@ -135,12 +136,12 @@
 
 	gdk_color_black(gdk_colormap_get_system(),&color);
 	gdk_gc_set_foreground(gc,&color);
-	
+
 	area = gtk_drawing_area_new();
 	gtk_container_add(GTK_CONTAINER(window),area);
 	gtk_widget_realize(area);
 	gdk_window_set_back_pixmap(area->window,bg_pixmap,0);
-	
+
 	gtk_widget_show(area);
 	gtk_widget_show(window);
 	gdk_window_clear(window->window);
@@ -171,13 +172,13 @@
 
 static gint draw_func(gpointer data) {
 	gint i;
-	
+
 	/* FIXME: should allow spare redrawing like the vis. in the main window */
 	if(!window) {
 /*		timeout_tag = 0;*/
 		return FALSE;
 	}
-	
+
 	GDK_THREADS_ENTER();
 	gdk_draw_rectangle(draw_pixmap, gc, TRUE, 0, 0, WIDTH, HEIGHT);
 
@@ -186,7 +187,7 @@
 
 	gdk_window_clear(area->window);
 	GDK_THREADS_LEAVE();
-	
+
 	return TRUE;
 }
 
--- a/src/tta/libtta.c	Sat Jul 21 10:26:23 2007 -0500
+++ b/src/tta/libtta.c	Sat Jul 21 17:55:46 2007 +0200
@@ -287,9 +287,9 @@
 				     about_text,
 				     _("Ok"), FALSE, NULL, NULL);
 
+	gtk_signal_connect(GTK_OBJECT(aboutbox), "destroy",
+			   G_CALLBACK(gtk_widget_destroyed), &aboutbox);
 	g_free(about_text);
-	gtk_signal_connect(GTK_OBJECT(aboutbox), "destroy",
-    	    G_CALLBACK(gtk_widget_destroyed), &aboutbox);
 }
 
 static GtkWidget *window = NULL;
--- a/src/wavpack/ui.cxx	Sat Jul 21 10:26:23 2007 -0500
+++ b/src/wavpack/ui.cxx	Sat Jul 21 17:55:46 2007 +0200
@@ -10,6 +10,7 @@
 #include <audacious/configdb.h>
 #include <audacious/titlestring.h>
 #include <audacious/util.h>
+#include <audacious/i18n.h>
 }
 #include <glib.h>
 #include <gtk/gtk.h>
@@ -49,11 +50,11 @@
 
     about_window =
         xmms_show_message(g_strdup_printf
-                          ("Wavpack Decoder Plugin %s", VERSION),
-                          ("Copyright (c) 2006 William Pitcock <nenolod -at- nenolod.net>\n\n"
+                          (_("Wavpack Decoder Plugin %s"), VERSION),
+                          (_("Copyright (c) 2006 William Pitcock <nenolod -at- nenolod.net>\n\n"
                            "Some of the plugin code was by Miles Egan\n"
-                           "Visit the Wavpack site at http://www.wavpack.com/\n"),
-                          ("Ok"), FALSE, NULL, NULL);
+                           "Visit the Wavpack site at http://www.wavpack.com/\n")),
+                          (_("Ok")), FALSE, NULL, NULL);
     gtk_signal_connect(GTK_OBJECT(about_window), "destroy",
                        GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_window);
 }
@@ -147,7 +148,7 @@
         filename_hbox = gtk_hbox_new(FALSE, 5);
         gtk_box_pack_start(GTK_BOX(vbox), filename_hbox, FALSE, TRUE, 0);
 
-        label = gtk_label_new("Filename:");
+        label = gtk_label_new(_("Filename:"));
         gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0);
         filename_entry = gtk_entry_new();
         gtk_editable_set_editable(GTK_EDITABLE(filename_entry), FALSE);
@@ -160,14 +161,14 @@
         left_vbox = gtk_vbox_new(FALSE, 10);
         gtk_box_pack_start(GTK_BOX(hbox), left_vbox, FALSE, FALSE, 0);
 
-        tag_frame = gtk_frame_new("Ape2 Tag");
+        tag_frame = gtk_frame_new(_("Ape2 Tag"));
         gtk_box_pack_start(GTK_BOX(left_vbox), tag_frame, FALSE, FALSE, 0);
 
         table = gtk_table_new(5, 5, FALSE);
         gtk_container_set_border_width(GTK_CONTAINER(table), 5);
         gtk_container_add(GTK_CONTAINER(tag_frame), table);
 
-        label = gtk_label_new("Title:");
+        label = gtk_label_new(_("Title:"));
         gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
         gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
                          GTK_FILL, GTK_FILL, 5, 5);
@@ -179,7 +180,7 @@
                          (GtkAttachOptions) (GTK_FILL | GTK_EXPAND |
                                              GTK_SHRINK), 0, 5);
 
-        label = gtk_label_new("Artist:");
+        label = gtk_label_new(_("Artist:"));
         gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
         gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
                          GTK_FILL, GTK_FILL, 5, 5);
@@ -191,7 +192,7 @@
                          (GtkAttachOptions) (GTK_FILL | GTK_EXPAND |
                                              GTK_SHRINK), 0, 5);
 
-        label = gtk_label_new("Album:");
+        label = gtk_label_new(_("Album:"));
         gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
         gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
                          GTK_FILL, GTK_FILL, 5, 5);
@@ -203,7 +204,7 @@
                          (GtkAttachOptions) (GTK_FILL | GTK_EXPAND |
                                              GTK_SHRINK), 0, 5);
 
-        label = gtk_label_new("Comment:");
+        label = gtk_label_new(_("Comment:"));
         gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
         gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4,
                          GTK_FILL, GTK_FILL, 5, 5);
@@ -216,7 +217,7 @@
                          (GtkAttachOptions) (GTK_FILL | GTK_EXPAND |
                                              GTK_SHRINK), 0, 5);
 
-        label = gtk_label_new("Year:");
+        label = gtk_label_new(_("Year:"));
         gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
         gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
                          GTK_FILL, GTK_FILL, 5, 5);
@@ -229,7 +230,7 @@
                          (GtkAttachOptions) (GTK_FILL | GTK_EXPAND |
                                              GTK_SHRINK), 0, 5);
 
-        label = gtk_label_new("Track number:");
+        label = gtk_label_new(_("Track number:"));
         gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
         gtk_table_attach(GTK_TABLE(table), label, 2, 3, 4, 5,
                          GTK_FILL, GTK_FILL, 5, 5);
@@ -243,7 +244,7 @@
                          (GtkAttachOptions) (GTK_FILL | GTK_EXPAND |
                                              GTK_SHRINK), 0, 5);
 
-        label = gtk_label_new("Genre:");
+        label = gtk_label_new(_("Genre:"));
         gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
         gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6,
                          GTK_FILL, GTK_FILL, 5, 5);
@@ -262,20 +263,20 @@
         gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
         gtk_box_pack_start(GTK_BOX(left_vbox), bbox, FALSE, FALSE, 0);
 
-        save_button = gtk_button_new_with_label("Save");
+        save_button = gtk_button_new_with_label(_("Save"));
         gtk_signal_connect(GTK_OBJECT(save_button), "clicked",
                            GTK_SIGNAL_FUNC(save_cb), NULL);
         GTK_WIDGET_SET_FLAGS(save_button, GTK_CAN_DEFAULT);
         gtk_box_pack_start(GTK_BOX(bbox), save_button, TRUE, TRUE, 0);
 
-        remove_button = gtk_button_new_with_label("Remove Tag");
+        remove_button = gtk_button_new_with_label(_("Remove Tag"));
         gtk_signal_connect_object(GTK_OBJECT(remove_button),
                                   "clicked",
                                   GTK_SIGNAL_FUNC(remove_cb), NULL);
         GTK_WIDGET_SET_FLAGS(remove_button, GTK_CAN_DEFAULT);
         gtk_box_pack_start(GTK_BOX(bbox), remove_button, TRUE, TRUE, 0);
 
-        cancel_button = gtk_button_new_with_label("Cancel");
+        cancel_button = gtk_button_new_with_label(_("Cancel"));
         gtk_signal_connect_object(GTK_OBJECT(cancel_button),
                                   "clicked",
                                   GTK_SIGNAL_FUNC(close_window), NULL);
@@ -283,7 +284,7 @@
         gtk_box_pack_start(GTK_BOX(bbox), cancel_button, TRUE, TRUE, 0);
         gtk_widget_grab_default(cancel_button);
 
-        info_frame = gtk_frame_new("Wavpack Info:");
+        info_frame = gtk_frame_new(_("Wavpack Info:"));
         gtk_box_pack_start(GTK_BOX(hbox), info_frame, FALSE, FALSE, 0);
 
         info_box = gtk_vbox_new(FALSE, 5);
@@ -376,23 +377,23 @@
     minutes = time / 60;
     seconds = time % 60;
 
-    label_set_text(version_label, "version %d", WavpackGetVersion(ctx));
-    label_set_text(bitrate_label, "average bitrate: %6.1f kbps", WavpackGetAverageBitrate(ctx, 0) / 1000);
-    label_set_text(rate_label, "samplerate: %d Hz", WavpackGetSampleRate(ctx));
-    label_set_text(bits_per_sample_label, "bits per sample: %d", WavpackGetBitsPerSample(ctx));
-    label_set_text(channel_label, "channels: %d", WavpackGetNumChannels(ctx));
-    label_set_text(length_label, "length: %d:%.2d", minutes, seconds);
-    label_set_text(filesize_label, "file size: %d Bytes", WavpackGetFileSize(ctx));
+    label_set_text(version_label, _("version %d"), WavpackGetVersion(ctx));
+    label_set_text(bitrate_label, _("average bitrate: %6.1f kbps"), WavpackGetAverageBitrate(ctx, 0) / 1000);
+    label_set_text(rate_label, _("samplerate: %d Hz"), WavpackGetSampleRate(ctx));
+    label_set_text(bits_per_sample_label, _("bits per sample: %d"), WavpackGetBitsPerSample(ctx));
+    label_set_text(channel_label, _("channels: %d"), WavpackGetNumChannels(ctx));
+    label_set_text(length_label, _("length: %d:%.2d"), minutes, seconds);
+    label_set_text(filesize_label, _("file size: %d Bytes"), WavpackGetFileSize(ctx));
     /*
-    label_set_text(peakTitle_label, "Title Peak: %5u", 100);
-    label_set_text(peakAlbum_label, "Album Peak: %5u", 100);
-    label_set_text(gainTitle_label, "Title Gain: %-+5.2f dB", 100.0);
-    label_set_text(gainAlbum_label, "Album Gain: %-+5.2f dB", 100.0);
+    label_set_text(peakTitle_label, _("Title Peak: %5u"), 100);
+    label_set_text(peakAlbum_label, _("Album Peak: %5u"), 100);
+    label_set_text(gainTitle_label, _("Title Gain: %-+5.2f dB"), 100.0);
+    label_set_text(gainAlbum_label, _("Album Gain: %-+5.2f dB"), 100.0);
     */
-    label_set_text(peakTitle_label, "Title Peak: ?");
-    label_set_text(peakAlbum_label, "Album Peak: ?");
-    label_set_text(gainTitle_label, "Title Gain: ?");
-    label_set_text(gainAlbum_label, "Album Gain: ?");
+    label_set_text(peakTitle_label, _("Title Peak: ?"));
+    label_set_text(peakAlbum_label, _("Album Peak: ?"));
+    label_set_text(gainTitle_label, _("Title Gain: ?"));
+    label_set_text(gainAlbum_label, _("Album Gain: ?"));
 
     gtk_entry_set_text(GTK_ENTRY(title_entry), tag.title);
     gtk_entry_set_text(GTK_ENTRY(performer_entry), tag.artist);
@@ -404,7 +405,7 @@
     gtk_entry_set_text(GTK_ENTRY(filename_entry), fn);
     gtk_editable_set_position(GTK_EDITABLE(filename_entry), -1);
 
-    tmp = g_strdup_printf("File Info - %s", g_basename(fn));
+    tmp = g_strdup_printf(_("File Info - %s"), g_basename(fn));
     gtk_window_set_title(GTK_WINDOW(window), tmp);
     g_free(tmp);
 }
@@ -466,7 +467,7 @@
                        GTK_SIGNAL_FUNC(gtk_widget_destroyed),
                        &wv_configurewin);
     gtk_window_set_title(GTK_WINDOW(wv_configurewin),
-                         "Musepack Configuration");
+                         _("Wavpack Configuration"));
     gtk_window_set_policy(GTK_WINDOW(wv_configurewin), FALSE, FALSE, FALSE);
     gtk_container_border_width(GTK_CONTAINER(wv_configurewin), 10);
 
@@ -479,7 +480,7 @@
 
     /* Plugin Settings */
 
-    rg_frame = gtk_frame_new("General Plugin Settings:");
+    rg_frame = gtk_frame_new(_("General Plugin Settings:"));
     gtk_container_border_width(GTK_CONTAINER(rg_frame), 5);
 
     rg_vbox = gtk_vbox_new(FALSE, 10);
@@ -487,17 +488,17 @@
     gtk_container_add(GTK_CONTAINER(rg_frame), rg_vbox);
 
     rg_dyn_bitrate =
-        gtk_check_button_new_with_label("Enable Dynamic Bitrate Display");
+        gtk_check_button_new_with_label(_("Enable Dynamic Bitrate Display"));
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_dyn_bitrate),
                                  dynBitrateEnabled);
     gtk_box_pack_start(GTK_BOX(rg_vbox), rg_dyn_bitrate, FALSE, FALSE, 0);
 
     gtk_notebook_append_page(GTK_NOTEBOOK(notebook), rg_frame,
-                             gtk_label_new("Plugin"));
+                             gtk_label_new(_("Plugin")));
 
     /* Replay Gain.. */
 
-    rg_frame = gtk_frame_new("ReplayGain Settings:");
+    rg_frame = gtk_frame_new(_("ReplayGain Settings:"));
     gtk_container_border_width(GTK_CONTAINER(rg_frame), 5);
 
     rg_vbox = gtk_vbox_new(FALSE, 10);
@@ -505,17 +506,17 @@
     gtk_container_add(GTK_CONTAINER(rg_frame), rg_vbox);
 
     rg_clip_switch =
-        gtk_check_button_new_with_label("Enable Clipping Prevention");
+        gtk_check_button_new_with_label(_("Enable Clipping Prevention"));
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_clip_switch),
                                  clipPreventionEnabled);
     gtk_box_pack_start(GTK_BOX(rg_vbox), rg_clip_switch, FALSE, FALSE, 0);
 
-    rg_switch = gtk_check_button_new_with_label("Enable ReplayGain");
+    rg_switch = gtk_check_button_new_with_label(_("Enable ReplayGain"));
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_switch),
                                  replaygainEnabled);
     gtk_box_pack_start(GTK_BOX(rg_vbox), rg_switch, FALSE, FALSE, 0);
 
-    rg_type_frame = gtk_frame_new("ReplayGain Type:");
+    rg_type_frame = gtk_frame_new(_("ReplayGain Type:"));
     gtk_box_pack_start(GTK_BOX(rg_vbox), rg_type_frame, FALSE, FALSE, 0);
 
     gtk_signal_connect(GTK_OBJECT(rg_switch), "toggled",
@@ -526,7 +527,7 @@
     gtk_container_add(GTK_CONTAINER(rg_type_frame), rg_type_vbox);
 
     rg_track_gain =
-        gtk_radio_button_new_with_label(NULL, "use Track Gain/Peak");
+        gtk_radio_button_new_with_label(NULL, _("use Track Gain/Peak"));
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_track_gain),
                                  !albumReplaygainEnabled);
     gtk_box_pack_start(GTK_BOX(rg_type_vbox), rg_track_gain, FALSE, FALSE, 0);
@@ -534,7 +535,7 @@
     rg_album_gain =
         gtk_radio_button_new_with_label(gtk_radio_button_group
                                         (GTK_RADIO_BUTTON(rg_track_gain)),
-                                        "use Album Gain/Peak");
+                                        _("use Album Gain/Peak"));
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rg_album_gain),
                                  albumReplaygainEnabled);
     gtk_box_pack_start(GTK_BOX(rg_type_vbox), rg_album_gain, FALSE, FALSE, 0);
@@ -542,7 +543,7 @@
     gtk_widget_set_sensitive(rg_type_frame, replaygainEnabled);
 
     gtk_notebook_append_page(GTK_NOTEBOOK(notebook), rg_frame,
-                             gtk_label_new("ReplayGain"));
+                             gtk_label_new(_("ReplayGain")));
 
     /* Buttons */
 
@@ -551,14 +552,14 @@
     gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
     gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 
-    ok = gtk_button_new_with_label("Ok");
+    ok = gtk_button_new_with_label(_("Ok"));
     gtk_signal_connect(GTK_OBJECT(ok), "clicked",
                        GTK_SIGNAL_FUNC(wv_configurewin_ok), NULL);
     GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
     gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
     gtk_widget_grab_default(ok);
 
-    cancel = gtk_button_new_with_label("Cancel");
+    cancel = gtk_button_new_with_label(_("Cancel"));
     gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked",
                               GTK_SIGNAL_FUNC(gtk_widget_destroy),
                               GTK_OBJECT(wv_configurewin));