diff --git a/configure.ac b/configure.ac index eec523431b3b7c651bdbec90a6f0f944774f8185..5c339e79fc651c4f24ca2170303fef16da0aa286 100644 --- a/configure.ac +++ b/configure.ac @@ -47,9 +47,7 @@ AC_CONFIG_FILES([src/Makefile \ src/memmanager/Makefile \ src/mixer/Makefile]) -AC_CONFIG_FILES([skins/Makefile \ - skins/metal/Makefile \ - skins/gmetal/Makefile \ +AC_CONFIG_FILES([po/Makefile \ ringtones/Makefile]) AC_CONFIG_FILES([doc/Makefile \ diff --git a/sflphone-gtk/configure.ac b/sflphone-gtk/configure.ac index 652e17f56a3ed26268d122109f8f86aee67fea80..ea150b2d62bd30f12d73c16fb6c83eee1863a39b 100644 --- a/sflphone-gtk/configure.ac +++ b/sflphone-gtk/configure.ac @@ -36,7 +36,6 @@ AC_SUBST(DEPS_LIBS) AC_OUTPUT([ Makefile src/Makefile -src/po/Makefile pixmaps/Makefile sflphone.desktop ]) diff --git a/sflphone-gtk/src/Makefile.am b/sflphone-gtk/src/Makefile.am index bcfa358ab9052a69a3b2305b81159223d3591dcb..eeaa1392ff4c04cd4b397c68a6187627f065f66c 100644 --- a/sflphone-gtk/src/Makefile.am +++ b/sflphone-gtk/src/Makefile.am @@ -1,5 +1,3 @@ -SUBDIRS=po - bin_PROGRAMS = sflphone-gtk sflphone_gtk_SOURCES = \ diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index c1d57692892570a65062ae293b97f71edc5f9ca6..ed95957e1100db6abb871a29447ecc78f0e8a4d6 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -159,7 +159,7 @@ sflphone_init() codec_list_init(); if(!dbus_connect ()) { - main_window_error_message("Unable to connect to the SFLphone server.\nMake sure the daemon is running."); + main_window_error_message(_("Unable to connect to the SFLphone server.\nMake sure the daemon is running.")); return FALSE; } else @@ -541,7 +541,7 @@ sflphone_place_call ( call_t * c ) } else { - main_window_error_message("The account selected as default is not registered."); + main_window_error_message(_("The account selected as default is not registered.")); } } @@ -554,7 +554,7 @@ sflphone_place_call ( call_t * c ) } else { - main_window_error_message("There are no registered accounts to make this call with."); + main_window_error_message(_("There is no registered account to make this call with.")); } } @@ -575,7 +575,7 @@ sflphone_throw_exception( gchar* msg , int err ) gchar* markup = malloc(1000); switch( err ){ case ALSA_ERROR: - sprintf( markup , "<b>ALSA notification</b>\n\n"); + sprintf( markup , _("<b>ALSA notification</b>\n\n")); break; } sprintf( markup , "%s%s" , markup , msg ); @@ -629,7 +629,7 @@ sflphone_fill_codec_list() } if( codec_list_get_size() == 0) { gchar* markup = malloc(1000); - sprintf(markup , "<b>Error: No audio codecs found.\n\n</b> SFL audio codecs have to be placed in <i>%s</i> or in the <b>.sflphone</b> directory in your home( <i>%s</i> )", CODECS_DIR , g_get_home_dir()); + sprintf(markup , _("<b>Error: No audio codecs found.\n\n</b> SFL audio codecs have to be placed in <i>%s</i> or in the <b>.sflphone</b> directory in your home( <i>%s</i> )"), CODECS_DIR , g_get_home_dir()); main_window_error_message( markup ); g_free( markup ); dbus_unregister(getpid()); diff --git a/sflphone-gtk/src/main.c b/sflphone-gtk/src/main.c index 40c748c1c37ceb276979ff16e2478198e538c2fb..36ccc06367ba591cc588ad1ab7abc1f58970f729 100644 --- a/sflphone-gtk/src/main.c +++ b/sflphone-gtk/src/main.c @@ -41,7 +41,6 @@ There is NO WARRANTY, to the extent permitted by law.\n\n"); srand ( time(NULL) ); // Internationalization - g_print("%s\n",setlocale( LC_ALL , "" )); bindtextdomain( "sflphone" , "/usr/share/locale" ); textdomain( "sflphone" ); diff --git a/sflphone-gtk/src/mainwindow.c b/sflphone-gtk/src/mainwindow.c index b6c883982c291e4a3d616880c7b6bd10fdaae96d..59cc66883a3f40a76754a6bfe00491c97583533a 100644 --- a/sflphone-gtk/src/mainwindow.c +++ b/sflphone-gtk/src/mainwindow.c @@ -176,7 +176,7 @@ create_main_window () GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_YES_NO, - "<b><big>Welcome to SFLphone!</big></b>\n\nThere are no VoIP accounts configured, would you like to edit the preferences now?"); + _("<b><big>Welcome to SFLphone!</big></b>\n\nThere is no VoIP account configured.\n Would you like to create one now?")); int response = gtk_dialog_run (GTK_DIALOG(dialog)); @@ -184,7 +184,7 @@ create_main_window () if (response == GTK_RESPONSE_YES) { - show_config_window(); + show_accounts_window(); } } diff --git a/src/global.h b/src/global.h index cd712ed55c18bd62b93f184e43b75f7cc280f175..a4416190f6f778a3512c783a8837eb10e0bf77e2 100644 --- a/src/global.h +++ b/src/global.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. + * Copyright (C) 2004-2008 Savoir-Faire Linux inc. + * Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> * @@ -23,10 +24,14 @@ #include <assert.h> #include <stdio.h> +#include <libintl.h> +#include <locale.h> typedef float float32; typedef short int16; +#define _(string) gettext (string) + #ifdef DATAFORMAT_IS_FLOAT #define SFLDataFormat float32 #define SFLDataFormatString "Float32" @@ -57,8 +62,8 @@ typedef short int16; #define _debugAlsa(...) #endif -#define SFLPHONED_VERSION "0.7.2" -#define SFLPHONED_VERSIONNUM 0x000702 +#define SFLPHONED_VERSION "0.8.2" +#define SFLPHONED_VERSIONNUM 0x000802 #define PROGNAME "sflphoned" #define PROGNAME_GLOBAL "sflphone" @@ -66,7 +71,7 @@ typedef short int16; #define RINGDIR "ringtones" #define CODECDIR "codecs" -#define _(arg) arg +//#define _(arg) arg #define MONO 1 #define CHANNELS 2 #define SIZEBUF 1024*1024 diff --git a/src/main.cpp b/src/main.cpp index 0247fa23a769c9d1165dca8e9efecaa89a42151b..08ee55214216354acf8caa0d7a307c740a2ab6cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -59,6 +59,8 @@ main (int argc, char **argv) { } bool initOK = false; try { + bindtextdomain( "sflphone" , "/usr/share/locale" ); + textdomain( "sflphone" ); Manager::instance().initConfigFile(); Manager::instance().init(); initOK = true;