[gimp] app: Fix dockable separator translations



commit 3352b0485c42c48824731feac75ed3d222ed8888
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Mar 13 12:16:20 2010 +0100

    app: Fix dockable separator translations
    
    Continued fix of bug 554927. Also translate the " - " string in the
    toolbox and add a "dock" translation context.

 app/widgets/gimpdock.c       |    4 ++--
 app/widgets/gimpdock.h       |   14 ++++++++++++++
 app/widgets/gimpdockwindow.c |    2 +-
 app/widgets/gimptoolbox.c    |    2 +-
 po/POTFILES.in               |    1 +
 5 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c
index 5e685e5..1ea4785 100644
--- a/app/widgets/gimpdock.c
+++ b/app/widgets/gimpdock.c
@@ -269,13 +269,13 @@ gimp_dock_real_get_title (GimpDock *dock)
           g_string_append (title, gimp_dockable_get_name (dockable));
 
           if (g_list_next (child))
-            g_string_append (title, _(", "));
+            g_string_append (title, GIMP_DOCK_DOCKABLE_SEPARATOR);
         }
 
       g_list_free (children);
 
       if (g_list_next (list))
-        g_string_append (title, _(" - "));
+        g_string_append (title, GIMP_DOCK_BOOK_SEPARATOR);
     }
 
   return g_string_free (title, FALSE);
diff --git a/app/widgets/gimpdock.h b/app/widgets/gimpdock.h
index eac2752..b181000 100644
--- a/app/widgets/gimpdock.h
+++ b/app/widgets/gimpdock.h
@@ -30,6 +30,20 @@
 #define GIMP_DOCK_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DOCK, GimpDockClass))
 
 
+/* String used to separate dockables, e.g. "Tool Options, Layers" */
+#define GIMP_DOCK_DOCKABLE_SEPARATOR C_("dock", ", ")
+
+/* String used to separate books (GtkNotebooks) within a dock,
+   e.g. "Tool Options, Layers - Brushes"
+ */
+#define GIMP_DOCK_BOOK_SEPARATOR C_("dock", " - ")
+
+/* String used to separate dock columns,
+   e.g. "Tool Options, Layers - Brushes | Gradients"
+ */
+#define GIMP_DOCK_COLUMN_SEPARATOR C_("dock", " | ")
+
+
 typedef struct _GimpDockClass    GimpDockClass;
 typedef struct _GimpDockPrivate  GimpDockPrivate;
 
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index 139a135..4ed524e 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -742,7 +742,7 @@ gimp_dock_window_update_title_idle (GimpDockWindow *dock_window)
       g_free (title);
 
       if (g_list_next (iter))
-        g_string_append (complete_title, _(" | "));
+        g_string_append (complete_title, GIMP_DOCK_COLUMN_SEPARATOR);
     }
 
   if (complete_title->len > 0)
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 9c801fb..ec7d7ca 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -774,7 +774,7 @@ gimp_toolbox_get_title (GimpDock *dock)
 
   if (dock_title && strlen (dock_title) > 0)
     {
-      g_string_append (title, " - ");
+      g_string_append (title, GIMP_DOCK_BOOK_SEPARATOR);
       g_string_append (title, dock_title);
     }
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8cbaa5a..548f11e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -414,6 +414,7 @@ app/widgets/gimpdevicestatus.c
 app/widgets/gimpdnd-xds.c
 app/widgets/gimpdnd.c
 app/widgets/gimpdock.c
+app/widgets/gimpdock.h
 app/widgets/gimpdockable.c
 app/widgets/gimpdockwindow.c
 app/widgets/gimpdocumentview.c



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