[gcalctool] Mark strings for translation that were missing (Gert Kulyk, Bug #614491)
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcalctool] Mark strings for translation that were missing (Gert Kulyk, Bug #614491)
- Date: Wed, 31 Mar 2010 22:34:23 +0000 (UTC)
commit 187e2d3e7b23c5c83e61eed2e6dc096becdea590
Author: Robert Ancell <robert ancell gmail com>
Date: Thu Apr 1 09:33:35 2010 +1100
Mark strings for translation that were missing (Gert Kulyk, Bug #614491)
NEWS | 2 ++
src/gtk.c | 26 +++++++++++++++++++++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 2972246..3b7ddfb 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,8 @@ Overview of changes in gcalctool 5.31.1
* Fix bug stopping translations from working (Gert Kulyk, Bug #614489)
+ * Mark strings for translation that were missing (Gert Kulyk, Bug #614491)
+
Overview of changes in gcalctool 5.30.0
* Fix errors in variable exponents (e.g. xy²)
diff --git a/src/gtk.c b/src/gtk.c
index aa13844..d8b93c9 100644
--- a/src/gtk.c
+++ b/src/gtk.c
@@ -1635,6 +1635,7 @@ create_main_window()
GtkWidget *widget;
PangoFontDescription *font_desc;
GtkCellRenderer *renderer;
+ gchar *string, **tokens;
X.ui = gtk_builder_new();
load_ui(X.ui, UI_FILE);
@@ -1820,7 +1821,30 @@ create_main_window()
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), renderer, TRUE);
gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(widget), renderer, "text", 0);
- // _("Show %d decimal places") decimal_places_label1, decimal_places_label2
+ /* Label used in preferences dialog. The %d is replaced by a spinbutton */
+ string = _("Show %d decimal places");
+ tokens = g_strsplit(string, "%d", 2);
+ widget = GET_WIDGET("decimal_places_label1");
+ if (tokens[0])
+ string = g_strstrip(tokens[0]);
+ else
+ string = "";
+ if (string[0] != '\0')
+ gtk_label_set_text(GTK_LABEL(widget), string);
+ else
+ gtk_widget_hide(widget);
+
+ widget = GET_WIDGET("decimal_places_label2");
+ if (tokens[0] && tokens[1])
+ string = g_strstrip(tokens[1]);
+ else
+ string = "";
+ if (string[0] != '\0')
+ gtk_label_set_text(GTK_LABEL(widget), string);
+ else
+ gtk_widget_hide(widget);
+
+ g_strfreev(tokens);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]