[girl] Add better i18n support
- From: Ole Aamot <ole src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [girl] Add better i18n support
- Date: Tue, 6 Jan 2015 22:35:24 +0000 (UTC)
commit b81f7351620a2a61f9cd7e73dc49a0157794fe8e
Author: Ole Aamot <oka oka no>
Date: Tue Jan 6 23:34:59 2015 +0100
Add better i18n support
ChangeLog | 5 +
Makefile.in | 2 +-
configure | 20 +-
man/Makefile | 503 -------------------------------------------------------
man/Makefile.in | 503 -------------------------------------------------------
src/girl-gui.c | 68 ++++----
src/girl.c | 8 +-
7 files changed, 54 insertions(+), 1055 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b972a6c..b2f4ec3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2015-01-06 Ole Aamot <oka src gnome org>
+ * src/girl-gui.c: Add i18n support
+ * src/girl.c: Add i18n support
+
+2015-01-06 Ole Aamot <oka src gnome org>
+
* AUTHORS: Add Andika Triwidada
* THANKS: Add Andika Triwidada
* src/girl.xml: Fix Brno location.
diff --git a/Makefile.in b/Makefile.in
index 3df4289..70a5a49 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -80,7 +80,7 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/girl.spec.in ABOUT-NLS COPYING \
- THANKS TODO compile config.rpath depcomp install-sh missing
+ THANKS TODO compile config.rpath install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/configure.ac
diff --git a/configure b/configure
index 53e4970..cea3df7 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for girl 1.0.0.
+# Generated by GNU Autoconf 2.69 for girl 1.0.1.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='girl'
PACKAGE_TARNAME='girl'
-PACKAGE_VERSION='1.0.0'
-PACKAGE_STRING='girl 1.0.0'
+PACKAGE_VERSION='1.0.1'
+PACKAGE_STRING='girl 1.0.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures girl 1.0.0 to adapt to many kinds of systems.
+\`configure' configures girl 1.0.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1395,7 +1395,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of girl 1.0.0:";;
+ short | recursive ) echo "Configuration of girl 1.0.1:";;
esac
cat <<\_ACEOF
@@ -1499,7 +1499,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-girl configure 1.0.0
+girl configure 1.0.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1864,7 +1864,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by girl $as_me 1.0.0, which was
+It was created by girl $as_me 1.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2727,7 +2727,7 @@ fi
# Define the identity of the package.
PACKAGE='girl'
- VERSION='1.0.0'
+ VERSION='1.0.1'
cat >>confdefs.h <<_ACEOF
@@ -6706,7 +6706,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by girl $as_me 1.0.0, which was
+This file was extended by girl $as_me 1.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6772,7 +6772,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-girl config.status 1.0.0
+girl config.status 1.0.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/src/girl-gui.c b/src/girl-gui.c
index 14982cf..8d5973b 100644
--- a/src/girl-gui.c
+++ b/src/girl-gui.c
@@ -51,43 +51,43 @@
extern GtkWidget *girl_app;
GnomeUIInfo toolbar[] = {
- GNOMEUIINFO_ITEM_STOCK(("Search"), ("Search by location for radio stations"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Search"), N_("Search by location for radio stations"),
on_search_button_clicked,
GTK_STOCK_FIND),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK(("Stations"), ("Internet Radio Stations"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Stations"), N_("Internet Radio Stations"),
on_stations_selector_button_clicked,
GTK_STOCK_NETWORK),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK(("Listen"), ("Listen to selected radio station"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Listen"), N_("Listen to selected radio station"),
on_listen_button_clicked,
GTK_STOCK_MEDIA_PLAY),
#if HAVE_GIRL_RECORD == 1
- GNOMEUIINFO_ITEM_STOCK(("Record"), ("Record selected radio station"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Record"), N_("Record selected radio station"),
on_record_button_clicked,
GTK_STOCK_MEDIA_RECORD),
- GNOMEUIINFO_ITEM_STOCK(("Stop"), ("Stop recording selected radio station"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Stop"), N_("Stop recording selected radio station"),
on_stop_button_clicked,
GTK_STOCK_MEDIA_STOP),
#endif /* HAVE_GIRL_RECORD */
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK(("Previous"),
- ("Go back to the previous radio station"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Previous"),
+ N_("Go back to the previous radio station"),
on_previous_station_click, GTK_STOCK_GO_BACK),
- GNOMEUIINFO_ITEM_STOCK(("Next"), ("Proceed to the next radio station"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Next"), N_("Proceed to the next radio station"),
on_next_station_click, GTK_STOCK_GO_FORWARD),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK(("About Station"),
- ("About the current Station"),
+ GNOMEUIINFO_ITEM_STOCK(N_("About Station"),
+ N_("About the current Station"),
about_station, GNOME_STOCK_ABOUT),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK(("About Program"),
- ("About the GNOME Internet Radio Locator"),
+ GNOMEUIINFO_ITEM_STOCK(N_("About Program"),
+ N_("About the GNOME Internet Radio Locator"),
about_app, GNOME_STOCK_ABOUT),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK(("Exit"),
- ("Quit the GNOME Internet Radio Locator"),
+ GNOMEUIINFO_ITEM_STOCK(N_("Exit"),
+ N_("Quit the GNOME Internet Radio Locator"),
quit_app, GTK_STOCK_QUIT),
GNOMEUIINFO_END,
@@ -116,7 +116,7 @@ GtkWidget *create_listeners_selector(char *selected_listener_uri,
int i = 0, selection = -1;
/* The Listeners dialog */
- listeners_selector = gtk_dialog_new_with_buttons(("Select a listener"), GTK_WINDOW(girl_app), 0,
/* flags */
+ listeners_selector = gtk_dialog_new_with_buttons(_("Select a listener"), GTK_WINDOW(girl_app), 0,
/* flags */
GTK_STOCK_CLOSE,
GTK_RESPONSE_ACCEPT,
NULL);
@@ -143,7 +143,7 @@ GtkWidget *create_listeners_selector(char *selected_listener_uri,
world_listener_xml_uri);
if (world_listener_xml_uri == NULL) {
- g_warning(("Failed to open %s. Please install it.\n"),
+ g_warning(_("Failed to open %s. Please install it.\n"),
world_listener_xml_uri);
}
@@ -153,7 +153,7 @@ GtkWidget *create_listeners_selector(char *selected_listener_uri,
girl_listener_load_from_http(NULL, local_listener_xml_file);
if (locallistener == NULL) {
- g_warning(("Failed to open %s\n"),
+ g_warning(_("Failed to open %s\n"),
local_listener_xml_file);
}
@@ -254,7 +254,7 @@ GtkWidget *create_programs_selector(char *selected_program_uri,
int i = 0, selection = -1;
/* The Programs dialog */
- programs_selector = gtk_dialog_new_with_buttons(("Select a program"), GTK_WINDOW(girl_app), 0, /*
flags */
+ programs_selector = gtk_dialog_new_with_buttons(_("Select a program"), GTK_WINDOW(girl_app), 0, /*
flags */
GTK_STOCK_CLOSE,
GTK_RESPONSE_ACCEPT,
NULL);
@@ -285,7 +285,7 @@ GtkWidget *create_programs_selector(char *selected_program_uri,
world_program_xml_filename);
if (world_program_xml_filename == NULL) {
- g_warning(("Failed to open %s. Please install it.\n"),
+ g_warning(_("Failed to open %s.\n"),
world_program_xml_filename);
}
@@ -295,7 +295,7 @@ GtkWidget *create_programs_selector(char *selected_program_uri,
girl_program_load_from_file(NULL, local_program_xml_file);
if (localprogram == NULL) {
- g_warning(("Failed to open %s\n"), local_program_xml_file);
+ g_warning(_("Failed to open %s.\n"), local_program_xml_file);
}
/* g_free (local_program_xml_file); */
@@ -430,7 +430,7 @@ GtkWidget *create_search_selector(void) {
memset(&stats, 0, sizeof(stats));
/* The Stations dialog */
- search_selector = gtk_dialog_new_with_buttons(("Search by location"), GTK_WINDOW(girl_app), 0, /*
flags */
+ search_selector = gtk_dialog_new_with_buttons(_("Search by location"), GTK_WINDOW(girl_app), 0, /*
flags */
GTK_STOCK_CLOSE,
GTK_RESPONSE_ACCEPT,
NULL);
@@ -472,7 +472,7 @@ GtkWidget *create_search_selector(void) {
}
if (localstation == NULL) {
- g_warning(("Failed to open %s\n"), local_station_xml_file);
+ g_warning(_("Failed to open %s.\n"), local_station_xml_file);
}
/* g_free (local_station_xml_file); */
@@ -610,7 +610,7 @@ GtkWidget *create_stations_selector(char *selected_station_uri,
memset(&stats, 0, sizeof(stats));
/* The Stations dialog */
- stations_selector = gtk_dialog_new_with_buttons(("Select a station"), GTK_WINDOW(girl_app), 0, /*
flags */
+ stations_selector = gtk_dialog_new_with_buttons(_("Select a station"), GTK_WINDOW(girl_app), 0, /*
flags */
GTK_STOCK_CLOSE,
GTK_RESPONSE_ACCEPT,
NULL);
@@ -641,7 +641,7 @@ GtkWidget *create_stations_selector(char *selected_station_uri,
world_station_xml_filename);
if (world_station_xml_filename == NULL) {
- g_warning(("Failed to open %s. Please install it.\n"),
+ g_warning(_("Failed to open %s.\n"),
world_station_xml_filename);
}
@@ -655,7 +655,7 @@ GtkWidget *create_stations_selector(char *selected_station_uri,
}
if (localstation == NULL) {
- g_warning(("Failed to open %s\n"), local_station_xml_file);
+ g_warning(_("Failed to open %s\n"), local_station_xml_file);
}
/* g_free (local_station_xml_file); */
@@ -755,7 +755,7 @@ GtkWidget *create_streams_selector(char *selected_streams_uri,
GStatBuf stats;
/* The Streams dialog */
- streams_selector = gtk_dialog_new_with_buttons(("Select a stream"), GTK_WINDOW(girl_app), 0, /*
flags */
+ streams_selector = gtk_dialog_new_with_buttons(_("Select a stream"), GTK_WINDOW(girl_app), 0, /*
flags */
GTK_STOCK_CLOSE,
GTK_RESPONSE_ACCEPT,
NULL);
@@ -784,7 +784,7 @@ GtkWidget *create_streams_selector(char *selected_streams_uri,
world_streams_xml_filename);
if (world_streams_xml_filename == NULL) {
- g_warning(("Failed to open %s. Please install it.\n"),
+ g_warning(_("Failed to open %s.\n"),
world_streams_xml_filename);
}
@@ -799,7 +799,7 @@ GtkWidget *create_streams_selector(char *selected_streams_uri,
if (!g_stat("~/.gnome2/girl", &stats)) {
if (localstreams == NULL) {
- g_warning(("Failed to open %s\n"), local_streams_xml_file);
+ g_warning(_("Failed to open %s\n"), local_streams_xml_file);
}
}
@@ -886,7 +886,7 @@ static void station_print_selection(GtkWidget * list, gpointer func_data)
/* dlist = GTK_LIST(list)->selection; */
if (!dlist) {
- g_print("Selection cleared!\n");
+ g_print(_("Selection cleared!\n"));
return;
}
@@ -922,9 +922,9 @@ GtkWidget *create_girl_app()
GirlData *girl_data = g_new0(GirlData, 1);
char *pmf;
- girl_app = gnome_app_new("girl", ("girl"));
+ girl_app = gnome_app_new("girl", _("GIRL"));
gtk_window_set_title(GTK_WINDOW(girl_app),
- ("GNOME Internet Radio Locator"));
+ _("GNOME Internet Radio Locator"));
vbox1 = gtk_vbox_new(FALSE, 0);
gtk_widget_show(vbox1);
@@ -936,7 +936,7 @@ GtkWidget *create_girl_app()
g_free(pmf);
if (girl_pixmap == NULL)
- g_error(("Couldn't create pixmap"));
+ g_error(_("Couldn't create pixmap"));
gtk_widget_show(girl_pixmap);
gtk_box_pack_start(GTK_BOX(vbox1), girl_pixmap, TRUE, TRUE, 0);
@@ -954,10 +954,10 @@ GtkWidget *create_girl_app()
#if HAVE_GIRL_RECORD == 1
gnome_appbar_push(girl_data->appbar,
- ("Search by location from \"Search\" or select a radio station from \"Stations\".
Click \"Listen\" to listen to, or \"Record\" to record from the station."));
+ _("Search by location from \"Search\" or select a radio station from \"Stations\".
Click \"Listen\" to listen to, or \"Record\" to record from the station."));
#else
gnome_appbar_push(girl_data->appbar,
- ("Select a radio station from \"Stations\" and click \"Listen\" to listen to the
station."));
+ _("Select a radio station from \"Stations\" and click \"Listen\" to listen to the
station."));
#endif
/* g_signal_connect(G_OBJECT(calendar), */
/* "day_selected_double_click", */
diff --git a/src/girl.c b/src/girl.c
index bc3aa86..a611204 100644
--- a/src/girl.c
+++ b/src/girl.c
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
#endif
if (gnome_vfs_init() == FALSE) {
- g_warning("Gaaaaaaaah! Gnome-VFS init failed mate !\n");
+ g_warning(_("GNOME VFS initialization failed!\n"));
exit(1);
}
@@ -504,8 +504,8 @@ void about_app(GtkWidget * a, gpointer user_data)
gchar* artists[] = { "Wiki Graphic Designer",
"Aly Raj",
NULL };
- gchar* comments = { "Locate Internet Radio Stations" };
- gchar* copyright = { "Copyright (C) 2014, 2015 Ole Aamot Software" };
+ gchar* comments = { _("Locate Internet Radio Stations") };
+ gchar* copyright = { _("Copyright (C) 2014, 2015 Ole Aamot Software") };
gchar* documenters[] = { NULL };
static GdkPixbuf* logo;
@@ -518,7 +518,7 @@ void about_app(GtkWidget * a, gpointer user_data)
GError* error = NULL;
logo = gdk_pixbuf_new_from_file (GIRL_DATADIR "/girl.png", &error);
if (error) {
- g_warning ("Unable to load GIRL logo: %s\n", error->message);
+ g_warning (_("Unable to load GIRL logo: %s\n"), error->message);
g_error_free (error);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]