summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStafford Mitchell Horne <shorne@gmail.com>2006-05-31 22:51:24 +0000
committerStafford Mitchell Horne <shorne@gmail.com>2006-05-31 22:51:24 +0000
commit049f2aae521e97ba700871c473ca1a00c0699c00 (patch)
tree9b91bbe37fb60ca19ff6c1e33b2e6237b39c0b3c
parent715a64d5fe4ddea5605b313307b46827995521d3 (diff)
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 SVN revision: 23039
-rwxr-xr-xautogen.sh2
-rw-r--r--src/bin/e_int_config_fonts.c80
-rw-r--r--src/bin/e_int_config_paths.c22
-rw-r--r--src/bin/e_intl.h5
4 files changed, 57 insertions, 52 deletions
diff --git a/autogen.sh b/autogen.sh
index c1c693047..4b61a5ba8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -19,7 +19,7 @@ xgettext \
19--copyright-holder="Enlightenment development team" \ 19--copyright-holder="Enlightenment development team" \
20--foreign-user \ 20--foreign-user \
21--msgid-bugs-address="enlightenment-devel@lists.sourceforge.net" \ 21--msgid-bugs-address="enlightenment-devel@lists.sourceforge.net" \
22-k -k_ -kd_ \ 22-k -k_ -kd_ -kN_ \
23--from-code=UTF-8 \ 23--from-code=UTF-8 \
24-o enlightenment.pot \ 24-o enlightenment.pot \
25`find . -name "*.[ch]" -print` || exit 1 25`find . -name "*.[ch]" -print` || exit 1
diff --git a/src/bin/e_int_config_fonts.c b/src/bin/e_int_config_fonts.c
index 6ca77f78f..72b2daf06 100644
--- a/src/bin/e_int_config_fonts.c
+++ b/src/bin/e_int_config_fonts.c
@@ -35,49 +35,49 @@ struct _CFText_Class
35}; 35};
36 36
37const E_Text_Class_Pair text_class_predefined_names[ ] = { 37const E_Text_Class_Pair text_class_predefined_names[ ] = {
38 { NULL, "Window Manager"}, 38 { NULL, N_("Window Manager")},
39 { "title_bar", "Title Bar"}, 39 { "title_bar", N_("Title Bar")},
40 { "menu_item", "Menu Item"}, 40 { "menu_item", N_("Menu Item")},
41 { "tb_plain", "Textblock Plain"}, 41 { "tb_plain", N_("Textblock Plain")},
42 { "tb_light", "Textblock Light"}, 42 { "tb_light", N_("Textblock Light")},
43 { "tb_big", "Textblock Big"}, 43 { "tb_big", N_("Textblock Big")},
44 { "move_text", "Move Text"}, 44 { "move_text", N_("Move Text")},
45 { "resize_text", "Resize Text"}, 45 { "resize_text", N_("Resize Text")},
46 { "winlist_title", "Winlist Title"}, 46 { "winlist_title", N_("Winlist Title")},
47 { "configure", "Configure Heading"}, 47 { "configure", N_("Configure Heading")},
48 { "about_title", "About Title"}, 48 { "about_title", N_("About Title")},
49 { "about_version", "About Version"}, 49 { "about_version", N_("About Version")},
50 { "button_text", "About Text"}, 50 { "button_text", N_("About Text")},
51 { "desklock_title", "Desklock Title"}, 51 { "desklock_title", N_("Desklock Title")},
52 { "desklock_passwd", "Desklock Password"}, 52 { "desklock_passwd", N_("Desklock Password")},
53 { "dialog_error", "Dialog Error"}, 53 { "dialog_error", N_("Dialog Error")},
54 { "exebuf_command", "Exebuf Command"}, 54 { "exebuf_command", N_("Exebuf Command")},
55 { "init_title", "Splash Title"}, 55 { "init_title", N_("Splash Title")},
56 { "init_text", "Splash Text"}, 56 { "init_text", N_("Splash Text")},
57 { "init_version", "Splash Version"}, 57 { "init_version", N_("Splash Version")},
58 58
59 { NULL, "Widget"}, 59 { NULL, N_("Widget")},
60 { "frame", "Frame"}, 60 { "frame", N_("Frame")},
61 { "label", "Label"}, 61 { "label", N_("Label")},
62 { "button", "Buttons"}, 62 { "button", N_("Buttons")},
63 { "slider", "Slider"}, 63 { "slider", N_("Slider")},
64 { "radio_button", "Radio Buttons"}, 64 { "radio_button", N_("Radio Buttons")},
65 { "check_button", "Check Buttons"}, 65 { "check_button", N_("Check Buttons")},
66 { "tlist", "Text List Item"}, 66 { "tlist", N_("Text List Item")},
67 { "ilist_item", "List Item"}, 67 { "ilist_item", N_("List Item")},
68 { "ilist_header", "List Header"}, 68 { "ilist_header", N_("List Header")},
69 69
70 { NULL, "EFM"}, 70 { NULL, N_("EFM")},
71 { "fileman_typebuf", "Typebuf"}, 71 { "fileman_typebuf", N_("Typebuf")},
72 { "fileman_icon", "Icon"}, 72 { "fileman_icon", N_("Icon")},
73 73
74 { NULL, "Module"}, 74 { NULL, N_("Module")},
75 { "module_small", "Small"}, 75 { "module_small", N_("Small")},
76 { "module_normal", "Normal"}, 76 { "module_normal", N_("Normal")},
77 { "module_large", "Large"}, 77 { "module_large", N_("Large")},
78 { "module_small_s", "Small Styled"}, 78 { "module_small_s", N_("Small Styled")},
79 { "module_normal_s", "Normal Styled"}, 79 { "module_normal_s", N_("Normal Styled")},
80 { "module_large_s", "Large Styled"}, 80 { "module_large_s", N_("Large Styled")},
81 81
82 { NULL, NULL} 82 { NULL, NULL}
83}; 83};
diff --git a/src/bin/e_int_config_paths.c b/src/bin/e_int_config_paths.c
index 3ebbb9b14..36fc56c18 100644
--- a/src/bin/e_int_config_paths.c
+++ b/src/bin/e_int_config_paths.c
@@ -67,25 +67,25 @@ _fill_data(E_Config_Dialog_Data *cfdata)
67{ 67{
68 cfdata->paths_available = E_NEW(E_Path_Pair, 11); 68 cfdata->paths_available = E_NEW(E_Path_Pair, 11);
69 cfdata->paths_available[0].path = path_data; 69 cfdata->paths_available[0].path = path_data;
70 cfdata->paths_available[0].path_description = "Data"; 70 cfdata->paths_available[0].path_description = _("Data");
71 cfdata->paths_available[1].path = path_images; 71 cfdata->paths_available[1].path = path_images;
72 cfdata->paths_available[1].path_description = "Images"; 72 cfdata->paths_available[1].path_description = _("Images");
73 cfdata->paths_available[2].path = path_fonts; 73 cfdata->paths_available[2].path = path_fonts;
74 cfdata->paths_available[2].path_description = "Fonts"; 74 cfdata->paths_available[2].path_description = _("Fonts");
75 cfdata->paths_available[3].path = path_themes; 75 cfdata->paths_available[3].path = path_themes;
76 cfdata->paths_available[3].path_description = "Themes"; 76 cfdata->paths_available[3].path_description = _("Themes");
77 cfdata->paths_available[4].path = path_init; 77 cfdata->paths_available[4].path = path_init;
78 cfdata->paths_available[4].path_description = "Init"; 78 cfdata->paths_available[4].path_description = _("Init");
79 cfdata->paths_available[5].path = path_icons; 79 cfdata->paths_available[5].path = path_icons;
80 cfdata->paths_available[5].path_description = "Icons"; 80 cfdata->paths_available[5].path_description = _("Icons");
81 cfdata->paths_available[6].path = path_modules; 81 cfdata->paths_available[6].path = path_modules;
82 cfdata->paths_available[6].path_description = "Modules"; 82 cfdata->paths_available[6].path_description = _("Modules");
83 cfdata->paths_available[7].path = path_backgrounds; 83 cfdata->paths_available[7].path = path_backgrounds;
84 cfdata->paths_available[7].path_description = "Backgrounds"; 84 cfdata->paths_available[7].path_description = _("Backgrounds");
85 cfdata->paths_available[8].path = path_input_methods; 85 cfdata->paths_available[8].path = path_input_methods;
86 cfdata->paths_available[8].path_description = "Input Methods"; 86 cfdata->paths_available[8].path_description = _("Input Methods");
87 cfdata->paths_available[9].path = path_messages; 87 cfdata->paths_available[9].path = path_messages;
88 cfdata->paths_available[9].path_description = "Messages"; 88 cfdata->paths_available[9].path_description = _("Messages");
89 cfdata->paths_available[10].path = NULL; 89 cfdata->paths_available[10].path = NULL;
90 cfdata->paths_available[10].path_description = NULL; 90 cfdata->paths_available[10].path_description = NULL;
91 91
@@ -146,7 +146,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
146 pcd->path = cfdata->paths_available[i].path; 146 pcd->path = cfdata->paths_available[i].path;
147 pcd->cfdata = cfdata; 147 pcd->cfdata = cfdata;
148 cfdata->pcd_list = evas_list_append(cfdata->pcd_list, pcd); 148 cfdata->pcd_list = evas_list_append(cfdata->pcd_list, pcd);
149 e_widget_ilist_append(ob, NULL, _(cfdata->paths_available[i].path_description), _ilist_path_cb_change, pcd, NULL); 149 e_widget_ilist_append(ob, NULL, cfdata->paths_available[i].path_description, _ilist_path_cb_change, pcd, NULL);
150 } 150 }
151 151
152 e_widget_ilist_go(ob); 152 e_widget_ilist_go(ob);
diff --git a/src/bin/e_intl.h b/src/bin/e_intl.h
index 02ad22da9..7cdd6c9f2 100644
--- a/src/bin/e_intl.h
+++ b/src/bin/e_intl.h
@@ -6,6 +6,11 @@
6#define _(str) gettext(str) 6#define _(str) gettext(str)
7#define d_(str, dom) dgettext(PACKAGE dom, str) 7#define d_(str, dom) dgettext(PACKAGE dom, str)
8 8
9/* This macro is used to just mark string for translation, this is useful
10 * for string lists which are not dynamically allocated
11 */
12#define N_(str) (str)
13
9typedef struct _E_Input_Method_Config E_Input_Method_Config; 14typedef struct _E_Input_Method_Config E_Input_Method_Config;
10typedef struct _E_Language_Pack E_Language_Pack; 15typedef struct _E_Language_Pack E_Language_Pack;
11 16