Enlightenment CVS committal

Author  : shorne
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_fonts.c e_int_config_paths.c e_intl.h 


Log Message:
Add macro for N_ for marking string for translation
 * Can be used to get static context strings translated
 * I guess this is the best way to do it, see here: 
   http://www.gnu.org/software/gettext/manual/html_node/gettext_153.html
   http://www.gnu.org/software/gettext/manual/html_node/gettext_19.html   


===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_fonts.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_int_config_fonts.c        31 May 2006 00:32:26 -0000      1.13
+++ e_int_config_fonts.c        31 May 2006 22:51:24 -0000      1.14
@@ -35,49 +35,49 @@
 };
 
 const E_Text_Class_Pair text_class_predefined_names[ ] = {
-       {  NULL,                    "Window Manager"},
-       { "title_bar",      "Title Bar"},
-       { "menu_item",      "Menu Item"},
-       { "tb_plain",       "Textblock Plain"},
-       { "tb_light",        "Textblock Light"},
-       { "tb_big",          "Textblock Big"},
-       { "move_text",       "Move Text"},
-       { "resize_text",     "Resize Text"},
-       { "winlist_title",   "Winlist Title"},
-       { "configure",       "Configure Heading"},
-       { "about_title",     "About Title"},
-       { "about_version",   "About Version"},
-       { "button_text",     "About Text"},
-       { "desklock_title",  "Desklock Title"},
-       { "desklock_passwd", "Desklock Password"},
-       { "dialog_error",    "Dialog Error"},
-       { "exebuf_command",  "Exebuf Command"},
-       { "init_title",      "Splash Title"},
-       { "init_text",       "Splash Text"},
-       { "init_version",    "Splash Version"},
+       {  NULL,                    N_("Window Manager")},
+       { "title_bar",      N_("Title Bar")},
+       { "menu_item",      N_("Menu Item")},
+       { "tb_plain",       N_("Textblock Plain")},
+       { "tb_light",        N_("Textblock Light")},
+       { "tb_big",          N_("Textblock Big")},
+       { "move_text",       N_("Move Text")},
+       { "resize_text",     N_("Resize Text")},
+       { "winlist_title",   N_("Winlist Title")},
+       { "configure",       N_("Configure Heading")},
+       { "about_title",     N_("About Title")},
+       { "about_version",   N_("About Version")},
+       { "button_text",     N_("About Text")},
+       { "desklock_title",  N_("Desklock Title")},
+       { "desklock_passwd", N_("Desklock Password")},
+       { "dialog_error",    N_("Dialog Error")},
+       { "exebuf_command",  N_("Exebuf Command")},
+       { "init_title",      N_("Splash Title")},
+       { "init_text",       N_("Splash Text")},
+       { "init_version",    N_("Splash Version")},
        
-       {  NULL,                    "Widget"},
-       { "frame",           "Frame"},
-       { "label",           "Label"},
-       { "button",         "Buttons"},
-       { "slider",         "Slider"},
-       { "radio_button",    "Radio Buttons"},
-       { "check_button",    "Check Buttons"},
-       { "tlist",           "Text List Item"},
-       { "ilist_item",     "List Item"},
-       { "ilist_header",    "List Header"},
+       {  NULL,                    N_("Widget")},
+       { "frame",           N_("Frame")},
+       { "label",           N_("Label")},
+       { "button",         N_("Buttons")},
+       { "slider",         N_("Slider")},
+       { "radio_button",    N_("Radio Buttons")},
+       { "check_button",    N_("Check Buttons")},
+       { "tlist",           N_("Text List Item")},
+       { "ilist_item",     N_("List Item")},
+       { "ilist_header",    N_("List Header")},
      
-       {  NULL,                    "EFM"},
-       { "fileman_typebuf", "Typebuf"},
-       { "fileman_icon",    "Icon"},
+       {  NULL,                    N_("EFM")},
+       { "fileman_typebuf", N_("Typebuf")},
+       { "fileman_icon",    N_("Icon")},
        
-       {  NULL,                    "Module"},
-       { "module_small",    "Small"},
-       { "module_normal",   "Normal"},
-       { "module_large",    "Large"},
-       { "module_small_s",  "Small Styled"},
-       { "module_normal_s", "Normal Styled"},
-       { "module_large_s",  "Large Styled"},
+       {  NULL,                    N_("Module")},
+       { "module_small",    N_("Small")},
+       { "module_normal",   N_("Normal")},
+       { "module_large",    N_("Large")},
+       { "module_small_s",  N_("Small Styled")},
+       { "module_normal_s", N_("Normal Styled")},
+       { "module_large_s",  N_("Large Styled")},
        
        { NULL, NULL}
 };
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_paths.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_int_config_paths.c        9 Apr 2006 11:55:18 -0000       1.1
+++ e_int_config_paths.c        31 May 2006 22:51:24 -0000      1.2
@@ -67,25 +67,25 @@
 {
    cfdata->paths_available = E_NEW(E_Path_Pair, 11);
    cfdata->paths_available[0].path =                   path_data;
-   cfdata->paths_available[0].path_description =       "Data";
+   cfdata->paths_available[0].path_description =       _("Data");
    cfdata->paths_available[1].path =                   path_images;
-   cfdata->paths_available[1].path_description =       "Images";
+   cfdata->paths_available[1].path_description =       _("Images");
    cfdata->paths_available[2].path =                   path_fonts;
-   cfdata->paths_available[2].path_description =       "Fonts";
+   cfdata->paths_available[2].path_description =       _("Fonts");
    cfdata->paths_available[3].path =                   path_themes;
-   cfdata->paths_available[3].path_description =       "Themes";
+   cfdata->paths_available[3].path_description =       _("Themes");
    cfdata->paths_available[4].path =                   path_init;
-   cfdata->paths_available[4].path_description =       "Init";
+   cfdata->paths_available[4].path_description =       _("Init");
    cfdata->paths_available[5].path =                   path_icons;
-   cfdata->paths_available[5].path_description =       "Icons";
+   cfdata->paths_available[5].path_description =       _("Icons");
    cfdata->paths_available[6].path =                   path_modules;
-   cfdata->paths_available[6].path_description =       "Modules";
+   cfdata->paths_available[6].path_description =       _("Modules");
    cfdata->paths_available[7].path =                   path_backgrounds;
-   cfdata->paths_available[7].path_description =       "Backgrounds";
+   cfdata->paths_available[7].path_description =       _("Backgrounds");
    cfdata->paths_available[8].path =                   path_input_methods;
-   cfdata->paths_available[8].path_description =       "Input Methods";
+   cfdata->paths_available[8].path_description =       _("Input Methods");
    cfdata->paths_available[9].path =                   path_messages;
-   cfdata->paths_available[9].path_description =       "Messages";
+   cfdata->paths_available[9].path_description =       _("Messages");
    cfdata->paths_available[10].path =                   NULL;
    cfdata->paths_available[10].path_description =       NULL;
    
@@ -146,7 +146,7 @@
        pcd->path = cfdata->paths_available[i].path;
        pcd->cfdata = cfdata;
        cfdata->pcd_list = evas_list_append(cfdata->pcd_list, pcd);
-       e_widget_ilist_append(ob, NULL, 
_(cfdata->paths_available[i].path_description), _ilist_path_cb_change, pcd, 
NULL);
+       e_widget_ilist_append(ob, NULL, 
cfdata->paths_available[i].path_description, _ilist_path_cb_change, pcd, NULL);
      }
 
    e_widget_ilist_go(ob);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_intl.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_intl.h    13 Mar 2006 13:51:22 -0000      1.12
+++ e_intl.h    31 May 2006 22:51:24 -0000      1.13
@@ -6,6 +6,11 @@
 #define _(str) gettext(str)
 #define d_(str, dom) dgettext(PACKAGE dom, str)
 
+/* This macro is used to just mark string for translation, this is useful
+ * for string lists which are not dynamically allocated 
+ */
+#define N_(str) (str)
+
 typedef struct _E_Input_Method_Config E_Input_Method_Config;
 typedef struct _E_Language_Pack E_Language_Pack;
 




_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to