[gnome-control-center/gnome-2-30] Use translations from fprintd for finger ops
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-2-30] Use translations from fprintd for finger ops
- Date: Wed, 8 Sep 2010 17:57:24 +0000 (UTC)
commit 084d55f446df7eb11b8d3e96889e8de7a68245fa
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 8 18:56:28 2010 +0100
Use translations from fprintd for finger ops
Rather than rely on the translators doing double-work.
This also means translations are actually used...
capplets/about-me/gnome-about-me-fingerprint.c | 14 ++++++++++----
po/POTFILES.in | 1 -
po/POTFILES.skip | 1 +
3 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/capplets/about-me/gnome-about-me-fingerprint.c b/capplets/about-me/gnome-about-me-fingerprint.c
index 2f32254..4fbb11b 100644
--- a/capplets/about-me/gnome-about-me-fingerprint.c
+++ b/capplets/about-me/gnome-about-me-fingerprint.c
@@ -27,6 +27,9 @@
/* This must match the number of images on the 2nd page in the UI file */
#define MAX_ENROLL_STAGES 5
+/* Translate fprintd strings */
+#define TR(s) dgettext("fprintd", s)
+
static DBusGProxy *manager = NULL;
static DBusGConnection *connection = NULL;
static gboolean is_disable = FALSE;
@@ -306,7 +309,7 @@ finger_radio_button_toggled (GtkToggleButton *button, EnrollData *data)
data->finger = selected_finger (data->dialog);
- msg = g_strdup_printf (finger_str_to_msg (data->finger, data->is_swipe), data->name);
+ msg = g_strdup_printf (TR(finger_str_to_msg (data->finger, data->is_swipe)), data->name);
gtk_label_set_text (GTK_LABEL (WID("enroll-label")), msg);
g_free (msg);
}
@@ -319,7 +322,7 @@ finger_combobox_changed (GtkComboBox *combobox, EnrollData *data)
data->finger = selected_finger (data->dialog);
- msg = g_strdup_printf (finger_str_to_msg (data->finger, data->is_swipe), data->name);
+ msg = g_strdup_printf (TR(finger_str_to_msg (data->finger, data->is_swipe)), data->name);
gtk_label_set_text (GTK_LABEL (WID("enroll-label")), msg);
g_free (msg);
}
@@ -370,7 +373,7 @@ enroll_result (GObject *object, const char *result, gboolean done, EnrollData *d
}
}
- msg = g_strdup_printf (enroll_result_str_to_msg (result, data->is_swipe), data->name);
+ msg = g_strdup_printf (TR(enroll_result_str_to_msg (result, data->is_swipe)), data->name);
gtk_label_set_text (GTK_LABEL (WID ("status-label")), msg);
g_free (msg);
}
@@ -593,7 +596,7 @@ enroll_fingerprints (GtkWindow *parent, GtkWidget *enable, GtkWidget *disable)
g_object_set_data (G_OBJECT (WID("page2")), "name", "enroll");
- msg = g_strdup_printf (finger_str_to_msg (data->finger, data->is_swipe), data->name);
+ msg = g_strdup_printf (TR(finger_str_to_msg (data->finger, data->is_swipe)), data->name);
gtk_label_set_text (GTK_LABEL (WID("enroll-label")), msg);
g_free (msg);
@@ -609,6 +612,9 @@ fingerprint_button_clicked (GtkBuilder *dialog,
GtkWidget *enable,
GtkWidget *disable)
{
+ bindtextdomain ("fprintd", GNOMELOCALEDIR);
+ bind_textdomain_codeset ("fprintd", "UTF-8");
+
if (is_disable != FALSE) {
delete_fingerprints_question (dialog, enable, disable);
} else {
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ccf81df..b9239bd 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,7 +4,6 @@
gnome-control-center.schemas.in
capplets/about-me/eel-alert-dialog.c
capplets/about-me/e-image-chooser.c
-capplets/about-me/fingerprint-strings.h
capplets/about-me/gnome-about-me.c
[type: gettext/glade]capplets/about-me/gnome-about-me-dialog.ui
capplets/about-me/gnome-about-me.desktop.in.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 1ac7639..0b42c1f 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,4 +1,5 @@
capplets/about-me/gnome-about-me.desktop.in
+capplets/about-me/fingerprint-strings.h
capplets/accessibility/at-properties/at-properties.desktop.in
capplets/accessibility/keyboard/accessibility-keyboard.desktop.in
capplets/appearance/data/gnome-appearance-properties.desktop.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]