[bijiben] colorDialog editorToolbar tagsDialog : Mark strings to translate



commit 0e53c307c300f51a81adec9a8869a3a57ef3fae4
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Mon Jan 28 00:06:10 2013 +0100

    colorDialog editorToolbar tagsDialog : Mark strings to translate
    
    Use ngettext for main toolbar

 po/POTFILES.in            |    2 ++
 src/bjb-color-button.c    |    4 +++-
 src/bjb-editor-toolbar.c  |    6 +++---
 src/bjb-main-toolbar.c    |    2 +-
 src/bjb-note-tag-dialog.c |    6 ++++--
 5 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cf11e12..2908f90 100755
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,8 +1,10 @@
 # List of source files containing translatable strings.
 data/bijiben.desktop.in.in
 src/bjb-app-menu.c
+src/bjb-color-button.c
 src/bjb-editor-toolbar.c
 src/bjb-main-toolbar.c
+src/bjb-note-tag-dialog.c
 src/bjb-note-view.c
 src/bjb-selection-toolbar.c
 src/bjb-settings.c
diff --git a/src/bjb-color-button.c b/src/bjb-color-button.c
index 7911674..23d38dc 100644
--- a/src/bjb-color-button.c
+++ b/src/bjb-color-button.c
@@ -20,6 +20,8 @@
  * Just overrides the dialog to choose specific palette
  * But a dedicated dialog might be better */
 
+#include <glib/gi18n.h>
+
 #include "bjb-color-button.h"
 
 // Bijiben probably wants something like 6 light colors
@@ -141,7 +143,7 @@ bjb_color_button_init (BjbColorButton *self)
   BjbColorButtonPrivate *priv = BJB_COLOR_BUTTON_GET_PRIVATE(self);
   self->priv = priv;
 
-  priv->title = "Choose a color for note";
+  priv->title = _("Choose a color for note");
 }
 
 static void
diff --git a/src/bjb-editor-toolbar.c b/src/bjb-editor-toolbar.c
index 8a112a6..d1dd892 100644
--- a/src/bjb-editor-toolbar.c
+++ b/src/bjb-editor-toolbar.c
@@ -146,21 +146,21 @@ bjb_editor_toolbar_init (BjbEditorToolbar *self)
   gtk_widget_show_all (GTK_WIDGET (priv->group));
 
   /* Cut */
-  priv->toolbar_cut = gtk_button_new_with_label ("Cut");
+  priv->toolbar_cut = gtk_button_new_with_label (_("Cut"));
   gtk_container_add (GTK_CONTAINER (priv->box), priv->toolbar_cut);
   gtk_widget_override_background_color (priv->toolbar_cut,
                                         GTK_STATE_FLAG_NORMAL,
                                         &black);
 
   /* Copy */
-  priv->toolbar_copy = gtk_button_new_with_label ("Copy");
+  priv->toolbar_copy = gtk_button_new_with_label (_("Copy"));
   gtk_container_add (GTK_CONTAINER (priv->box), priv->toolbar_copy);
   gtk_widget_override_background_color (priv->toolbar_copy,
                                         GTK_STATE_FLAG_NORMAL,
                                         &black);
 
   /* 'n paste */
-  priv->toolbar_paste = gtk_button_new_with_label ("Paste");
+  priv->toolbar_paste = gtk_button_new_with_label (_("Paste"));
   gtk_container_add (GTK_CONTAINER (priv->box), priv->toolbar_paste);
   gtk_widget_override_background_color (priv->toolbar_paste,
                                         GTK_STATE_FLAG_NORMAL,
diff --git a/src/bjb-main-toolbar.c b/src/bjb-main-toolbar.c
index 974067d..94a6e6d 100644
--- a/src/bjb-main-toolbar.c
+++ b/src/bjb-main-toolbar.c
@@ -178,7 +178,7 @@ update_selection_label (GdMainView *view, BjbMainToolbar *self)
   if (length == 0)
     label = g_strdup(_("Click on items to select them"));
   else
-    label = g_strdup_printf (_("%d selected"), length);
+    label = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE, "%d selected", "%d selected", length),length);
 
   gd_main_toolbar_set_labels (self->priv->toolbar, NULL, label);
   g_free (label);
diff --git a/src/bjb-note-tag-dialog.c b/src/bjb-note-tag-dialog.c
index add9b87..f0bd71b 100644
--- a/src/bjb-note-tag-dialog.c
+++ b/src/bjb-note-tag-dialog.c
@@ -15,6 +15,8 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <glib/gi18n.h>
+
 #include "bjb-note-tag-dialog.h"
 #include "bjb-window-base.h"
 
@@ -262,7 +264,7 @@ bjb_note_tag_dialog_constructed (GObject *obj)
   area = gtk_dialog_get_content_area (GTK_DIALOG (self));
   gtk_container_set_border_width (GTK_CONTAINER (area), 8);
 
-  label = gtk_label_new ("Enter a name to create a tag");
+  label = gtk_label_new (_("Enter a name to create a tag"));
   gtk_box_pack_start (GTK_BOX (area), label, FALSE, FALSE, 2);
 
   /* New Tag */
@@ -272,7 +274,7 @@ bjb_note_tag_dialog_constructed (GObject *obj)
   self->priv->entry = gtk_entry_new();
   gtk_box_pack_start (GTK_BOX (hbox), self->priv->entry, TRUE, TRUE, 0);
 
-  new = gtk_button_new_with_label ("New tag");
+  new = gtk_button_new_with_label (_("New tag"));
   g_signal_connect_swapped (new, "clicked", G_CALLBACK (add_new_tag), self);
 
   gtk_box_pack_start (GTK_BOX (hbox), new, FALSE, FALSE, 2);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]