Add translation contexts



Hi,

I want to patch Balsa to add context informations but the strings are
used in a initializer so the macro Q_ is not appropriated:

Index: libbalsa/source-viewer.c
===================================================================
--- libbalsa/source-viewer.c    (révision 7714)
+++ libbalsa/source-viewer.c    (copie de travail)
@@ -40,9 +40,12 @@
 /* Normal items */
 static GtkActionEntry entries[] = {
     /* Top level */
-    {"FileMenu", NULL, N_("_File")},
-    {"EditMenu", NULL, N_("_Edit")},
-    {"ViewMenu", NULL, N_("_View")},
+    /* This is the text that should appear on a menu title.
+     * Don't include the prefix 'menu title|' in the translation.
+     */
+    {"FileMenu", NULL, Q_("menu title|_File")},
+    {"EditMenu", NULL, Q_("menu title|_Edit")},
+    {"ViewMenu", NULL, Q_("menu title|_View")},
     /* Items */
     {"Close", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
      N_("Close the window"), G_CALLBACK(close_cb)},

Does anyone have a solution?

Regards,
Stéphane


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