Mercurial > audlegacy-plugins
changeset 1382:28766475ca0a
More and more translatable strings... ;-)
author | Stany HENRY <StrassBoy@gmail.com> |
---|---|
date | Fri, 27 Jul 2007 00:02:44 +0200 |
parents | e08314da646d |
children | cb12e77655d5 |
files | src/aosd/aosd_ui.c src/cdaudio-ng/cdaudio-ng.c src/cdaudio-ng/configure.c |
diffstat | 3 files changed, 58 insertions(+), 55 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aosd/aosd_ui.c Thu Jul 26 21:54:07 2007 +0200 +++ b/src/aosd/aosd_ui.c Fri Jul 27 00:02:44 2007 +0200 @@ -230,7 +230,7 @@ aosd_callback_list_add( cb_list , pos_offset_table , aosd_cb_configure_position_offset_commit ); aosd_callback_list_add( cb_list , pos_offset_table , aosd_cb_configure_position_maxsize_commit ); - pos_multimon_frame = gtk_frame_new( "Multi-Monitor options" ); + pos_multimon_frame = gtk_frame_new( _("Multi-Monitor options") ); pos_multimon_hbox = gtk_hbox_new( FALSE , 4 ); gtk_container_set_border_width( GTK_CONTAINER(pos_multimon_hbox) , 6 ); gtk_container_add( GTK_CONTAINER(pos_multimon_frame), pos_multimon_hbox ); @@ -396,7 +396,7 @@ for ( i = 0 ; i < AOSD_TEXT_FONTS_NUM ; i++ ) { GdkColor gcolor = { 0 , 0 , 0 , 0 }; - gchar *label_str = g_strdup_printf( "Font %i:" , i+1 ); + gchar *label_str = g_strdup_printf( _("Font %i:") , i+1 ); tex_font_label[i] = gtk_label_new( label_str ); g_free( label_str ); tex_font_fontbt[i] = gtk_font_button_new(); @@ -566,7 +566,7 @@ colors_max_num = colors_num; gtk_list_store_append( dec_rstyle_store , &iter ); gtk_list_store_set( dec_rstyle_store , &iter , - 0 , aosd_deco_style_get_desc( deco_code_array[i] ) , + 0 , _(aosd_deco_style_get_desc( deco_code_array[i] )) , 1 , deco_code_array[i] , 2 , colors_num , -1 ); if ( deco_code_array[i] == cfg->osd->decoration.code ) iter_sel = iter; @@ -609,7 +609,7 @@ GdkColor gcolor = { 0 , 0 , 0 , 0 }; gchar *label_str = NULL; hbox = gtk_hbox_new( FALSE , 4 ); - label_str = g_strdup_printf( "Color %i:" , i+1 ); + label_str = g_strdup_printf( _("Color %i:") , i+1 ); label = gtk_label_new( label_str ); g_free( label_str ); colorbt = gtk_color_button_new(); @@ -733,11 +733,11 @@ GtkWidget *frame, *vbox, *label, *checkbt; gtk_list_store_append( tri_event_store , &iter ); gtk_list_store_set( tri_event_store , &iter , - 0 , aosd_trigger_get_name( trigger_code_array[i] ) , + 0 , _(aosd_trigger_get_name( trigger_code_array[i] )) , 1 , trigger_code_array[i] , 2 , i , -1 ); vbox = gtk_vbox_new( FALSE , 0 ); gtk_container_set_border_width( GTK_CONTAINER(vbox) , 6 ); - label = gtk_label_new( aosd_trigger_get_desc( trigger_code_array[i] ) ); + label = gtk_label_new( _(aosd_trigger_get_desc( trigger_code_array[i] )) ); gtk_label_set_line_wrap( GTK_LABEL(label) , TRUE ); gtk_misc_set_alignment( GTK_MISC(label) , 0.0 , 0.0 ); checkbt = gtk_check_button_new_with_label( _("Enable trigger") ); @@ -869,7 +869,7 @@ gtk_container_set_border_width( GTK_CONTAINER(mis_transp_status_hbox) , 3 ); gtk_container_add( GTK_CONTAINER(mis_transp_status_frame) , mis_transp_status_hbox ); gtk_box_pack_start( GTK_BOX(mis_transp_vbox) , mis_transp_status_frame , TRUE , TRUE , 0 ); - + mis_transp_status_img = gtk_image_new(); gtk_misc_set_alignment( GTK_MISC(mis_transp_status_img) , 0.5 , 0 ); mis_transp_status_label = gtk_label_new( "" ); @@ -879,11 +879,11 @@ gtk_box_pack_start( GTK_BOX(mis_transp_status_hbox) , mis_transp_status_label , TRUE , TRUE , 0 ); g_object_set_data( G_OBJECT(mis_transp_status_hbox) , "img" , mis_transp_status_img ); g_object_set_data( G_OBJECT(mis_transp_status_hbox) , "label" , mis_transp_status_label ); - + #ifdef HAVE_XCOMPOSITE g_signal_connect( G_OBJECT(mis_transp_real_rbt) , "toggled" , G_CALLBACK(aosd_cb_configure_misc_transp_real_clicked) , mis_transp_status_hbox ); - + /* check if the composite extension is loaded */ if ( aosd_osd_check_composite_ext() ) { @@ -928,7 +928,7 @@ aosd_cfg_debug( cfg ); #endif markup_message = g_markup_printf_escaped( - "<span font_desc='%s'>Audacious OSD</span>" , cfg->osd->text.fonts_name[0] ); + _("<span font_desc='%s'>Audacious OSD</span>") , cfg->osd->text.fonts_name[0] ); aosd_osd_shutdown(); /* stop any displayed osd */ aosd_osd_cleanup(); /* just in case it's active */ aosd_osd_init( cfg->osd->misc.transparency_mode ); @@ -1137,11 +1137,11 @@ gtk_text_view_set_justification( GTK_TEXT_VIEW(info_tv) , GTK_JUSTIFY_LEFT ); gtk_text_view_set_left_margin( GTK_TEXT_VIEW(info_tv) , 10 ); - info_tb_content = g_strjoin( NULL , "\nAudacious OSD " , AOSD_VERSION_PLUGIN , + info_tb_content = g_strjoin( NULL , _("\nAudacious OSD ") , AOSD_VERSION_PLUGIN , _("\nhttp://www.develia.org/projects.php?p=audacious#aosd\n" - "written by Giacomo Lozito\n") , - "< james@develia.org >\n\n" , - _("On-Screen-Display is based on Ghosd library\n" + "written by Giacomo Lozito\n" + "< james@develia.org >\n\n" + "On-Screen-Display is based on Ghosd library\n" "written by Evan Martin\n" "http://neugierig.org/software/ghosd/\n\n") , NULL ); gtk_text_buffer_set_text( info_tb , info_tb_content , -1 );
--- a/src/cdaudio-ng/cdaudio-ng.c Thu Jul 26 21:54:07 2007 +0200 +++ b/src/cdaudio-ng/cdaudio-ng.c Fri Jul 27 00:02:44 2007 +0200 @@ -1,6 +1,6 @@ /* - todo: + todo: - about dialog */ @@ -27,6 +27,7 @@ //#include <audacious/playback.h> // todo: this should be available soon (by 1.4) #include <audacious/util.h> #include <audacious/output.h> +#include "config.h" #include "cdaudio-ng.h" #include "configure.h" @@ -116,9 +117,9 @@ cleanup_on_error(); return; } - + libcddb_init(); - + ConfigDb *db = bmp_cfg_db_open(); gchar *string = NULL; @@ -158,20 +159,20 @@ { if (debug) printf("cdaudio-ng: cdaudio_about()\n"); - + static GtkWidget* about_window = NULL; - + if (about_window) { gdk_window_raise(about_window->window); } - + char about_text[1000]; - sprintf(about_text, "Copyright (c) 2007, by Calin Crisan <ccrisan@gmail.com> and The Audacious Team.\n\n" + sprintf(about_text, _("Copyright (c) 2007, by Calin Crisan <ccrisan@gmail.com> and The Audacious Team.\n\n" "Many thanks to libcdio developers <http://www.gnu.org/software/libcdio/>\n\tand to libcddb developers <http://libcddb.sourceforge.net/>.\n\n" "Also thank you Tony Vroon for mentoring & guiding me.\n\n" - "This was a Google Summer of Code 2007 project."); + "This was a Google Summer of Code 2007 project.")); - about_window = xmms_show_message("About CD Audio Plugin NG", about_text, "OK", FALSE, NULL, NULL); + about_window = xmms_show_message(_("About CD Audio Plugin NG"), about_text, _("OK"), FALSE, NULL, NULL); g_signal_connect(G_OBJECT(about_window), "destroy", G_CALLBACK(gtk_widget_destroyed), &about_window); @@ -209,7 +210,7 @@ printf("cdaudio-ng: cd changed, rescanning\n"); cdaudio_scan_dir(CDDA_DEFAULT); } - + if (pcdio == NULL) { if (debug) printf("cdaudio-ng: \"%s\" is not our file\n", filename); @@ -357,7 +358,7 @@ else { if (debug) printf("cdaudio-ng: discid = %X, category = \"%s\"\n", cddb_disc_get_discid(pcddb_disc), cddb_disc_get_category_str(pcddb_disc)); - + cddb_read(pcddb_conn, pcddb_disc); if (cddb_errno(pcddb_conn) != CDDB_ERR_OK) { fprintf(stderr, "cdaudio-ng: failed to read the cddb info: %s\n", cddb_error_str(cddb_errno(pcddb_conn))); @@ -367,7 +368,7 @@ else { if (debug) printf("cdaudio-ng: we have got the cddb info\n"); - + strcpy(trackinfo[0].performer, cddb_disc_get_artist(pcddb_disc)); strcpy(trackinfo[0].name, cddb_disc_get_title(pcddb_disc)); strcpy(trackinfo[0].genre, cddb_disc_get_genre(pcddb_disc)); @@ -395,7 +396,7 @@ /* add track "file" names to the list */ GList *list = NULL; for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) { - list = g_list_append(list, g_strdup_printf("track%02u.cda", trackno)); + list = g_list_append(list, g_strdup_printf("track%02u.cda", trackno)); cdtext_t *pcdtext = NULL; if (use_cdtext) { if (debug) @@ -432,10 +433,10 @@ } if (debug) { - printf("cdaudio-ng: disc has : performer = \"%s\", name = \"%s\", genre = \"%s\"\n", + printf("cdaudio-ng: disc has : performer = \"%s\", name = \"%s\", genre = \"%s\"\n", trackinfo[0].performer, trackinfo[0].name, trackinfo[0].genre); for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) { - printf("cdaudio-ng: track %d has : performer = \"%s\", name = \"%s\", genre = \"%s\", startlsn = %d, endlsn = %d\n", + printf("cdaudio-ng: track %d has : performer = \"%s\", name = \"%s\", genre = \"%s\", startlsn = %d, endlsn = %d\n", trackno, trackinfo[trackno].performer, trackinfo[trackno].name, trackinfo[trackno].genre, trackinfo[trackno].startlsn, trackinfo[trackno].endlsn); } } @@ -452,7 +453,7 @@ { if (debug) printf("cdaudio-ng: cdaudio_play_file(\"%s\")\n", pinputplayback->filename); - + pglobalinputplayback = pinputplayback; if (trackinfo == NULL) { @@ -530,9 +531,9 @@ { if (debug) printf("cdaudio-ng: cdaudio_stop(\"%s\")\n", pinputplayback != NULL ? pinputplayback->filename : "N/A"); - + pglobalinputplayback = NULL; - + if (playing_track == -1) return; @@ -599,7 +600,7 @@ msf_t startmsf, endmsf; cdio_lsn_to_msf(newstartlsn, &startmsf); cdio_lsn_to_msf(trackinfo[playing_track].endlsn, &endmsf); - + if (cdio_audio_play_msf(pcdio, &startmsf, &endmsf) != DRIVER_OP_SUCCESS) { fprintf(stderr, "cdaudio-ng: failed to play analog cd\n"); cleanup_on_error(); @@ -659,7 +660,7 @@ } *l = volume.level[0]; *r = volume.level[1]; - + return TRUE; } } @@ -679,7 +680,7 @@ cleanup_on_error(); return FALSE; } - + return TRUE; } }
--- a/src/cdaudio-ng/configure.c Thu Jul 26 21:54:07 2007 +0200 +++ b/src/cdaudio-ng/configure.c Fri Jul 27 00:02:44 2007 +0200 @@ -3,6 +3,8 @@ #include <stdlib.h> #include <string.h> #include <gtk/gtk.h> +#include <audacious/i18n.h> +#include "config.h" #include "configure.h" @@ -62,7 +64,7 @@ void configure_create_gui() { configwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(configwindow), "CD Audio Plugin Configuration"); + gtk_window_set_title(GTK_WINDOW(configwindow), _("CD Audio Plugin Configuration")); gtk_window_set_resizable(GTK_WINDOW(configwindow), FALSE); gtk_window_set_position(GTK_WINDOW(configwindow), GTK_WIN_POS_CENTER_ALWAYS); gtk_container_set_border_width(GTK_CONTAINER(configwindow), 10); @@ -72,64 +74,64 @@ gtk_table_set_homogeneous(GTK_TABLE(maintable), FALSE); gtk_container_add(GTK_CONTAINER(configwindow), maintable); - daeframe = gtk_frame_new("Digital audio extraction"); + daeframe = gtk_frame_new(_("Digital audio extraction")); gtk_table_attach_defaults(GTK_TABLE(maintable), daeframe, 0, 2, 0, 1); daetable = gtk_table_new(1, 2, TRUE); gtk_container_add(GTK_CONTAINER(daeframe), daetable); - titleinfoframe = gtk_frame_new("Title information"); + titleinfoframe = gtk_frame_new(_("Title information")); gtk_table_attach_defaults(GTK_TABLE(maintable), titleinfoframe, 0, 2, 1, 2); titleinfotable = gtk_table_new(2, 2, TRUE); gtk_container_add(GTK_CONTAINER(titleinfoframe), titleinfotable); - miscframe = gtk_frame_new("Misc"); + miscframe = gtk_frame_new(_("Misc")); gtk_table_attach_defaults(GTK_TABLE(maintable), miscframe, 0, 2, 2, 3); misctable = gtk_table_new(2, 2, TRUE); gtk_container_add(GTK_CONTAINER(miscframe), misctable); /* - usedaecheckbutton = gtk_check_button_new_with_label("Use digital audio extraction"); + usedaecheckbutton = gtk_check_button_new_with_label(_("Use digital audio extraction")); g_signal_connect(G_OBJECT(usedaecheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); gtk_table_attach_defaults(GTK_TABLE(daetable), usedaecheckbutton, 0, 2, 0, 1); */ - limitcheckbutton = gtk_check_button_new_with_label("Limit read speed to: "); + limitcheckbutton = gtk_check_button_new_with_label(_("Limit read speed to: ")); g_signal_connect(G_OBJECT(limitcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); gtk_table_attach_defaults(GTK_TABLE(daetable), limitcheckbutton, 0, 1, 0, 1); limitspinbutton = gtk_spin_button_new_with_range(1.0, 24.0, 1.0); gtk_table_attach_defaults(GTK_TABLE(daetable), limitspinbutton, 1, 2, 0, 1); - usecdtextcheckbutton = gtk_check_button_new_with_label("Use cd-text if available"); + usecdtextcheckbutton = gtk_check_button_new_with_label(_("Use cd-text if available")); g_signal_connect(G_OBJECT(usecdtextcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); gtk_table_attach_defaults(GTK_TABLE(titleinfotable), usecdtextcheckbutton, 0, 2, 0, 1); - usecddbcheckbutton = gtk_check_button_new_with_label("Use CDDB if available"); + usecddbcheckbutton = gtk_check_button_new_with_label(_("Use CDDB if available")); g_signal_connect(G_OBJECT(usecddbcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); gtk_table_attach_defaults(GTK_TABLE(titleinfotable), usecddbcheckbutton, 0, 2, 1, 2); - - cddbserverlabel = gtk_label_new("Server: "); + + cddbserverlabel = gtk_label_new(_("Server: ")); gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbserverlabel, 0, 1, 2, 3); - - cddbportlabel = gtk_label_new("Port: "); + + cddbportlabel = gtk_label_new(_("Port: ")); gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportlabel, 0, 1, 3, 4); - + cddbserverentry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbserverentry, 1, 2, 2, 3); - + cddbportentry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportentry, 1, 2, 3, 4); - usedevicecheckbutton = gtk_check_button_new_with_label("Override default device: "); + usedevicecheckbutton = gtk_check_button_new_with_label(_("Override default device: ")); g_signal_connect(G_OBJECT(usedevicecheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); gtk_table_attach_defaults(GTK_TABLE(misctable), usedevicecheckbutton, 0, 1, 0, 1); deviceentry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(misctable), deviceentry, 1, 2, 0, 1); - debugcheckbutton = gtk_check_button_new_with_label("Print debug information"); + debugcheckbutton = gtk_check_button_new_with_label(_("Print debug information")); g_signal_connect(G_OBJECT(debugcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); gtk_table_attach_defaults(GTK_TABLE(misctable), debugcheckbutton, 0, 1, 1, 2); @@ -139,11 +141,11 @@ gtk_hbutton_box_set_spacing_default(10); gtk_table_attach_defaults(GTK_TABLE(maintable), buttonbox, 0, 2, 3, 4); - okbutton = gtk_button_new_with_label("Ok"); + okbutton = gtk_button_new_with_label(_("Ok")); g_signal_connect(G_OBJECT(okbutton), "clicked", G_CALLBACK(button_clicked), NULL); gtk_container_add(GTK_CONTAINER(buttonbox), okbutton); - cancelbutton = gtk_button_new_with_label("Cancel"); + cancelbutton = gtk_button_new_with_label(_("Cancel")); g_signal_connect(G_OBJECT(cancelbutton), "clicked", G_CALLBACK(button_clicked), NULL); gtk_container_add(GTK_CONTAINER(buttonbox), cancelbutton); @@ -200,8 +202,8 @@ /*gtk_widget_set_sensitive(limitcheckbutton, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton)));*/ gtk_widget_set_sensitive( - limitspinbutton, - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton)) && + limitspinbutton, + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton)) && GTK_WIDGET_IS_SENSITIVE(limitcheckbutton)); gtk_widget_set_sensitive(cddbserverentry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)));