Add calls to bindtext* for i18n. Add -DGNOMELOCALEDIR="\".....\"" Mark

2002-04-30  Kjartan Maraas  <kmaraas@gnome.org>

	* factory.c: Add calls to bindtext* for i18n.
	* Makefile.am: Add -DGNOMELOCALEDIR="\".....\""
	* gnome-settings-font.c: Mark strings and add #includes.
	* gnome-settings-screensaver.c: Same
	* gnome-settings-sound.c: Same.
	* gnome-settings-xsettings.c: Same.
	* gnome-settings-wm.c: Fix a warning.
This commit is contained in:
Kjartan Maraas 2002-04-30 09:45:05 +00:00 committed by Kjartan Maraas
parent a5bfc8ec6b
commit 7e5b5a29d7
8 changed files with 33 additions and 12 deletions

View file

@ -1,3 +1,13 @@
2002-04-30 Kjartan Maraas <kmaraas@gnome.org>
* factory.c: Add calls to bindtext* for i18n.
* Makefile.am: Add -DGNOMELOCALEDIR="\".....\""
* gnome-settings-font.c: Mark strings and add #includes.
* gnome-settings-screensaver.c: Same
* gnome-settings-sound.c: Same.
* gnome-settings-xsettings.c: Same.
* gnome-settings-wm.c: Fix a warning.
2002-04-24 Jody Goldberg <jody@gnome.org>
* gnome-settings-accessibility-keyboard.c (set_server_from_gconf) :

View file

@ -1,4 +1,4 @@
INCLUDES=$(GNOME_SETTINGS_DAEMON_CFLAGS) -I$(top_srcdir)/libbackground -I$(top_srcdir)
INCLUDES=$(GNOME_SETTINGS_DAEMON_CFLAGS) -I$(top_srcdir)/libbackground -I$(top_srcdir) -DGNOMELOCALEDIR="\"$(datadir)/locale\""
bin_PROGRAMS=gnome-settings-daemon

View file

@ -18,6 +18,10 @@ int main (int argc, char *argv [])
Bonobo_RegistrationResult ret;
gchar *restart_argv[] = { "gnome-settings-daemon", *argv, 0 };
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
gnome_program_init ("gnome-settings-daemon", VERSION, LIBGNOMEUI_MODULE,
argc, argv, NULL);

View file

@ -1,5 +1,7 @@
#include <config.h>
#include <gdk/gdkx.h>
#include <gconf/gconf.h>
#include <libgnome/gnome-i18n.h>
#include "gnome-settings-daemon.h"
#include <dirent.h>
#include <sys/types.h>
@ -69,8 +71,8 @@ load_cursor (GConfClient *client)
0,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Cannot create the directory \"%s\".\n"\
"This is needed to allow changing cursors.",
(_("Cannot create the directory \"%s\".\n"\
"This is needed to allow changing cursors.")),
dir_name);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);

View file

@ -24,6 +24,7 @@
#include <config.h>
#include <libgnome/gnome-i18n.h>
#include "gnome-settings-screensaver.h"
#include <gtk/gtkcheckbutton.h>
@ -88,9 +89,9 @@ gnome_settings_screensaver_load (GConfClient *client)
0,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
"There was an error starting up the screensaver:\n\n"
_("There was an error starting up the screensaver:\n\n"
"%s\n\n"
"Screensaver functionality will not work in this session.",
"Screensaver functionality will not work in this session."),
gerr->message);
g_signal_connect (dialog, "response",
@ -98,7 +99,7 @@ gnome_settings_screensaver_load (GConfClient *client)
NULL);
toggle = gtk_check_button_new_with_mnemonic (
"_Do not show this message again");
_("_Do not show this message again"));
gtk_widget_show (toggle);
if (gconf_client_key_is_writable (client, SHOW_STARTUP_ERRORS_KEY, NULL))

View file

@ -33,6 +33,7 @@
#include <sys/types.h>
#include <gconf/gconf-client.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-sound.h>
#include <libgnome/gnome-util.h>
#include <libgnome/gnome-exec.h>
@ -55,7 +56,7 @@ start_esd (void)
time_t starttime;
GnomeClient *client = gnome_master_client ();
g_print ("Starting esd\n");
g_print (_("Starting esd\n"));
esdpid = gnome_execute_async (NULL, 2, (char **)esd_cmdline);
g_snprintf (argbuf, sizeof (argbuf), "%d", esdpid);
tmpargv[0] = "kill"; tmpargv[1] = argbuf; tmpargv[2] = NULL;
@ -80,7 +81,7 @@ start_esd (void)
static void
stop_esd (void)
{
g_print ("Stopping esd\n");
g_print (_("Stopping esd\n"));
/* Can't think of a way to do this reliably, so we fake it for now */
esd_standby (gnome_sound_connection_get ());
}
@ -123,7 +124,7 @@ reload_foreach_cb (SoundEvent *event, gpointer data)
sid = gnome_sound_sample_load (key, file);
if (sid < 0)
g_warning ("Couldn't load sound file %s as sample %s",
g_warning (_("Couldn't load sound file %s as sample %s"),
file, key);
g_free (key);
@ -155,7 +156,7 @@ apply_settings (void)
if (!inited || event_changed_old != event_changed_new)
{
SoundProperties *props;
g_print ("Reloading events\n");
g_print (_("Reloading events\n"));
inited = TRUE;
event_changed_old = event_changed_new;

View file

@ -41,7 +41,7 @@ set_workspace_names (GSList *values)
unsigned char *str;
value = list->data;
str = gconf_value_get_string (value);
str = (unsigned char *)gconf_value_get_string (value);
if (!g_utf8_validate (str, -1, NULL)) {
continue;

View file

@ -1,5 +1,8 @@
#include <config.h>
#include <string.h>
#include <stdio.h>
#include <glib.h>
#include <libgnome/gnome-i18n.h>
#include "gnome-settings-daemon.h"
#include "gnome-settings-xsettings.h"
@ -151,7 +154,7 @@ process_value (TranslationEntry *trans,
}
else
{
g_warning ("GConf key %s set to type %s but its expected type was %s\n",
g_warning (_("GConf key %s set to type %s but its expected type was %s\n"),
trans->gconf_key,
type_to_string (val->type),
type_to_string (trans->gconf_type));