ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=08547bbd3aa8c74c7364581fe890b18786fcdb4b
commit 08547bbd3aa8c74c7364581fe890b18786fcdb4b Author: Andy Williams <a...@andywilliams.me> Date: Mon Sep 11 21:06:22 2017 +0100 Add translation support Fixes T5901 --- Makefile.am | 4 + configure.ac | 13 + po/POTFILES.in | 27 +- po/edi.pot | 830 ++++++++++++++++++++++++ src/bin/edi_build_main.c | 18 +- src/bin/edi_consolepanel.c | 2 +- src/bin/edi_debugpanel.c | 12 +- src/bin/edi_filepanel.c | 40 +- src/bin/edi_main.c | 166 +++-- src/bin/edi_private.h | 11 + src/bin/editor/edi_editor.c | 14 +- src/bin/editor/edi_editor_documentation.c | 10 +- src/bin/editor/edi_editor_search.c | 14 +- src/bin/language/edi_language_provider_c.c | 4 +- src/bin/language/edi_language_provider_python.c | 2 +- src/bin/language/edi_language_provider_rust.c | 2 +- src/bin/mainview/edi_mainview.c | 8 +- src/bin/mainview/edi_mainview_panel.c | 12 +- src/bin/screens/edi_about.c | 14 +- src/bin/screens/edi_file_screens.c | 44 +- src/bin/screens/edi_scm_screens.c | 40 +- src/bin/screens/edi_screens.c | 8 +- src/bin/screens/edi_settings.c | 50 +- src/bin/screens/edi_welcome.c | 54 +- 24 files changed, 1137 insertions(+), 262 deletions(-) diff --git a/Makefile.am b/Makefile.am index ced212e..f38f2f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,6 +65,10 @@ EXTRA_DIST = \ m4/efl_compiler_flag.m4 \ m4/efl_path_max.m4 +if HAVE_PO +SUBDIRS += po +endif + if EFL_HAVE_LCOV lcov-reset: diff --git a/configure.ac b/configure.ac index 858ac91..438c22b 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,19 @@ EFL_INIT AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) +po_makefile_in=po/Makefile.in +have_po="yes" + +AC_SUBST([LTLIBINTL]) +if test "x$LIBINTL" = "x"; then + LIBINTL="$INTLLIBS" +fi + +if test "x${POSUB}" = "x" ; then + have_po="no" +fi + +AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"]) # if cross compiling, disable NLS support. # It's not worth the trouble, at least for now. diff --git a/po/POTFILES.in b/po/POTFILES.in index a25939e..d3b6fa9 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,2 +1,27 @@ +src/bin/mainview/edi_mainview.c +src/bin/mainview/edi_mainview_panel.c +src/bin/mainview/edi_mainview_item.c +src/bin/edi_content_provider.c +src/bin/editor/edi_editor_documentation.c +src/bin/editor/edi_editor.c +src/bin/editor/edi_editor_search.c +src/bin/screens/edi_screens.c +src/bin/screens/edi_welcome.c +src/bin/screens/edi_file_screens.c +src/bin/screens/edi_settings.c +src/bin/screens/edi_about.c +src/bin/screens/edi_settings_font.c +src/bin/screens/edi_scm_screens.c +src/bin/edi_debugpanel.c +src/bin/language/edi_language_provider_c.c +src/bin/language/edi_language_provider_python.c +src/bin/language/edi_language_provider_rust.c +src/bin/language/edi_language_provider.c +src/bin/edi_filepanel.c +src/bin/edi_build_main.c +src/bin/edi_file.c src/bin/edi_main.c -src/bin/edi_private.h +src/bin/edi_logpanel.c +src/bin/edi_searchpanel.c +src/bin/edi_config.c +src/bin/edi_consolepanel.c diff --git a/po/edi.pot b/po/edi.pot new file mode 100644 index 0000000..f3671e2 --- /dev/null +++ b/po/edi.pot @@ -0,0 +1,830 @@ +# SOME DESCRIPTIVE TITLE. +# This file is put in the public domain. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: edi 0.5.99\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2017-09-11 21:05+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <l...@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/bin/mainview/edi_mainview.c:517 +msgid "Search for (whole project)" +msgstr "" + +#: src/bin/mainview/edi_mainview.c:526 +msgid "Please enter a term to search for within<br> the whole project." +msgstr "" + +#: src/bin/mainview/edi_mainview.c:554 +#: src/bin/mainview/edi_mainview_panel.c:700 +#: src/bin/editor/edi_editor_search.c:518 +#: src/bin/screens/edi_file_screens.c:221 +#: src/bin/screens/edi_file_screens.c:282 +#: src/bin/screens/edi_file_screens.c:343 src/bin/screens/edi_scm_screens.c:266 +msgid "Cancel" +msgstr "" + +#: src/bin/mainview/edi_mainview.c:560 src/bin/editor/edi_editor_search.c:502 +#: src/bin/edi_main.c:428 +msgid "Search" +msgstr "" + +#: src/bin/mainview/edi_mainview_panel.c:415 +msgid "Unrecognized file type" +msgstr "" + +#: src/bin/mainview/edi_mainview_panel.c:432 +msgid "" +"To force open, select this file in the file browser, <br>and use \"open as\" " +"menu options." +msgstr "" + +#: src/bin/mainview/edi_mainview_panel.c:447 src/bin/screens/edi_screens.c:122 +#: src/bin/screens/edi_welcome.c:70 src/bin/screens/edi_file_screens.c:28 +#: src/bin/screens/edi_scm_screens.c:32 src/bin/screens/edi_scm_screens.c:300 +msgid "OK" +msgstr "" + +#: src/bin/mainview/edi_mainview_panel.c:674 +msgid "Enter line number" +msgstr "" + +#: src/bin/mainview/edi_mainview_panel.c:706 +msgid "Go" +msgstr "" + +#: src/bin/editor/edi_editor_documentation.c:63 +msgid "Parameters" +msgstr "" + +#: src/bin/editor/edi_editor_documentation.c:66 +msgid "Returns" +msgstr "" + +#: src/bin/editor/edi_editor_documentation.c:69 +msgid "See also" +msgstr "" + +#: src/bin/editor/edi_editor_documentation.c:138 +msgid "No help available for this term" +msgstr "" + +#: src/bin/editor/edi_editor_documentation.c:160 src/bin/edi_main.c:1101 +#: src/bin/edi_main.c:1180 +msgid "Close" +msgstr "" + +#: src/bin/editor/edi_editor.c:73 +msgid "Confirmation" +msgstr "" + +#: src/bin/editor/edi_editor.c:88 +msgid "" +"File contents have changed. Would you like to reload <br> the contents of " +"this file?" +msgstr "" + +#: src/bin/editor/edi_editor.c:103 +msgid "Reload" +msgstr "" + +#: src/bin/editor/edi_editor.c:108 +msgid "No, continue editing" +msgstr "" + +#: src/bin/editor/edi_editor.c:676 +#, c-format +msgid "Line:%d, Column:%d" +msgstr "" + +#: src/bin/editor/edi_editor.c:719 +msgid "WIN" +msgstr "" + +#: src/bin/editor/edi_editor.c:721 +msgid "UNIX" +msgstr "" + +#: src/bin/editor/edi_editor_search.c:442 +msgid "Search term:" +msgstr "" + +#: src/bin/editor/edi_editor_search.c:465 +msgid "Replace term:" +msgstr "" + +#: src/bin/editor/edi_editor_search.c:492 +msgid "Reached end of file, starting from beginning" +msgstr "" + +#: src/bin/editor/edi_editor_search.c:496 +msgid "Wrap search?" +msgstr "" + +#: src/bin/editor/edi_editor_search.c:510 +msgid "Replace" +msgstr "" + +#: src/bin/screens/edi_screens.c:40 +msgid "Confirmation required" +msgstr "" + +#: src/bin/screens/edi_screens.c:73 +msgid "Yes" +msgstr "" + +#: src/bin/screens/edi_screens.c:79 +msgid "No" +msgstr "" + +#: src/bin/screens/edi_welcome.c:78 +msgid "Delete" +msgstr "" + +#: src/bin/screens/edi_welcome.c:93 +msgid "That project directory no longer exists" +msgstr "" + +#: src/bin/screens/edi_welcome.c:133 +msgid "Choose a Project Folder" +msgstr "" + +#: src/bin/screens/edi_welcome.c:170 +msgid "Select folder" +msgstr "" + +#: src/bin/screens/edi_welcome.c:321 +msgid "Select the project type" +msgstr "" + +#: src/bin/screens/edi_welcome.c:428 +msgid "Project Type" +msgstr "" + +#: src/bin/screens/edi_welcome.c:429 src/bin/screens/edi_welcome.c:484 +msgid "Parent Path" +msgstr "" + +#: src/bin/screens/edi_welcome.c:430 src/bin/screens/edi_welcome.c:485 +msgid "Project Name" +msgstr "" + +#: src/bin/screens/edi_welcome.c:431 +msgid "Project URL" +msgstr "" + +#: src/bin/screens/edi_welcome.c:433 src/bin/screens/edi_welcome.c:435 +msgid "Creator Name" +msgstr "" + +#: src/bin/screens/edi_welcome.c:436 +msgid "Creator Email" +msgstr "" + +#: src/bin/screens/edi_welcome.c:439 src/bin/screens/edi_file_screens.c:288 +#: src/bin/screens/edi_file_screens.c:349 +msgid "Create" +msgstr "" + +#: src/bin/screens/edi_welcome.c:446 src/bin/screens/edi_welcome.c:654 +msgid "Create New Project" +msgstr "" + +#: src/bin/screens/edi_welcome.c:466 +msgid "Unable to clone project, please check URL or try again later" +msgstr "" + +#: src/bin/screens/edi_welcome.c:483 +msgid "Source Control URL" +msgstr "" + +#: src/bin/screens/edi_welcome.c:488 +msgid "Checkout" +msgstr "" + +#: src/bin/screens/edi_welcome.c:495 src/bin/screens/edi_welcome.c:658 +msgid "Checkout Existing Project" +msgstr "" + +#: src/bin/screens/edi_welcome.c:599 +msgid "Welcome to Edi" +msgstr "" + +#: src/bin/screens/edi_welcome.c:625 +msgid "Recent Projects:" +msgstr "" + +#: src/bin/screens/edi_welcome.c:634 +msgid "Open Existing Project" +msgstr "" + +#: src/bin/screens/edi_welcome.c:663 +msgid "Choose Project" +msgstr "" + +#: src/bin/screens/edi_file_screens.c:61 +msgid "Please enter a file name." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:76 +msgid "Unable to write file." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:100 +msgid "Please enter a directory name." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:132 +msgid "Please enter a valid name." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:141 +msgid "Directory with that name already exists." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:143 +msgid "File with that name already exists." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:176 +msgid "Rename directory" +msgstr "" + +#: src/bin/screens/edi_file_screens.c:179 +msgid "Rename file" +msgstr "" + +#: src/bin/screens/edi_file_screens.c:185 +msgid "Please enter a new name for this directory." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:187 +msgid "Please enter a new name for this file." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:228 +msgid "Rename" +msgstr "" + +#: src/bin/screens/edi_file_screens.c:245 +msgid "Enter new file name" +msgstr "" + +#: src/bin/screens/edi_file_screens.c:255 +msgid "Please enter a name for this new file." +msgstr "" + +#: src/bin/screens/edi_file_screens.c:307 +msgid "Enter new directory name" +msgstr "" + +#: src/bin/screens/edi_file_screens.c:316 +msgid "Please enter a name for this new directory." +msgstr "" + +#: src/bin/screens/edi_settings.c:120 src/bin/screens/edi_settings.c:160 +msgid "Font" +msgstr "" + +#: src/bin/screens/edi_settings.c:149 src/bin/screens/edi_settings.c:639 +msgid "Display" +msgstr "" + +#: src/bin/screens/edi_settings.c:179 +msgid "Display whitespace" +msgstr "" + +#: src/bin/screens/edi_settings.c:196 +msgid "Line width marker" +msgstr "" + +#: src/bin/screens/edi_settings.c:222 +msgid "Tabstop" +msgstr "" + +#: src/bin/screens/edi_settings.c:241 +msgid "Insert spaces when tab is pressed" +msgstr "" + +#: src/bin/screens/edi_settings.c:251 +msgid "Hide Toolbar" +msgstr "" + +#: src/bin/screens/edi_settings.c:301 +msgid "Builds" +msgstr "" + +#: src/bin/screens/edi_settings.c:312 +msgid "Runtime binary" +msgstr "" + +#: src/bin/screens/edi_settings.c:323 +msgid "Select" +msgstr "" + +#: src/bin/screens/edi_settings.c:351 +msgid "Runtime arguments" +msgstr "" + +#: src/bin/screens/edi_settings.c:428 +msgid "Project Settings" +msgstr "" + +#: src/bin/screens/edi_settings.c:443 +msgid "Author Name: " +msgstr "" + +#: src/bin/screens/edi_settings.c:468 +msgid "Author E-mail: " +msgstr "" + +#: src/bin/screens/edi_settings.c:490 +msgid "Source Control" +msgstr "" + +#: src/bin/screens/edi_settings.c:509 +msgid "Remote URL:" +msgstr "" + +#: src/bin/screens/edi_settings.c:557 src/bin/screens/edi_settings.c:647 +msgid "Behaviour" +msgstr "" + +#: src/bin/screens/edi_settings.c:561 +msgid "Auto save files" +msgstr "" + +#: src/bin/screens/edi_settings.c:572 +msgid "Trim trailing whitespace" +msgstr "" + +#: src/bin/screens/edi_settings.c:592 +msgid "Edi Settings" +msgstr "" + +#: src/bin/screens/edi_settings.c:638 src/bin/edi_main.c:1135 +msgid "Project" +msgstr "" + +#: src/bin/screens/edi_settings.c:646 +msgid "Global" +msgstr "" + +#: src/bin/screens/edi_about.c:33 +msgid "About Edi" +msgstr "" + +#: src/bin/screens/edi_about.c:78 +msgid "" +"<br>EDI is an IDE designed to get people into coding for Unix.<br>It's based " +"on the <b>EFL</b> and written completely natively<br>to provide a " +"<i>responsive</i> and <i>beautiful</i> UI.<br>" +msgstr "" + +#: src/bin/screens/edi_about.c:87 +msgid "EDI's lovely authors" +msgstr "" + +#: src/bin/screens/edi_about.c:119 src/bin/edi_main.c:1145 +msgid "Visit Website" +msgstr "" + +#: src/bin/screens/edi_about.c:131 +msgid "Report Issue" +msgstr "" + +#: src/bin/screens/edi_about.c:143 +msgid "Donate Now" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:64 +msgid "Please enter a valid commit message." +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:94 +msgid "SCM engine is not available." +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:104 +msgid "Commit Changes" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:128 +msgid "Author" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:149 +msgid "Summary" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:177 +msgid "add" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:181 +msgid "mod" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:185 +msgid "del" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:189 +msgid "ren" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:193 +msgid "untracked" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:200 +msgid "unstaged" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:217 +msgid "Nothing to commit." +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:226 +msgid "Enter commit summary<br><br>And change details<br>" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:252 +msgid "No changes to display." +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:273 src/bin/edi_main.c:1137 +msgid "Commit" +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:288 +#, c-format +msgid "No %s binary found, please install %s." +msgstr "" + +#: src/bin/screens/edi_scm_screens.c:291 +msgid "Unable to launch SCM binary" +msgstr "" + +#: src/bin/edi_debugpanel.c:426 +msgid "Warning: executable does not exists (run make?)" +msgstr "" + +#: src/bin/language/edi_language_provider_c.c:156 +msgid "C header" +msgstr "" + +#: src/bin/language/edi_language_provider_c.c:158 +msgid "C source" +msgstr "" + +#: src/bin/language/edi_language_provider_python.c:32 +msgid "Python source" +msgstr "" + +#: src/bin/language/edi_language_provider_rust.c:32 +msgid "Rust source" +msgstr "" + +#: src/bin/edi_filepanel.c:200 src/bin/edi_filepanel.c:236 +msgid "Are you sure you want to delete this file?" +msgstr "" + +#: src/bin/edi_filepanel.c:268 +msgid "Open" +msgstr "" + +#: src/bin/edi_filepanel.c:269 +msgid "Open in New Window" +msgstr "" + +#: src/bin/edi_filepanel.c:271 +msgid "Open in New Panel" +msgstr "" + +#: src/bin/edi_filepanel.c:273 +msgid "Open as ..." +msgstr "" + +#: src/bin/edi_filepanel.c:278 +msgid "Open External" +msgstr "" + +#: src/bin/edi_filepanel.c:284 +msgid "Source Control ..." +msgstr "" + +#: src/bin/edi_filepanel.c:285 +msgid "Add Changes" +msgstr "" + +#: src/bin/edi_filepanel.c:286 src/bin/edi_filepanel.c:291 +msgid "Rename File" +msgstr "" + +#: src/bin/edi_filepanel.c:287 src/bin/edi_filepanel.c:292 +msgid "Delete File" +msgstr "" + +#: src/bin/edi_filepanel.c:335 +msgid "Are you sure you want to delete this directory?" +msgstr "" + +#: src/bin/edi_filepanel.c:371 +msgid "Create File here" +msgstr "" + +#: src/bin/edi_filepanel.c:372 +msgid "Create Directory here" +msgstr "" + +#: src/bin/edi_filepanel.c:374 +msgid "Open Terminal here" +msgstr "" + +#: src/bin/edi_filepanel.c:378 +msgid "Rename Directory" +msgstr "" + +#: src/bin/edi_filepanel.c:380 +msgid "Remove Directory" +msgstr "" + +#: src/bin/edi_filepanel.c:830 src/bin/edi_main.c:1117 +msgid "Find file" +msgstr "" + +#: src/bin/edi_build_main.c:63 +#, c-format +msgid "Project created at path %s\n" +msgstr "" + +#: src/bin/edi_build_main.c:66 +#, c-format +msgid "Unable to create project at path %s\n" +msgstr "" + +#: src/bin/edi_build_main.c:77 +#, c-format +msgid "Building \"%s\" target [%s] using [%s].\n" +msgstr "" + +#: src/bin/edi_build_main.c:83 +#, c-format +msgid "Target [%s] not supported for builder [%s].\n" +msgstr "" + +#: src/bin/edi_build_main.c:167 +#, c-format +msgid "create requires 6 additional parameters:\n" +msgstr "" + +#: src/bin/edi_build_main.c:181 +#, c-format +msgid "Cowardly refusing to build unknown project type.\n" +msgstr "" + +#: src/bin/edi_build_main.c:197 +#, c-format +msgid "Unrecognized build type - try build, clean, create or test.\n" +msgstr "" + +#: src/bin/edi_main.c:66 +msgid "File path required" +msgstr "" + +#: src/bin/edi_main.c:67 +msgid "Please choose a file from the list." +msgstr "" + +#: src/bin/edi_main.c:416 +msgid "Logs" +msgstr "" + +#: src/bin/edi_main.c:420 +msgid "Console" +msgstr "" + +#: src/bin/edi_main.c:424 +msgid "Tests" +msgstr "" + +#: src/bin/edi_main.c:432 +msgid "Tasks" +msgstr "" + +#: src/bin/edi_main.c:436 src/bin/edi_main.c:1132 src/bin/edi_main.c:1207 +msgid "Debug" +msgstr "" + +#: src/bin/edi_main.c:560 +msgid "Unable to launch" +msgstr "" + +#: src/bin/edi_main.c:561 +msgid "No launch binary found, please configure in Settings." +msgstr "" + +#: src/bin/edi_main.c:572 +msgid "Missing user information" +msgstr "" + +#: src/bin/edi_main.c:573 +msgid "No user information found, please configure in Settings." +msgstr "" + +#: src/bin/edi_main.c:680 +msgid "Cowardly refusing to build unknown project type." +msgstr "" + +#: src/bin/edi_main.c:709 +#, c-format +msgid "%s of project <b>%s</b> in %s failed with status code %d.\n" +msgstr "" + +#: src/bin/edi_main.c:711 +#, c-format +msgid "%s of project <b>%s</b> in %s was successful.\n" +msgstr "" + +#: src/bin/edi_main.c:713 +#, c-format +msgid "EDI :: %s Status (%s)" +msgstr "" + +#: src/bin/edi_main.c:713 +msgid "Failure" +msgstr "" + +#: src/bin/edi_main.c:713 +msgid "Success" +msgstr "" + +#: src/bin/edi_main.c:724 src/bin/edi_main.c:1128 src/bin/edi_main.c:1129 +#: src/bin/edi_main.c:1204 +msgid "Build" +msgstr "" + +#: src/bin/edi_main.c:734 src/bin/edi_main.c:1133 +msgid "Clean" +msgstr "" + +#: src/bin/edi_main.c:744 src/bin/edi_main.c:1130 src/bin/edi_main.c:1205 +msgid "Test" +msgstr "" + +#: src/bin/edi_main.c:1032 +msgid "Are you sure you wish to stash these changes?" +msgstr "" + +#: src/bin/edi_main.c:1095 +msgid "File" +msgstr "" + +#: src/bin/edi_main.c:1096 +msgid "New Project ..." +msgstr "" + +#: src/bin/edi_main.c:1098 +msgid "New ..." +msgstr "" + +#: src/bin/edi_main.c:1099 +msgid "New Directory ..." +msgstr "" + +#: src/bin/edi_main.c:1100 src/bin/edi_main.c:1179 +msgid "Save" +msgstr "" + +#: src/bin/edi_main.c:1102 +msgid "Close all" +msgstr "" + +#: src/bin/edi_main.c:1104 src/bin/edi_main.c:1212 +msgid "Settings" +msgstr "" + +#: src/bin/edi_main.c:1106 +msgid "Quit" +msgstr "" + +#: src/bin/edi_main.c:1108 +msgid "Edit" +msgstr "" + +#: src/bin/edi_main.c:1109 src/bin/edi_main.c:1185 +msgid "Undo" +msgstr "" + +#: src/bin/edi_main.c:1110 src/bin/edi_main.c:1186 +msgid "Redo" +msgstr "" + +#: src/bin/edi_main.c:1112 src/bin/edi_main.c:1191 +msgid "Cut" +msgstr "" + +#: src/bin/edi_main.c:1113 src/bin/edi_main.c:1192 +msgid "Copy" +msgstr "" + +#: src/bin/edi_main.c:1114 src/bin/edi_main.c:1193 +msgid "Paste" +msgstr "" + +#: src/bin/edi_main.c:1116 +msgid "Find & Replace" +msgstr "" + +#: src/bin/edi_main.c:1118 +msgid "Goto Line ..." +msgstr "" + +#: src/bin/edi_main.c:1120 +msgid "Find in project ..." +msgstr "" + +#: src/bin/edi_main.c:1122 +msgid "View" +msgstr "" + +#: src/bin/edi_main.c:1123 +msgid "New Window" +msgstr "" + +#: src/bin/edi_main.c:1124 +msgid "New Panel" +msgstr "" + +#: src/bin/edi_main.c:1126 +msgid "Open Tasks" +msgstr "" + +#: src/bin/edi_main.c:1131 src/bin/edi_main.c:1206 +msgid "Run" +msgstr "" + +#: src/bin/edi_main.c:1136 +msgid "Init" +msgstr "" + +#: src/bin/edi_main.c:1138 +msgid "Stash" +msgstr "" + +#: src/bin/edi_main.c:1139 +msgid "Status" +msgstr "" + +#: src/bin/edi_main.c:1140 +msgid "Push" +msgstr "" + +#: src/bin/edi_main.c:1141 +msgid "Pull" +msgstr "" + +#: src/bin/edi_main.c:1144 +msgid "Help" +msgstr "" + +#: src/bin/edi_main.c:1147 src/bin/edi_main.c:1213 +msgid "About" +msgstr "" + +#: src/bin/edi_main.c:1178 +msgid "New File" +msgstr "" + +#: src/bin/edi_main.c:1198 +msgid "Find..." +msgstr "" + +#: src/bin/edi_main.c:1199 +msgid "Goto Line" +msgstr "" + +#: src/bin/edi_main.c:1389 +#, c-format +msgid "Project path must be a directory\n" +msgstr "" + +#: src/bin/edi_main.c:1603 +#, c-format +msgid "Could not open file of unsupported mime type (%s)\n" +msgstr "" + +#: src/bin/edi_consolepanel.c:185 +#, c-format +msgid "Total pass %d (%d%%), fail %d)" +msgstr "" diff --git a/src/bin/edi_build_main.c b/src/bin/edi_build_main.c index 0eca57e..9cf9ce6 100644 --- a/src/bin/edi_build_main.c +++ b/src/bin/edi_build_main.c @@ -6,10 +6,6 @@ * Always put system first, then EFL, then your public header, * and finally your private one. */ -#if ENABLE_NLS -# include <libintl.h> -#endif - #include <Ecore_Getopt.h> #include <Eio.h> @@ -64,10 +60,10 @@ static void _edi_build_create_done_cb(const char *path, Eina_Bool success) { if (success) - fprintf(stdout, "Project created at path %s\n", path); + fprintf(stdout, _("Project created at path %s\n"), path); else { - fprintf(stderr, "Unable to create project at path %s\n", path); + fprintf(stderr, _("Unable to create project at path %s\n"), path); _exit_code = EXIT_FAILURE; } @@ -78,13 +74,13 @@ _edi_build_create_done_cb(const char *path, Eina_Bool success) static void _edi_build_print_start(Edi_Build_Provider *provider, const char *action) { - printf("Building \"%s\" target [%s] using [%s].\n", edi_project_name_get(), action, provider->id); + printf(_("Building \"%s\" target [%s] using [%s].\n"), edi_project_name_get(), action, provider->id); } static void _edi_build_print_noop(Edi_Build_Provider *provider, const char *action) { - printf("Target [%s] not supported for builder [%s].\n", action, provider->id); + printf(_("Target [%s] not supported for builder [%s].\n"), action, provider->id); } static int @@ -168,7 +164,7 @@ main(int argc, char **argv) { if (argc - args != 7) { - fprintf(stderr, "create requires 6 additional parameters:\n"); + fprintf(stderr, _("create requires 6 additional parameters:\n")); fprintf(stderr, " skeleton, parent_path, project_name, " "project_url, creator_name, creator_email\n"); goto end; @@ -182,7 +178,7 @@ main(int argc, char **argv) if (!edi_builder_can_build()) { - fprintf(stderr, "Cowardly refusing to build unknown project type.\n"); + fprintf(stderr, _("Cowardly refusing to build unknown project type.\n")); ecore_shutdown(); goto exit; } @@ -198,7 +194,7 @@ main(int argc, char **argv) ((ret = _edi_build_action_try(provider, provider->test, "test", build_type)) == EXIT_NOACTION) && ((ret = _edi_build_action_try(provider, (void *)provider->build, "build", build_type)) == EXIT_NOACTION)) { - fprintf(stderr, "Unrecognized build type - try build, clean, create or test.\n"); + fprintf(stderr, _("Unrecognized build type - try build, clean, create or test.\n")); goto end; } if (ret != EXIT_SUCCESS) diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c index 49d4878..be5d8d6 100644 --- a/src/bin/edi_consolepanel.c +++ b/src/bin/edi_consolepanel.c @@ -182,7 +182,7 @@ static void _edi_test_output_suite(int count, int pass, int fail) { char *line; - const char *format = "Total pass %d (%d%%), fail %d"; + const char *format = _("Total pass %d (%d%%), fail %d)"); int linemax, percent; linemax = strlen(format) - 6 + 30; diff --git a/src/bin/edi_debugpanel.c b/src/bin/edi_debugpanel.c index fc2d97f..e27c57c 100644 --- a/src/bin/edi_debugpanel.c +++ b/src/bin/edi_debugpanel.c @@ -54,7 +54,7 @@ _edi_debugpanel_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, voi return ECORE_CALLBACK_RENEW; } -static Eina_Bool +static Eina_Bool _debugpanel_stdout_handler(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) { Ecore_Exe_Event_Data *ev; @@ -63,7 +63,7 @@ _debugpanel_stdout_handler(void *data EINA_UNUSED, int type EINA_UNUSED, void *e ev = event; if (ev && ev->size) - { + { if (!ev->data) return ECORE_CALLBACK_DONE; char buf[ev->size + 1]; @@ -80,7 +80,7 @@ _debugpanel_stdout_handler(void *data EINA_UNUSED, int type EINA_UNUSED, void *e { if (buf[idx] == '\n') end = &buf[idx]; - + if (start && end) { elm_code_file_line_append(_debug_output->file, start, end - start, NULL); @@ -92,7 +92,7 @@ _debugpanel_stdout_handler(void *data EINA_UNUSED, int type EINA_UNUSED, void *e } return ECORE_CALLBACK_DONE; -} +} static void _edi_debugpanel_keypress_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) @@ -423,7 +423,7 @@ void edi_debugpanel_start(void) if (!ecore_file_exists(_edi_project_config->launch.path)) { - warning = "Warning: executable does not exists (run make?)"; + warning = _("Warning: executable does not exists (run make?)"); elm_code_file_line_append(_debug_output->file, warning, strlen(warning), NULL); return; } @@ -536,7 +536,7 @@ void edi_debugpanel_add(Evas_Object *parent) elm_table_pack(table, bt_start, 4, 0, 1, 1); elm_table_pack(table, bt_quit, 5, 0, 1, 1); evas_object_show(table); - + _debug_output = code; _info_widget = widget; _entry_widget = entry; diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c index ee76fdf..c558d39 100644 --- a/src/bin/edi_filepanel.c +++ b/src/bin/edi_filepanel.c @@ -197,7 +197,7 @@ static void _item_menu_del_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - edi_screens_message_confirm(_main_win, "Are you sure you want to delete this file?", + edi_screens_message_confirm(_main_win, _("Are you sure you want to delete this file?"), _item_menu_del_do_cb, data); } @@ -233,7 +233,7 @@ static void _item_menu_scm_del_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - edi_screens_message_confirm(_main_win, "Are you sure you want to delete this file?", + edi_screens_message_confirm(_main_win, _("Are you sure you want to delete this file?"), _item_menu_scm_del_do_cb, data); } @@ -265,31 +265,31 @@ _item_menu_create(Evas_Object *win, Edi_Dir_Data *sd) menu = elm_menu_add(win); evas_object_smart_callback_add(menu, "dismissed", _item_menu_dismissed_cb, NULL); - elm_menu_item_add(menu, NULL, "fileopen", "Open", _item_menu_open_cb, sd); - elm_menu_item_add(menu, NULL, "window-new", "Open in New Window", _item_menu_open_window_cb, sd); + elm_menu_item_add(menu, NULL, "fileopen", _("Open"), _item_menu_open_cb, sd); + elm_menu_item_add(menu, NULL, "window-new", _("Open in New Window"), _item_menu_open_window_cb, sd); - menu_it = elm_menu_item_add(menu, NULL, "object-flip-horizontal", "Open in New Panel", _item_menu_open_panel_cb, sd); + menu_it = elm_menu_item_add(menu, NULL, "object-flip-horizontal", _("Open in New Panel"), _item_menu_open_panel_cb, sd); - menu_it = elm_menu_item_add(menu, NULL, NULL, "Open as ...", NULL, NULL); + menu_it = elm_menu_item_add(menu, NULL, NULL, _("Open as ..."), NULL, NULL); _item_menu_filetype_create(menu, menu_it, "text", _item_menu_open_as_text_cb, sd); _item_menu_filetype_create(menu, menu_it, "code", _item_menu_open_as_code_cb, sd); _item_menu_filetype_create(menu, menu_it, "image", _item_menu_open_as_image_cb, sd); - menu_it = elm_menu_item_add(menu, NULL, "gtk-execute", "Open External", + menu_it = elm_menu_item_add(menu, NULL, "gtk-execute", _("Open External"), _item_menu_xdgopen_cb, sd); elm_menu_item_separator_add(menu, NULL); if (edi_scm_enabled()) { - menu_it = elm_menu_item_add(menu, NULL, NULL, "Source Control ...", NULL, NULL); - elm_menu_item_add(menu, menu_it, "document-save-as", "Add Changes", _item_menu_scm_add_cb, sd); - elm_menu_item_add(menu, menu_it, "document-save-as", "Rename File", _item_menu_rename_cb, sd); - elm_menu_item_add(menu, menu_it, "edit-delete", "Delete File", _item_menu_scm_del_cb, sd); + menu_it = elm_menu_item_add(menu, NULL, NULL, _("Source Control ..."), NULL, NULL); + elm_menu_item_add(menu, menu_it, "document-save-as", _("Add Changes"), _item_menu_scm_add_cb, sd); + elm_menu_item_add(menu, menu_it, "document-save-as", _("Rename File"), _item_menu_rename_cb, sd); + elm_menu_item_add(menu, menu_it, "edit-delete", _("Delete File"), _item_menu_scm_del_cb, sd); } else { - menu_it = elm_menu_item_add(menu, NULL, "document-save-as", "Rename File", _item_menu_rename_cb, sd); - menu_it = elm_menu_item_add(menu, NULL, "edit-delete", "Delete File", _item_menu_del_cb, sd); + menu_it = elm_menu_item_add(menu, NULL, "document-save-as", _("Rename File"), _item_menu_rename_cb, sd); + menu_it = elm_menu_item_add(menu, NULL, "edit-delete", _("Delete File"), _item_menu_del_cb, sd); } } @@ -332,7 +332,7 @@ static void _item_menu_rmdir_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - edi_screens_message_confirm(_main_win, "Are you sure you want to delete this directory?", + edi_screens_message_confirm(_main_win, _("Are you sure you want to delete this directory?"), _item_menu_rmdir_do_cb, data); } @@ -368,16 +368,16 @@ _item_menu_dir_create(Evas_Object *win, Edi_Dir_Data *sd) menu = elm_menu_add(win); evas_object_smart_callback_add(menu, "dismissed", _item_menu_dismissed_cb, NULL); - elm_menu_item_add(menu, NULL, "document-new", "Create File here", _item_menu_create_file_cb, sd); - elm_menu_item_add(menu, NULL, "folder-new", "Create Directory here", _item_menu_create_dir_cb, sd); + elm_menu_item_add(menu, NULL, "document-new", _("Create File here"), _item_menu_create_file_cb, sd); + elm_menu_item_add(menu, NULL, "folder-new", _("Create Directory here"), _item_menu_create_dir_cb, sd); if (ecore_file_app_installed("terminology")) - elm_menu_item_add(menu, NULL, "utilities-terminal", "Open Terminal here", _item_menu_open_terminal_cb, sd); + elm_menu_item_add(menu, NULL, "utilities-terminal", _("Open Terminal here"), _item_menu_open_terminal_cb, sd); if (strcmp(sd->path, edi_project_get())) { - elm_menu_item_add(menu, NULL, "document-save-as", "Rename Directory", _item_menu_rename_cb, sd); + elm_menu_item_add(menu, NULL, "document-save-as", _("Rename Directory"), _item_menu_rename_cb, sd); if (ecore_file_dir_is_empty(sd->path)) - elm_menu_item_add(menu, NULL, "edit-delete", "Remove Directory", _item_menu_rmdir_cb, sd); + elm_menu_item_add(menu, NULL, "edit-delete", _("Remove Directory"), _item_menu_rmdir_cb, sd); } } @@ -827,7 +827,7 @@ edi_filepanel_add(Evas_Object *parent, Evas_Object *win, filter = elm_entry_add(hbox); elm_entry_scrollable_set(filter, EINA_TRUE); elm_entry_single_line_set(filter, EINA_TRUE); - elm_object_part_text_set(filter, "guide", "Find file"); + elm_object_part_text_set(filter, "guide", _("Find file")); evas_object_size_hint_weight_set(filter, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(filter, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_entry_editable_set(filter, EINA_TRUE); diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c index fff94b5..3813b5b 100644 --- a/src/bin/edi_main.c +++ b/src/bin/edi_main.c @@ -6,10 +6,6 @@ * Always put system first, then EFL, then your public header, * and finally your private one. */ -#if ENABLE_NLS -# include <libintl.h> -#endif - #include <Ecore_Getopt.h> #include <Elementary.h> #include <Eio.h> @@ -67,8 +63,8 @@ _edi_file_open_cb(const char *path, const char *type, Eina_Bool newwin) if (path == NULL) { - title = "Information"; - message = "Please choose a file from the list."; + title = _("File path required"); + message = _("Please choose a file from the list."); edi_screens_message(_edi_main_win, title, message); return; @@ -417,27 +413,27 @@ edi_content_setup(Evas_Object *win, const char *path) _edi_toolbar_separator_add(tb); - _edi_logpanel_item = elm_toolbar_item_append(tb, "go-up", "Logs", + _edi_logpanel_item = elm_toolbar_item_append(tb, "go-up", _("Logs"), _edi_toggle_panel, "0"); _edi_toolbar_separator_add(tb); - _edi_consolepanel_item = elm_toolbar_item_append(tb, "go-up", "Console", + _edi_consolepanel_item = elm_toolbar_item_append(tb, "go-up", _("Console"), _edi_toggle_panel, "1"); _edi_toolbar_separator_add(tb); - _edi_testpanel_item = elm_toolbar_item_append(tb, "go-up", "Tests", + _edi_testpanel_item = elm_toolbar_item_append(tb, "go-up", _("Tests"), _edi_toggle_panel, "2"); _edi_toolbar_separator_add(tb); - _edi_searchpanel_item = elm_toolbar_item_append(tb, "go-up", "Search", + _edi_searchpanel_item = elm_toolbar_item_append(tb, "go-up", _("Search"), _edi_toggle_panel, "3"); _edi_toolbar_separator_add(tb); - _edi_taskspanel_item = elm_toolbar_item_append(tb, "go-up", "Tasks", + _edi_taskspanel_item = elm_toolbar_item_append(tb, "go-up", _("Tasks"), _edi_toggle_panel, "4"); _edi_toolbar_separator_add(tb); - _edi_debugpanel_item = elm_toolbar_item_append(tb, "go-up", "Debug", + _edi_debugpanel_item = elm_toolbar_item_append(tb, "go-up", _("Debug"), _edi_toggle_panel, "5"); _edi_toolbar_separator_add(tb); @@ -561,8 +557,8 @@ edi_launcher_config_missing() { const char *title, *message; - title = "Unable to launch"; - message = "No launch binary found, please configure in Settings."; + title = _("Unable to launch"); + message = _("No launch binary found, please configure in Settings."); edi_screens_message(_edi_main_win, title, message); } @@ -573,8 +569,8 @@ _edi_project_credentials_missing() { const char *title, *message; - title = "User information"; - message = "No user information found, please configure in Settings."; + title = _("Missing user information"); + message = _("No user information found, please configure in Settings."); edi_screens_message(_edi_main_win, title, message); } @@ -681,7 +677,7 @@ _edi_build_prep(Evas_Object *button) if (!edi_builder_can_build()) { - edi_consolepanel_append_error_line("Cowardly refusing to build unknown project type."); + edi_consolepanel_append_error_line(_("Cowardly refusing to build unknown project type.")); return EINA_FALSE; } @@ -710,11 +706,11 @@ _edi_build_display_status_cb(int status, void *data) message = eina_strbuf_new(); if (status != 0) - eina_strbuf_append_printf(message, "%s of project <b>%s</b> in %s failed with status code %d.\n", name, edi_project_name_get(), edi_project_get(), status); + eina_strbuf_append_printf(message, _("%s of project <b>%s</b> in %s failed with status code %d.\n"), name, edi_project_name_get(), edi_project_get(), status); else - eina_strbuf_append_printf(message, "%s of project <b>%s</b> in %s was successful.\n", name, edi_project_name_get(), edi_project_get()); + eina_strbuf_append_printf(message, _("%s of project <b>%s</b> in %s was successful.\n"), name, edi_project_name_get(), edi_project_get()); - eina_strbuf_append_printf(title, "EDI :: %s Status (%s)", name, status ? "Failure" : "Success"); + eina_strbuf_append_printf(title, _("EDI :: %s Status (%s)"), name, status ? _("Failure") : _("Success")); edi_screens_desktop_notify(eina_strbuf_string_get(title), eina_strbuf_string_get(message)); @@ -725,7 +721,7 @@ _edi_build_display_status_cb(int status, void *data) static void _edi_build_project(void) { - if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, "Build")) + if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, _("Build"))) { edi_consolepanel_show(); edi_builder_build(); @@ -735,7 +731,7 @@ _edi_build_project(void) static void _edi_build_clean_project(void) { - if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, "Clean")) + if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, _("Clean"))) { edi_consolepanel_show(); edi_builder_clean(); @@ -745,7 +741,7 @@ _edi_build_clean_project(void) static void _edi_build_test_project(void) { - if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, "Test")) + if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, _("Test"))) { edi_consolepanel_show(); edi_builder_test(); @@ -1033,7 +1029,7 @@ static void _edi_menu_scm_stash_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - edi_screens_message_confirm(_edi_main_win, "Are you sure you wish to stash these changes?", + edi_screens_message_confirm(_edi_main_win, _("Are you sure you wish to stash these changes?"), _edi_scm_stash_do_cb, NULL); } @@ -1096,59 +1092,59 @@ _edi_menu_setup(Evas_Object *win) menu = elm_win_main_menu_get(win); - menu_it = elm_menu_item_add(menu, NULL, NULL, "File", NULL, NULL); - elm_menu_item_add(menu, menu_it, "folder-new", "New Project ...", _edi_menu_project_new_cb, NULL); + menu_it = elm_menu_item_add(menu, NULL, NULL, _("File"), NULL, NULL); + elm_menu_item_add(menu, menu_it, "folder-new", _("New Project ..."), _edi_menu_project_new_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "document-new", "New ...", _edi_menu_new_cb, NULL); - elm_menu_item_add(menu, menu_it, "folder-new", "New Directory ...", _edi_menu_new_dir_cb, NULL); - _edi_menu_save = elm_menu_item_add(menu, menu_it, "document-save", "Save", _edi_menu_save_cb, NULL); - elm_menu_item_add(menu, menu_it, "document-close", "Close", _edi_menu_close_cb, NULL); - elm_menu_item_add(menu, menu_it, "document-close", "Close all", _edi_menu_closeall_cb, NULL); + elm_menu_item_add(menu, menu_it, "document-new", _("New ..."), _edi_menu_new_cb, NULL); + elm_menu_item_add(menu, menu_it, "folder-new", _("New Directory ..."), _edi_menu_new_dir_cb, NULL); + _edi_menu_save = elm_menu_item_add(menu, menu_it, "document-save", _("Save"), _edi_menu_save_cb, NULL); + elm_menu_item_add(menu, menu_it, "document-close", _("Close"), _edi_menu_close_cb, NULL); + elm_menu_item_add(menu, menu_it, "document-close", _("Close all"), _edi_menu_closeall_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "preferences-desktop", "Settings", _edi_menu_settings_cb, NULL); + elm_menu_item_add(menu, menu_it, "preferences-desktop", _("Settings"), _edi_menu_settings_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "application-exit", "Quit", _edi_menu_quit_cb, NULL); + elm_menu_item_add(menu, menu_it, "application-exit", _("Quit"), _edi_menu_quit_cb, NULL); - menu_it = elm_menu_item_add(menu, NULL, NULL, "Edit", NULL, NULL); - _edi_menu_undo = elm_menu_item_add(menu, menu_it, "edit-undo", "Undo", _edi_menu_undo_cb, NULL); - _edi_menu_redo = elm_menu_item_add(menu, menu_it, "edit-redo", "Redo", _edi_menu_redo_cb, NULL); + menu_it = elm_menu_item_add(menu, NULL, NULL, _("Edit"), NULL, NULL); + _edi_menu_undo = elm_menu_item_add(menu, menu_it, "edit-undo", _("Undo"), _edi_menu_undo_cb, NULL); + _edi_menu_redo = elm_menu_item_add(menu, menu_it, "edit-redo", _("Redo"), _edi_menu_redo_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "edit-cut", "Cut", _edi_menu_cut_cb, NULL); - elm_menu_item_add(menu, menu_it, "edit-copy", "Copy", _edi_menu_copy_cb, NULL); - elm_menu_item_add(menu, menu_it, "edit-paste", "Paste", _edi_menu_paste_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-cut", _("Cut"), _edi_menu_cut_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-copy", _("Copy"), _edi_menu_copy_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-paste", _("Paste"), _edi_menu_paste_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "edit-find-replace", "Find & Replace", _edi_menu_find_cb, NULL); - elm_menu_item_add(menu, menu_it, "edit-find", "Find file", _edi_menu_findfile_cb, NULL); - elm_menu_item_add(menu, menu_it, "go-jump", "Goto Line ...", _edi_menu_goto_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-find-replace", _("Find & Replace"), _edi_menu_find_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-find", _("Find file"), _edi_menu_findfile_cb, NULL); + elm_menu_item_add(menu, menu_it, "go-jump", _("Goto Line ..."), _edi_menu_goto_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "edit-find", "Find in project ...", _edi_menu_find_project_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-find", _("Find in project ..."), _edi_menu_find_project_cb, NULL); - menu_it = elm_menu_item_add(menu, NULL, NULL, "View", NULL, NULL); - elm_menu_item_add(menu, menu_it, "window-new", "New Window", _edi_menu_view_open_window_cb, NULL); - elm_menu_item_add(menu, menu_it, "object-flip-horizontal", "New Panel", _edi_menu_view_new_panel_cb, NULL); + menu_it = elm_menu_item_add(menu, NULL, NULL, _("View"), NULL, NULL); + elm_menu_item_add(menu, menu_it, "window-new", _("New Window"), _edi_menu_view_open_window_cb, NULL); + elm_menu_item_add(menu, menu_it, "object-flip-horizontal", _("New Panel"), _edi_menu_view_new_panel_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "edit-find", "Open Tasks", _edi_menu_view_tasks_cb, NULL); - - menu_it = elm_menu_item_add(menu, NULL, NULL, "Build", NULL, NULL); - elm_menu_item_add(menu, menu_it, "system-run", "Build", _edi_menu_build_cb, NULL); - elm_menu_item_add(menu, menu_it, "media-record", "Test", _edi_menu_test_cb, NULL); - elm_menu_item_add(menu, menu_it, "media-playback-start", "Run", _edi_menu_run_cb, NULL); - elm_menu_item_add(menu, menu_it, "utilities-terminal", "Debug", _edi_menu_debug_cb, NULL); - elm_menu_item_add(menu, menu_it, "edit-clear", "Clean", _edi_menu_clean_cb, NULL); - - menu_it = elm_menu_item_add(menu, NULL, NULL, "Project", NULL, NULL); - _edi_menu_init = elm_menu_item_add(menu, menu_it, "media-playback-start", "Init", _edi_menu_scm_init_cb, NULL); - _edi_menu_commit = elm_menu_item_add(menu, menu_it, "mail-send", "Commit", _edi_menu_scm_commit_cb, NULL); - _edi_menu_stash = elm_menu_item_add(menu, menu_it, "edit-undo", "Stash", _edi_menu_scm_stash_cb, NULL); - _edi_menu_status = elm_menu_item_add(menu, menu_it, "dialog-error", "Status", _edi_menu_scm_status_cb, NULL); - _edi_menu_push = elm_menu_item_add(menu, menu_it, "go-up", "Push", _edi_menu_scm_push_cb, NULL); - _edi_menu_pull = elm_menu_item_add(menu, menu_it, "go-down", "Pull", _edi_menu_scm_pull_cb, NULL); - - - menu_it = elm_menu_item_add(menu, NULL, NULL, "Help", NULL, NULL); - elm_menu_item_add(menu, menu_it, "go-home", "Website", _edi_menu_website_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-find", _("Open Tasks"), _edi_menu_view_tasks_cb, NULL); + + menu_it = elm_menu_item_add(menu, NULL, NULL, _("Build"), NULL, NULL); + elm_menu_item_add(menu, menu_it, "system-run", _("Build"), _edi_menu_build_cb, NULL); + elm_menu_item_add(menu, menu_it, "media-record", _("Test"), _edi_menu_test_cb, NULL); + elm_menu_item_add(menu, menu_it, "media-playback-start", _("Run"), _edi_menu_run_cb, NULL); + elm_menu_item_add(menu, menu_it, "utilities-terminal", _("Debug"), _edi_menu_debug_cb, NULL); + elm_menu_item_add(menu, menu_it, "edit-clear", _("Clean"), _edi_menu_clean_cb, NULL); + + menu_it = elm_menu_item_add(menu, NULL, NULL, _("Project"), NULL, NULL); + _edi_menu_init = elm_menu_item_add(menu, menu_it, "media-playback-start", _("Init"), _edi_menu_scm_init_cb, NULL); + _edi_menu_commit = elm_menu_item_add(menu, menu_it, "mail-send", _("Commit"), _edi_menu_scm_commit_cb, NULL); + _edi_menu_stash = elm_menu_item_add(menu, menu_it, "edit-undo", _("Stash"), _edi_menu_scm_stash_cb, NULL); + _edi_menu_status = elm_menu_item_add(menu, menu_it, "dialog-error", _("Status"), _edi_menu_scm_status_cb, NULL); + _edi_menu_push = elm_menu_item_add(menu, menu_it, "go-up", _("Push"), _edi_menu_scm_push_cb, NULL); + _edi_menu_pull = elm_menu_item_add(menu, menu_it, "go-down", _("Pull"), _edi_menu_scm_pull_cb, NULL); + + + menu_it = elm_menu_item_add(menu, NULL, NULL, _("Help"), NULL, NULL); + elm_menu_item_add(menu, menu_it, "go-home", _("Visit Website"), _edi_menu_website_cb, NULL); elm_menu_item_separator_add(menu, menu_it); - elm_menu_item_add(menu, menu_it, "help-about", "About", _edi_menu_about_cb, NULL); + elm_menu_item_add(menu, menu_it, "help-about", _("About"), _edi_menu_about_cb, NULL); } static Evas_Object * @@ -1179,42 +1175,42 @@ edi_toolbar_setup(Evas_Object *parent) evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND); - _edi_toolbar_item_add(tb, "document-new", "New File", _tb_new_cb); - _edi_toolbar_save =_edi_toolbar_item_add(tb, "document-save", "Save", _tb_save_cb); - _edi_toolbar_item_add(tb, "document-close", "Close", _tb_close_cb); + _edi_toolbar_item_add(tb, "document-new", _("New File"), _tb_new_cb); + _edi_toolbar_save =_edi_toolbar_item_add(tb, "document-save", _("Save"), _tb_save_cb); + _edi_toolbar_item_add(tb, "document-close", _("Close"), _tb_close_cb); tb_it = elm_toolbar_item_append(tb, "separator", "", NULL, NULL); elm_toolbar_item_separator_set(tb_it, EINA_TRUE); - _edi_toolbar_undo = _edi_toolbar_item_add(tb, "edit-undo", "Undo", _tb_undo_cb); - _edi_toolbar_redo = _edi_toolbar_item_add(tb, "edit-redo", "Redo", _tb_redo_cb); + _edi_toolbar_undo = _edi_toolbar_item_add(tb, "edit-undo", _("Undo"), _tb_undo_cb); + _edi_toolbar_redo = _edi_toolbar_item_add(tb, "edit-redo", _("Redo"), _tb_redo_cb); tb_it = elm_toolbar_item_append(tb, "separator", "", NULL, NULL); elm_toolbar_item_separator_set(tb_it, EINA_TRUE); - _edi_toolbar_item_add(tb, "edit-cut", "Cut", _tb_cut_cb); - _edi_toolbar_item_add(tb, "edit-copy", "Copy", _tb_copy_cb); - _edi_toolbar_item_add(tb, "edit-paste", "Paste", _tb_paste_cb); + _edi_toolbar_item_add(tb, "edit-cut", _("Cut"), _tb_cut_cb); + _edi_toolbar_item_add(tb, "edit-copy", _("Copy"), _tb_copy_cb); + _edi_toolbar_item_add(tb, "edit-paste", _("Paste"), _tb_paste_cb); tb_it = elm_toolbar_item_append(tb, "separator", "", NULL, NULL); elm_toolbar_item_separator_set(tb_it, EINA_TRUE); - _edi_toolbar_item_add(tb, "edit-find-replace", "Find...", _tb_search_cb); - _edi_toolbar_item_add(tb, "go-jump", "Goto Line", _tb_goto_cb); + _edi_toolbar_item_add(tb, "edit-find-replace", _("Find..."), _tb_search_cb); + _edi_toolbar_item_add(tb, "go-jump", _("Goto Line"), _tb_goto_cb); tb_it = elm_toolbar_item_append(tb, "separator", "", NULL, NULL); elm_toolbar_item_separator_set(tb_it, EINA_TRUE); - _edi_toolbar_item_add(tb, "system-run", "Build", _tb_build_cb); - _edi_toolbar_item_add(tb, "media-record", "Test", _tb_test_cb); - _edi_toolbar_item_add(tb, "media-playback-start", "Run", _tb_run_cb); - _edi_toolbar_item_add(tb, "utilities-terminal", "Debug", _tb_debug_cb); + _edi_toolbar_item_add(tb, "system-run", _("Build"), _tb_build_cb); + _edi_toolbar_item_add(tb, "media-record", _("Test"), _tb_test_cb); + _edi_toolbar_item_add(tb, "media-playback-start", _("Run"), _tb_run_cb); + _edi_toolbar_item_add(tb, "utilities-terminal", _("Debug"), _tb_debug_cb); tb_it = elm_toolbar_item_append(tb, "separator", "", NULL, NULL); elm_toolbar_item_separator_set(tb_it, EINA_TRUE); - _edi_toolbar_item_add(tb, "preferences-desktop", "Settings", _tb_settings_cb); - _edi_toolbar_item_add(tb, "help-about", "About", _tb_about_cb); + _edi_toolbar_item_add(tb, "preferences-desktop", _("Settings"), _tb_settings_cb); + _edi_toolbar_item_add(tb, "help-about", _("About"), _tb_about_cb); evas_object_show(tb); return tb; @@ -1390,7 +1386,7 @@ edi_open(const char *inputpath) if (!edi_project_set(inputpath)) { - fprintf(stderr, "Project path must be a directory\n"); + fprintf(stderr, _("Project path must be a directory\n")); return EINA_FALSE; } path = realpath(inputpath, NULL); @@ -1604,7 +1600,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) mime = efreet_mime_type_get(project_path); if (!edi_content_provider_for_mime_get(mime)) { - fprintf(stderr, "Could not open file of unsupported mime type (%s)\n", mime); + fprintf(stderr, _("Could not open file of unsupported mime type (%s)\n"), mime); goto end; } edi_open_file(project_path); diff --git a/src/bin/edi_private.h b/src/bin/edi_private.h index 2b7cfbc..6e5dc58 100644 --- a/src/bin/edi_private.h +++ b/src/bin/edi_private.h @@ -4,6 +4,17 @@ #include <Eina.h> #include <Elementary.h> +#ifdef HAVE_PO +# include <locale.h> +#endif + +#ifdef ENABLE_NLS +# include <libintl.h> +# define _(x) gettext(x) +#else +# define _(x) (x) +#endif + extern int _edi_log_dom; #ifdef CRIT diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 6373bc6..462c4d1 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -70,7 +70,7 @@ _edi_editor_file_change_popup(Evas_Object *parent, Edi_Editor *editor) editor->popup = elm_popup_add(parent); elm_popup_orient_set(editor->popup, ELM_POPUP_ORIENT_CENTER); elm_popup_scrollable_set(editor->popup, EINA_TRUE); - elm_object_part_text_set(editor->popup, "title,text", "Confirmation"); + elm_object_part_text_set(editor->popup, "title,text", _("Confirmation")); evas_object_size_hint_align_set(editor->popup, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(editor->popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -85,7 +85,7 @@ _edi_editor_file_change_popup(Evas_Object *parent, Edi_Editor *editor) box = elm_box_add(editor->popup); label = elm_label_add(editor->popup); - elm_object_text_set(label, "File contents have changed. Would you like to refresh <br> the contents of this file?"); + elm_object_text_set(label, _("File contents have changed. Would you like to reload <br> the contents of this file?")); evas_object_show(label); elm_box_pack_end(box, label); @@ -100,12 +100,12 @@ _edi_editor_file_change_popup(Evas_Object *parent, Edi_Editor *editor) evas_object_show(table); button = elm_button_add(editor->popup); - elm_object_text_set(button, "Refresh"); + elm_object_text_set(button, _("Reload")); elm_object_part_content_set(editor->popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_editor_file_change_reload_cb, editor); button = elm_button_add(editor->popup); - elm_object_text_set(button, "No, continue editing"); + elm_object_text_set(button, _("No, continue editing")); elm_object_part_content_set(editor->popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_editor_file_change_ignore_cb, editor); @@ -673,7 +673,7 @@ _edit_cursor_moved(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EI widget = (Elm_Code_Widget *)obj; elm_code_widget_cursor_position_get(widget, &line, &col); - snprintf(buf, sizeof(buf), "Line:%d, Column:%d", line, col); + snprintf(buf, sizeof(buf), _("Line:%d, Column:%d"), line, col); elm_object_text_set((Evas_Object *)data, buf); } @@ -716,9 +716,9 @@ _edi_editor_statusbar_add(Evas_Object *panel, Edi_Editor *editor, Edi_Mainview_I lines = elm_label_add(panel); code = elm_code_widget_code_get(editor->entry); if (elm_code_file_line_ending_get(code->file) == ELM_CODE_FILE_LINE_ENDING_WINDOWS) - elm_object_text_set(lines, "WIN"); + elm_object_text_set(lines, _("WIN")); else - elm_object_text_set(lines, "UNIX"); + elm_object_text_set(lines, _("UNIX")); evas_object_size_hint_align_set(lines, 0.0, 0.5); evas_object_size_hint_weight_set(lines, EVAS_HINT_EXPAND, 0.0); elm_box_pack_end(panel, lines); diff --git a/src/bin/editor/edi_editor_documentation.c b/src/bin/editor/edi_editor_documentation.c index 1437fb1..e307112 100644 --- a/src/bin/editor/edi_editor_documentation.c +++ b/src/bin/editor/edi_editor_documentation.c @@ -60,13 +60,13 @@ static void _edi_doc_tag_name_set(Edi_Language_Document *doc) { if (strlen(eina_strbuf_string_get(doc->param)) > 0) - eina_strbuf_prepend(doc->param, "<b><br><br> Parameters<br></b>"); + eina_strbuf_prepend_printf(doc->param, "<b><br><br> %s<br></b>", _("Parameters")); if (strlen(eina_strbuf_string_get(doc->ret)) > 0) - eina_strbuf_prepend(doc->ret, "<b><br><br> Returns<br></b> "); + eina_strbuf_prepend_printf(doc->ret, "<b><br><br> %s<br></b> ", _("Returns")); if (strlen(eina_strbuf_string_get(doc->see)) > 0) - eina_strbuf_prepend(doc->see, "<b><br><br> See also<br></b>"); + eina_strbuf_prepend_printf(doc->see, "<b><br><br> %s<br></b>", _("See also")); } static void @@ -135,7 +135,7 @@ edi_editor_doc_open(Edi_Editor *editor) elm_popup_timeout_set(editor->doc_popup, 1.5); elm_object_style_set(editor->doc_popup, "transparent"); label = elm_label_add(editor->doc_popup); - elm_object_text_set(label, "No help available for this term"); + elm_object_text_set(label, _("No help available for this term")); evas_object_show(label); elm_object_content_set(editor->doc_popup, label); evas_object_show(editor->doc_popup); @@ -157,7 +157,7 @@ edi_editor_doc_open(Edi_Editor *editor) //Close button Evas_Object *btn = elm_button_add(editor->doc_popup); - elm_object_text_set(btn, "Close"); + elm_object_text_set(btn, _("Close")); evas_object_smart_callback_add(btn, "clicked", _edi_doc_popup_cb_btn_clicked, editor->doc_popup); elm_object_part_content_set(editor->doc_popup, "button1", btn); diff --git a/src/bin/editor/edi_editor_search.c b/src/bin/editor/edi_editor_search.c index 56c3e1d..dfb89c2 100644 --- a/src/bin/editor/edi_editor_search.c +++ b/src/bin/editor/edi_editor_search.c @@ -439,7 +439,7 @@ edi_editor_search_add(Evas_Object *parent, Edi_Editor *editor) elm_box_pack_end(big_box, box); lbl = elm_label_add(parent); - elm_object_text_set(lbl, "Search term:"); + elm_object_text_set(lbl, _("Search term:")); evas_object_size_hint_align_set(lbl, EVAS_HINT_FILL, 0.5); evas_object_size_hint_weight_set(lbl, 0.0, 0.0); elm_box_pack_end(box, lbl); @@ -462,7 +462,7 @@ edi_editor_search_add(Evas_Object *parent, Edi_Editor *editor) elm_box_pack_end(big_box, replace_box); replace_lbl = elm_label_add(parent); - elm_object_text_set(replace_lbl, "Replace term:"); + elm_object_text_set(replace_lbl, _("Replace term:")); evas_object_size_hint_align_set(replace_lbl, EVAS_HINT_FILL, 0.5); evas_object_size_hint_weight_set(replace_lbl, 0.0, 0.0); elm_box_pack_end(replace_box, replace_lbl); @@ -489,17 +489,17 @@ edi_editor_search_add(Evas_Object *parent, Edi_Editor *editor) evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_UP, _edi_search_key_up_cb, editor); wrapped = elm_label_add(parent); - elm_object_text_set(wrapped, "Reached end of file, starting from beginning"); + elm_object_text_set(wrapped, _("Reached end of file, starting from beginning")); elm_box_pack_end(box, wrapped); checkbox = elm_check_add(parent); - elm_object_text_set(checkbox, "Wrap search?"); + elm_object_text_set(checkbox, _("Wrap search?")); elm_check_state_set(checkbox, EINA_TRUE); evas_object_show(checkbox); elm_box_pack_end(box, checkbox); btn = elm_button_add(parent); - elm_object_text_set(btn, "Search"); + elm_object_text_set(btn, _("Search")); evas_object_size_hint_align_set(btn, 1.0, 0.0); evas_object_size_hint_weight_set(btn, 0.0, 0.0); evas_object_show(btn); @@ -507,7 +507,7 @@ edi_editor_search_add(Evas_Object *parent, Edi_Editor *editor) evas_object_smart_callback_add(btn, "clicked", _edi_search_clicked, editor); replace_btn = elm_button_add(parent); - elm_object_text_set(replace_btn, "Replace"); + elm_object_text_set(replace_btn, _("Replace")); evas_object_size_hint_align_set(replace_btn, 1.0, 0.0); evas_object_size_hint_weight_set(replace_btn, 0.0, 0.0); evas_object_show(replace_btn); @@ -515,7 +515,7 @@ edi_editor_search_add(Evas_Object *parent, Edi_Editor *editor) evas_object_smart_callback_add(replace_btn, "clicked", _edi_replace_clicked, editor); btn = elm_button_add(parent); - elm_object_text_set(btn, "Cancel"); + elm_object_text_set(btn, _("Cancel")); evas_object_size_hint_align_set(btn, 1.0, 0.0); evas_object_size_hint_weight_set(btn, 0.0, 0.0); evas_object_show(btn); diff --git a/src/bin/language/edi_language_provider_c.c b/src/bin/language/edi_language_provider_c.c index 7d12313..4d09d9c 100644 --- a/src/bin/language/edi_language_provider_c.c +++ b/src/bin/language/edi_language_provider_c.c @@ -153,9 +153,9 @@ const char * _edi_language_c_mime_name(const char *mime) { if (!strcasecmp(mime, "text/x-chdr")) - return "C header"; + return _("C header"); if (!strcasecmp(mime, "text/x-csrc")) - return "C source"; + return _("C source"); return NULL; } diff --git a/src/bin/language/edi_language_provider_python.c b/src/bin/language/edi_language_provider_python.c index 551780f..a66658c 100644 --- a/src/bin/language/edi_language_provider_python.c +++ b/src/bin/language/edi_language_provider_python.c @@ -29,7 +29,7 @@ const char * _edi_language_python_mime_name(const char *mime) { if (!strcasecmp(mime, "text/x-python")) - return "Python source"; + return _("Python source"); return NULL; } diff --git a/src/bin/language/edi_language_provider_rust.c b/src/bin/language/edi_language_provider_rust.c index 3323314..736720f 100644 --- a/src/bin/language/edi_language_provider_rust.c +++ b/src/bin/language/edi_language_provider_rust.c @@ -29,7 +29,7 @@ const char * _edi_language_rust_mime_name(const char *mime) { if (!strcasecmp(mime, "text/rust")) - return "Rust source"; + return _("Rust source"); return NULL; } diff --git a/src/bin/mainview/edi_mainview.c b/src/bin/mainview/edi_mainview.c index 0c60c7a..ca04ada 100644 --- a/src/bin/mainview/edi_mainview.c +++ b/src/bin/mainview/edi_mainview.c @@ -514,7 +514,7 @@ edi_mainview_project_search_popup_show(void) popup = elm_popup_add(_main_win); _edi_mainview_search_project_popup = popup; elm_object_part_text_set(popup, "title,text", - "Search for (whole project)"); + _("Search for (whole project)")); box = elm_box_add(popup); sep = elm_separator_add(box); @@ -523,7 +523,7 @@ edi_mainview_project_search_popup_show(void) elm_box_pack_end(box, sep); label = elm_label_add(popup); - elm_object_text_set(label, "Please enter a term to search for within<br> the whole project."); + elm_object_text_set(label, _("Please enter a term to search for within<br> the whole project.")); evas_object_show(label); elm_box_pack_end(box, label); @@ -551,13 +551,13 @@ edi_mainview_project_search_popup_show(void) elm_object_content_set(popup, box); button = elm_button_add(popup); - elm_object_text_set(button, "Cancel"); + elm_object_text_set(button, _("Cancel")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_mainview_project_search_popup_cancel_cb, NULL); button = elm_button_add(popup); - elm_object_text_set(button, "Search"); + elm_object_text_set(button, _("Search")); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_mainview_project_search_cb, input); diff --git a/src/bin/mainview/edi_mainview_panel.c b/src/bin/mainview/edi_mainview_panel.c index e18700a..5892dca 100644 --- a/src/bin/mainview/edi_mainview_panel.c +++ b/src/bin/mainview/edi_mainview_panel.c @@ -412,7 +412,7 @@ _edi_mainview_panel_mime_content_safe_popup(void) popup = elm_popup_add(_main_win); elm_object_part_text_set(popup, "title,text", - "Unrecognized file type"); + _("Unrecognized file type")); table = elm_table_add(popup); icon = elm_icon_add(table); @@ -429,7 +429,7 @@ _edi_mainview_panel_mime_content_safe_popup(void) evas_object_show(sep); elm_box_pack_end(box, sep); label = elm_label_add(popup); - elm_object_text_set(label, "To force open, select this file in the file browser, <br>and use \"open as\" menu options."); + elm_object_text_set(label, _("To force open, select this file in the file browser, <br>and use \"open as\" menu options.")); evas_object_show(label); elm_table_pack(table, label, 1, 0, 1, 1); evas_object_show(table); @@ -444,7 +444,7 @@ _edi_mainview_panel_mime_content_safe_popup(void) elm_object_content_set(popup, box); button = elm_button_add(popup); - elm_object_text_set(button, "OK"); + elm_object_text_set(button, _("OK")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_popup_cancel_cb, popup); @@ -671,7 +671,7 @@ edi_mainview_panel_goto_popup_show(Edi_Mainview_Panel *panel) popup = elm_popup_add(_main_win); _edi_mainview_goto_popup = popup; elm_object_part_text_set(popup, "title,text", - "Enter line number"); + _("Enter line number")); box = elm_box_add(popup); elm_box_horizontal_set(box, EINA_FALSE); @@ -697,13 +697,13 @@ edi_mainview_panel_goto_popup_show(Edi_Mainview_Panel *panel) elm_box_pack_end(box, sep); button = elm_button_add(popup); - elm_object_text_set(button, "Cancel"); + elm_object_text_set(button, _("Cancel")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_popup_cancel_cb, popup); button = elm_button_add(popup); - elm_object_text_set(button, "Go"); + elm_object_text_set(button, _("Go")); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_mainview_panel_goto_popup_go_cb, input); diff --git a/src/bin/screens/edi_about.c b/src/bin/screens/edi_about.c index 0f7cf1e..9e28dfc 100644 --- a/src/bin/screens/edi_about.c +++ b/src/bin/screens/edi_about.c @@ -30,7 +30,7 @@ edi_about_show(Evas_Object *mainwin) win = elm_win_add(mainwin, "about", ELM_WIN_BASIC); if (!win) return NULL; - elm_win_title_set(win, "About Edi (" VERSION ")"); + elm_win_title_set(win, _("About Edi")); elm_win_focus_highlight_enabled_set(win, EINA_TRUE); evas_object_smart_callback_add(win, "delete,request", _edi_about_exit, win); @@ -75,16 +75,16 @@ edi_about_show(Evas_Object *mainwin) elm_box_pack_end(vbox, elm_box_add(vbox)); text = elm_label_add(box); - elm_object_text_set(text, "<br>EDI is an IDE designed to get people into coding for Unix.<br>" \ + elm_object_text_set(text, _("<br>EDI is an IDE designed to get people into coding for Unix.<br>" \ "It's based on the <b>EFL</b> and written completely natively<br>" \ - "to provide a <i>responsive</i> and <i>beautiful</i> UI.<br>"); + "to provide a <i>responsive</i> and <i>beautiful</i> UI.<br>")); evas_object_size_hint_weight_set(text, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(text, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(box, text); evas_object_show(text); title = elm_entry_add(box); - elm_object_text_set(title, "<hilight><align=center>EDI's lovely authors</align></hilight>"); + elm_object_text_set(title, _("EDI's lovely authors")); elm_entry_editable_set(title, EINA_FALSE); elm_object_focus_allow_set(title, EINA_FALSE); evas_object_size_hint_weight_set(title, EVAS_HINT_EXPAND, 0.0); @@ -116,7 +116,7 @@ edi_about_show(Evas_Object *mainwin) evas_object_show(space); button = elm_button_add(box); - elm_object_text_set(button, "Visit Website"); + elm_object_text_set(button, _("Visit Website")); evas_object_smart_callback_add(button, "clicked", _edi_about_url_cb, "http://edi-ide.com"); elm_box_pack_end(buttonbox, button); @@ -128,7 +128,7 @@ edi_about_show(Evas_Object *mainwin) evas_object_show(space); button = elm_button_add(box); - elm_object_text_set(button, "Report Issue"); + elm_object_text_set(button, _("Report Issue")); evas_object_smart_callback_add(button, "clicked", _edi_about_url_cb, "https://phab.enlightenment.org/maniphest/task/edit/form/2/?projects=PHID-PROJ-geg2fyscqgjjxt3fider"); elm_box_pack_end(buttonbox, button); @@ -140,7 +140,7 @@ edi_about_show(Evas_Object *mainwin) evas_object_show(space); button = elm_button_add(box); - elm_object_text_set(button, "Donate Now"); + elm_object_text_set(button, _("Donate Now")); evas_object_smart_callback_add(button, "clicked", _edi_about_url_cb, "https://www.bountysource.com/teams/edi-ide"); elm_box_pack_end(buttonbox, button); diff --git a/src/bin/screens/edi_file_screens.c b/src/bin/screens/edi_file_screens.c index 187ac11..d9c9a55 100644 --- a/src/bin/screens/edi_file_screens.c +++ b/src/bin/screens/edi_file_screens.c @@ -25,7 +25,7 @@ _edi_file_screens_message_open(const char *message) message); button = elm_button_add(popup); - elm_object_text_set(button, "Ok"); + elm_object_text_set(button, _("OK")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_file_screens_message_close_cb, popup); @@ -58,7 +58,7 @@ _edi_file_screens_create_file_cb(void *data, name = elm_entry_entry_get((Evas_Object *) data); if (!name || strlen(name) == 0) { - _edi_file_screens_message_open("Please enter a file name."); + _edi_file_screens_message_open(_("Please enter a file name.")); return; } @@ -73,7 +73,7 @@ _edi_file_screens_create_file_cb(void *data, edi_mainview_open_path(path); } else - _edi_file_screens_message_open("Unable to write file."); + _edi_file_screens_message_open(_("Unable to write file.")); } eina_stringshare_del(_directory_path); @@ -97,14 +97,14 @@ _edi_file_screens_create_dir_cb(void *data, name = elm_entry_entry_get((Evas_Object *) data); if (!name || strlen(name) == 0) { - _edi_file_screens_message_open("Please enter a directory name."); + _edi_file_screens_message_open(_("Please enter a directory name.")); return; } path = edi_path_append(directory, name); mkdir(path, 0755); - + eina_stringshare_del(_directory_path); _directory_path = NULL; @@ -129,7 +129,7 @@ _edi_file_screens_rename_cb(void *data, name = elm_entry_entry_get(entry); if (!name || strlen(name) == 0) { - _edi_file_screens_message_open("Please enter a valid name."); + _edi_file_screens_message_open(_("Please enter a valid name.")); return; } @@ -138,9 +138,9 @@ _edi_file_screens_rename_cb(void *data, if (ecore_file_exists(path)) { if (ecore_file_is_dir(path)) - _edi_file_screens_message_open("Directory with that name already exists."); + _edi_file_screens_message_open(_("Directory with that name already exists.")); else - _edi_file_screens_message_open("File with that name already exists."); + _edi_file_screens_message_open(_("File with that name already exists.")); return; } @@ -173,18 +173,18 @@ edi_file_screens_rename(Evas_Object *parent, const char *path) if (ecore_file_is_dir(path)) elm_object_part_text_set(popup, "title,text", - "Rename directory"); + _("Rename directory")); else elm_object_part_text_set(popup, "title,text", - "Rename file"); + _("Rename file")); leaf = ecore_file_file_get(path); _directory_path = eina_stringshare_add(ecore_file_dir_get(path)); label = elm_label_add(popup); if (ecore_file_is_dir(path)) - elm_object_text_set(label, "Please enter a new name for this directory."); + elm_object_text_set(label, _("Please enter a new name for this directory.")); else - elm_object_text_set(label, "Please enter a new name for this file."); + elm_object_text_set(label, _("Please enter a new name for this file.")); evas_object_show(label); box = elm_box_add(popup); @@ -218,14 +218,14 @@ edi_file_screens_rename(Evas_Object *parent, const char *path) elm_object_content_set(popup, box); button = elm_button_add(popup); - elm_object_text_set(button, "Cancel"); + elm_object_text_set(button, _("Cancel")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_file_screens_popup_cancel_cb, popup); button = elm_button_add(popup); evas_object_data_set(button, "input", input); - elm_object_text_set(button, "Rename"); + elm_object_text_set(button, _("Rename")); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_file_screens_rename_cb, path); @@ -242,7 +242,7 @@ edi_file_screens_create_file(Evas_Object *parent, const char *directory) _parent_obj = parent; _popup = popup = elm_popup_add(parent); elm_object_part_text_set(popup, "title,text", - "Enter new file name"); + _("Enter new file name")); _directory_path = eina_stringshare_add(directory); box = elm_box_add(popup); @@ -252,7 +252,7 @@ edi_file_screens_create_file(Evas_Object *parent, const char *directory) elm_box_pack_end(box, sep); label = elm_label_add(popup); - elm_object_text_set(label, "Please enter a name for this new file."); + elm_object_text_set(label, _("Please enter a name for this new file.")); evas_object_show(label); elm_box_pack_end(box, label); @@ -279,13 +279,13 @@ edi_file_screens_create_file(Evas_Object *parent, const char *directory) elm_object_content_set(popup, box); button = elm_button_add(popup); - elm_object_text_set(button, "Cancel"); + elm_object_text_set(button, _("Cancel")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_file_screens_popup_cancel_cb, popup); button = elm_button_add(popup); - elm_object_text_set(button, "Create"); + elm_object_text_set(button, _("Create")); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_file_screens_create_file_cb, input); @@ -304,7 +304,7 @@ edi_file_screens_create_dir(Evas_Object *parent, const char *directory) _popup_dir = popup = elm_popup_add(parent); elm_object_part_text_set(popup, "title,text", - "Enter new directory name"); + _("Enter new directory name")); box = elm_box_add(popup); sep = elm_separator_add(box); @@ -313,7 +313,7 @@ edi_file_screens_create_dir(Evas_Object *parent, const char *directory) elm_box_pack_end(box, sep); label = elm_label_add(popup); - elm_object_text_set(label, "Please enter a name for this new directory."); + elm_object_text_set(label, _("Please enter a name for this new directory.")); evas_object_show(label); elm_box_pack_end(box, label); @@ -340,13 +340,13 @@ edi_file_screens_create_dir(Evas_Object *parent, const char *directory) elm_object_content_set(popup, box); button = elm_button_add(popup); - elm_object_text_set(button, "Cancel"); + elm_object_text_set(button, _("Cancel")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_file_screens_popup_cancel_cb, popup); button = elm_button_add(popup); - elm_object_text_set(button, "Create"); + elm_object_text_set(button, _("Create")); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_file_screens_create_dir_cb, input); diff --git a/src/bin/screens/edi_scm_screens.c b/src/bin/screens/edi_scm_screens.c index ea5c99c..8c1ef8d 100644 --- a/src/bin/screens/edi_scm_screens.c +++ b/src/bin/screens/edi_scm_screens.c @@ -29,7 +29,7 @@ _edi_scm_screens_message_open(const char *message) message); button = elm_button_add(popup); - elm_object_text_set(button, "Ok"); + elm_object_text_set(button, _("OK")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_scm_screens_message_close_cb, popup); @@ -61,7 +61,7 @@ _edi_scm_screens_commit_cb(void *data, text = elm_entry_entry_get((Evas_Object *) data); if (!text || !text[0]) { - _edi_scm_screens_message_open("Please enter a valid commit message."); + _edi_scm_screens_message_open(_("Please enter a valid commit message.")); return; } @@ -91,7 +91,7 @@ edi_scm_screens_commit(Evas_Object *parent) engine= edi_scm_engine_get(); if (!engine) { - _edi_scm_screens_message_open("SCM engine is not available."); + _edi_scm_screens_message_open(_("SCM engine is not available.")); return; } @@ -101,7 +101,7 @@ edi_scm_screens_commit(Evas_Object *parent) evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(popup, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_object_part_text_set(popup, "title,text", - "Commit Changes"); + _("Commit Changes")); box = elm_box_add(popup); elm_box_horizontal_set(box, EINA_FALSE); elm_object_content_set(popup, box); @@ -125,7 +125,7 @@ edi_scm_screens_commit(Evas_Object *parent) elm_box_pack_end(hbox, label); user = eina_strbuf_new(); - eina_strbuf_append_printf(user, "Author:<br><b>%s</b><br><%s>", + eina_strbuf_append_printf(user, "%s:<br><b>%s</b><br><%s>", _("Author"), engine->remote_name_get(), engine->remote_email_get()); elm_object_text_set(label, eina_strbuf_string_get(user)); eina_strbuf_free(user); @@ -146,7 +146,7 @@ edi_scm_screens_commit(Evas_Object *parent) label = elm_label_add(box); evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_text_set(label, "<b>Summary<b>"); + elm_object_text_set(label, _("Summary")); elm_box_pack_end(box, label); evas_object_show(label); @@ -174,30 +174,30 @@ edi_scm_screens_commit(Evas_Object *parent) { case EDI_SCM_STATUS_ADDED: elm_icon_standard_set(icon, "document-new"); - eina_strbuf_append(text, "(add) "); + eina_strbuf_append_printf(text, "(%s) ", _("add")); break; case EDI_SCM_STATUS_MODIFIED: elm_icon_standard_set(icon, "document-save-as"); - eina_strbuf_append(text, "(mod) "); + eina_strbuf_append_printf(text, "(%s) ", _("mod")); break; case EDI_SCM_STATUS_DELETED: elm_icon_standard_set(icon, "edit-delete"); - eina_strbuf_append(text, "(del) "); + eina_strbuf_append_printf(text, "(%s) ", _("del")); break; case EDI_SCM_STATUS_RENAMED: elm_icon_standard_set(icon, "document-save-as"); - eina_strbuf_append(text, "(ren) "); + eina_strbuf_append_printf(text, "(%s) ", _("ren")); break; case EDI_SCM_STATUS_UNTRACKED: elm_icon_standard_set(icon, "dialog-question"); - eina_strbuf_append(text, "(untracked)"); + eina_strbuf_append_printf(text, "(%s)", _("untracked")); break; default: elm_icon_standard_set(icon, "text-x-generic"); } if (!status->staged && status->change != EDI_SCM_STATUS_UNTRACKED) - eina_strbuf_append(text, "- unstaged"); + eina_strbuf_append_printf(text, "- %s", _("unstaged")); elm_list_item_append(list, eina_strbuf_string_get(text), icon, NULL, NULL, NULL); @@ -214,7 +214,7 @@ edi_scm_screens_commit(Evas_Object *parent) { icon = elm_icon_add(box); elm_icon_standard_set(icon, "dialog-information"); - elm_list_item_append(list, "Nothing to commit.", icon, NULL, NULL, NULL); + elm_list_item_append(list, _("Nothing to commit."), icon, NULL, NULL, NULL); } elm_scroller_bounce_set(list, EINA_TRUE, EINA_TRUE); @@ -223,7 +223,7 @@ edi_scm_screens_commit(Evas_Object *parent) evas_object_show(list); input = elm_entry_add(box); - elm_object_text_set(input, "Enter commit summary<br><br>And change details<br>"); + elm_object_text_set(input, _("Enter commit summary<br><br>And change details<br>")); evas_object_size_hint_weight_set(input, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(input, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_entry_editable_set(input, staged_changes); @@ -249,7 +249,7 @@ edi_scm_screens_commit(Evas_Object *parent) if (strlen(markup)) eina_strbuf_append_printf(text, "<font=Fixed>%s</font>", markup); else - eina_strbuf_append(text, "No changes to display."); + eina_strbuf_append(text, _("No changes to display.")); elm_object_text_set(entry, eina_strbuf_string_get(text)); @@ -263,14 +263,14 @@ edi_scm_screens_commit(Evas_Object *parent) elm_box_pack_end(box, sep); button = elm_button_add(popup); - elm_object_text_set(button, "Cancel"); + elm_object_text_set(button, _("Cancel")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_scm_screens_popup_cancel_cb, popup); button = elm_button_add(popup); evas_object_data_set(button, "input", input); - elm_object_text_set(button, "Commit"); + elm_object_text_set(button, _("Commit")); elm_object_disabled_set(button, !staged_changes); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", @@ -285,10 +285,10 @@ edi_scm_screens_binary_missing(Evas_Object *parent, const char *binary) Evas_Object *popup, *label, *button; Eina_Strbuf *text = eina_strbuf_new(); - eina_strbuf_append_printf(text, "No %s binary found, please install %s.", binary, binary); + eina_strbuf_append_printf(text, _("No %s binary found, please install %s."), binary, binary); popup = elm_popup_add(parent); - elm_object_part_text_set(popup, "title,text", "SCM: Unable to launch"); + elm_object_part_text_set(popup, "title,text", _("Unable to launch SCM binary")); label = elm_label_add(popup); elm_object_text_set(label, eina_strbuf_string_get(text)); evas_object_show(label); @@ -297,7 +297,7 @@ edi_scm_screens_binary_missing(Evas_Object *parent, const char *binary) eina_strbuf_free(text); button = elm_button_add(popup); - elm_object_text_set(button, "OK"); + elm_object_text_set(button, _("OK")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_scm_screens_popup_cancel_cb, popup); diff --git a/src/bin/screens/edi_screens.c b/src/bin/screens/edi_screens.c index bf725c9..66d067d 100644 --- a/src/bin/screens/edi_screens.c +++ b/src/bin/screens/edi_screens.c @@ -37,7 +37,7 @@ void edi_screens_message_confirm(Evas_Object *parent, const char *message, void Evas_Object *popup, *table, *label, *button, *icon, *box, *sep; _edi_screens_popup = popup = elm_popup_add(parent); - elm_object_part_text_set(popup, "title,text", "Confirmation required"); + elm_object_part_text_set(popup, "title,text", _("Confirmation required")); table = elm_table_add(popup); @@ -70,13 +70,13 @@ void edi_screens_message_confirm(Evas_Object *parent, const char *message, void elm_object_content_set(popup, box); button = elm_button_add(popup); - elm_object_text_set(button, "Yes"); + elm_object_text_set(button, _("Yes")); elm_object_part_content_set(popup, "button1", button); evas_object_data_set(button, "callback", confirm_cb); evas_object_smart_callback_add(button, "clicked", _edi_screens_message_confirm_cb, data); button = elm_button_add(popup); - elm_object_text_set(button, "No"); + elm_object_text_set(button, _("No")); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_screens_popup_cancel_cb, popup); @@ -119,7 +119,7 @@ void edi_screens_message(Evas_Object *parent, const char *title, const char *mes elm_object_content_set(popup, box); button = elm_button_add(popup); - elm_object_text_set(button, "OK"); + elm_object_text_set(button, _("OK")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_screens_popup_cancel_cb, popup); diff --git a/src/bin/screens/edi_settings.c b/src/bin/screens/edi_settings.c index a28f5d4..249b164 100644 --- a/src/bin/screens/edi_settings.c +++ b/src/bin/screens/edi_settings.c @@ -117,7 +117,7 @@ _edi_settings_font_choose_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE evas_object_show(box); edi_settings_font_add(box); - elm_naviframe_item_push(naviframe, "Font", NULL, NULL, box, NULL); + elm_naviframe_item_push(naviframe, _("Font"), NULL, NULL, box, NULL); } static Evas_Object * @@ -146,7 +146,7 @@ _edi_settings_display_create(Evas_Object *parent) { Evas_Object *box, *hbox, *frame, *label, *spinner, *check, *button, *preview; - frame = _edi_settings_panel_create(parent, "Display"); + frame = _edi_settings_panel_create(parent, _("Display")); box = elm_object_part_content_get(frame, "default"); hbox = elm_box_add(parent); @@ -157,7 +157,7 @@ _edi_settings_display_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Font"); + elm_object_text_set(label, _("Font")); evas_object_size_hint_align_set(label, EVAS_HINT_EXPAND, 0.5); elm_box_pack_end(hbox, label); evas_object_show(label); @@ -176,7 +176,7 @@ _edi_settings_display_create(Evas_Object *parent) elm_object_focus_set(button, EINA_TRUE); check = elm_check_add(box); - elm_object_text_set(check, "Display whitespace"); + elm_object_text_set(check, _("Display whitespace")); elm_check_state_set(check, _edi_project_config->gui.show_whitespace); elm_box_pack_end(box, check); evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0.0); @@ -193,7 +193,7 @@ _edi_settings_display_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Line width marker"); + elm_object_text_set(label, _("Line width marker")); evas_object_size_hint_align_set(label, EVAS_HINT_EXPAND, 0.5); elm_box_pack_end(hbox, label); evas_object_show(label); @@ -219,7 +219,7 @@ _edi_settings_display_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Tabstop"); + elm_object_text_set(label, _("Tabstop")); evas_object_size_hint_align_set(label, 0.0, 0.5); elm_box_pack_end(hbox, label); evas_object_show(label); @@ -238,7 +238,7 @@ _edi_settings_display_create(Evas_Object *parent) evas_object_show(spinner); check = elm_check_add(box); - elm_object_text_set(check, "Insert spaces when tab is pressed"); + elm_object_text_set(check, _("Insert spaces when tab is pressed")); elm_check_state_set(check, _edi_project_config->gui.tab_inserts_spaces); elm_box_pack_end(box, check); evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0.0); @@ -248,7 +248,7 @@ _edi_settings_display_create(Evas_Object *parent) evas_object_show(check); check = elm_check_add(box); - elm_object_text_set(check, "Hide Toolbar"); + elm_object_text_set(check, _("Hide Toolbar")); elm_check_state_set(check, _edi_project_config->gui.toolbar_hidden); elm_box_pack_end(box, check); evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0.5); @@ -298,7 +298,7 @@ _edi_settings_builds_create(Evas_Object *parent) { Evas_Object *box, *frame, *hbox, *label, *ic, *selector, *file, *entry; - frame = _edi_settings_panel_create(parent, "Builds"); + frame = _edi_settings_panel_create(parent, _("Builds")); box = elm_object_part_content_get(frame, "default"); hbox = elm_box_add(parent); @@ -309,7 +309,7 @@ _edi_settings_builds_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Runtime binary"); + elm_object_text_set(label, _("Runtime binary")); evas_object_size_hint_weight_set(label, 0.0, 0.0); evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL); elm_box_pack_end(hbox, label); @@ -320,7 +320,7 @@ _edi_settings_builds_create(Evas_Object *parent) evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); selector = elm_fileselector_button_add(box); - elm_object_text_set(selector, "Select"); + elm_object_text_set(selector, _("Select")); elm_object_part_content_set(selector, "icon", ic); elm_fileselector_path_set(selector, edi_project_get()); evas_object_size_hint_weight_set(selector, 0.25, 0.0); @@ -348,7 +348,7 @@ _edi_settings_builds_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Runtime args"); + elm_object_text_set(label, _("Runtime arguments")); evas_object_size_hint_weight_set(label, 0.0, 0.0); evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL); elm_box_pack_end(hbox, label); @@ -425,7 +425,7 @@ _edi_settings_project_create(Evas_Object *parent) Eina_Strbuf *text; frames = elm_box_add(parent); - frame = _edi_settings_panel_create(frames, "Project Settings"); + frame = _edi_settings_panel_create(frames, _("Project Settings")); evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, 0.5); evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(frames, frame); @@ -440,7 +440,7 @@ _edi_settings_project_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Author Name: "); + elm_object_text_set(label, _("Author Name: ")); evas_object_size_hint_weight_set(label, 0.0, 0.0); evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL); elm_box_pack_end(hbox, label); @@ -465,7 +465,7 @@ _edi_settings_project_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Author E-mail: "); + elm_object_text_set(label, _("Author E-mail: ")); evas_object_size_hint_weight_set(label, 0.0, 0.0); evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL); elm_box_pack_end(hbox, label); @@ -487,7 +487,7 @@ _edi_settings_project_create(Evas_Object *parent) engine = edi_scm_engine_get(); text = eina_strbuf_new(); - eina_strbuf_append(text, "Source Control"); + eina_strbuf_append(text, _("Source Control")); eina_strbuf_append_printf(text, " (%s)", engine->name); frame = _edi_settings_panel_create(frames, eina_strbuf_string_get(text)); @@ -506,7 +506,7 @@ _edi_settings_project_create(Evas_Object *parent) evas_object_show(hbox); label = elm_label_add(hbox); - elm_object_text_set(label, "Remote URL:"); + elm_object_text_set(label, _("Remote URL:")); evas_object_size_hint_weight_set(label, 0.0, 0.0); evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL); elm_box_pack_end(hbox, label); @@ -554,11 +554,11 @@ _edi_settings_behaviour_create(Evas_Object *parent) { Evas_Object *box, *frame, *check; - frame = _edi_settings_panel_create(parent, "Behaviour"); + frame = _edi_settings_panel_create(parent, _("Behaviour")); box = elm_object_part_content_get(frame, "default"); check = elm_check_add(box); - elm_object_text_set(check, "Auto save files"); + elm_object_text_set(check, _("Auto save files")); elm_check_state_set(check, _edi_config->autosave); elm_box_pack_end(box, check); evas_object_size_hint_align_set(check, EVAS_HINT_FILL, 0.5); @@ -569,7 +569,7 @@ _edi_settings_behaviour_create(Evas_Object *parent) elm_object_focus_set(check, EINA_TRUE); check = elm_check_add(box); - elm_object_text_set(check, "Trim trailing whitespace"); + elm_object_text_set(check, _("Trim trailing whitespace")); elm_check_state_set(check, _edi_config->trim_whitespace); elm_box_pack_end(box, check); evas_object_size_hint_align_set(check, EVAS_HINT_FILL, 0.5); @@ -589,7 +589,7 @@ edi_settings_show(Evas_Object *mainwin) win = elm_win_add(mainwin, "settings", ELM_WIN_BASIC); if (!win) return NULL; - elm_win_title_set(win, "Edi Settings"); + elm_win_title_set(win, _("Edi Settings")); elm_win_focus_highlight_enabled_set(win, EINA_TRUE); evas_object_smart_callback_add(win, "delete,request", _edi_settings_exit, win); @@ -635,16 +635,16 @@ edi_settings_show(Evas_Object *mainwin) elm_naviframe_item_title_enabled_set(_edi_settings_behaviour, EINA_FALSE, EINA_FALSE); - elm_toolbar_item_append(tb, "applications-development", "Project",_edi_settings_category_cb, _edi_settings_project); - default_it = elm_toolbar_item_append(tb, "preferences-desktop", "Display", + elm_toolbar_item_append(tb, "applications-development", _("Project"),_edi_settings_category_cb, _edi_settings_project); + default_it = elm_toolbar_item_append(tb, "preferences-desktop", _("Display"), _edi_settings_category_cb, _edi_settings_display); elm_toolbar_item_append(tb, "system-run", "Builds", _edi_settings_category_cb, _edi_settings_builds); tb_it = elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL); elm_toolbar_item_separator_set(tb_it, EINA_TRUE); - elm_toolbar_item_append(tb, "application-internet", "Global", NULL, NULL); - elm_toolbar_item_append(tb, "preferences-other", "Behaviour", + elm_toolbar_item_append(tb, "application-internet", _("Global"), NULL, NULL); + elm_toolbar_item_append(tb, "preferences-other", _("Behaviour"), _edi_settings_category_cb, _edi_settings_behaviour); elm_toolbar_item_selected_set(default_it, EINA_TRUE); diff --git a/src/bin/screens/edi_welcome.c b/src/bin/screens/edi_welcome.c index 03e3ee7..a641d1e 100644 --- a/src/bin/screens/edi_welcome.c +++ b/src/bin/screens/edi_welcome.c @@ -67,7 +67,7 @@ _edi_message_open(const char *message, Eina_Bool deletable) elm_object_part_text_set(popup, "title,text", message); button = elm_button_add(popup); - elm_object_text_set(button, "Ok"); + elm_object_text_set(button, _("OK")); elm_object_part_content_set(popup, "button1", button); evas_object_smart_callback_add(button, "clicked", _edi_on_close_message, NULL); @@ -75,7 +75,7 @@ _edi_message_open(const char *message, Eina_Bool deletable) if (deletable) { button = elm_button_add(popup); - elm_object_text_set(button, "Delete"); + elm_object_text_set(button, _("Delete")); elm_object_part_content_set(popup, "button2", button); evas_object_smart_callback_add(button, "clicked", _edi_on_delete_message, NULL); @@ -90,7 +90,7 @@ _edi_welcome_project_open(const char *path, const unsigned int _edi_creating) if (!edi_open(path) && !_edi_creating) { _edi_message_path = path; - _edi_message_open("Apparently that project directory doesn't exist", EINA_TRUE); + _edi_message_open(_("That project directory no longer exists"), EINA_TRUE); } else evas_object_del(_welcome_window); @@ -130,7 +130,7 @@ _edi_welcome_project_choose_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU elm_need_ethumb(); elm_need_efreet(); - win = elm_win_util_standard_add("projectselector", "Choose a Project Folder"); + win = elm_win_util_standard_add("projectselector", _("Choose a Project Folder")); if (!win) return; elm_win_focus_highlight_enabled_set(win, EINA_TRUE); @@ -167,7 +167,7 @@ _edi_welcome_project_new_directory_row_add(const char *text, int row, evas_object_show(label); input = elm_fileselector_entry_add(parent); - elm_object_text_set(input, "Select folder"); + elm_object_text_set(input, _("Select folder")); elm_fileselector_folder_only_set(input, EINA_TRUE); evas_object_size_hint_weight_set(input, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(input, EVAS_HINT_FILL, EVAS_HINT_FILL); @@ -318,7 +318,7 @@ _edi_welcome_project_new_skeleton_combobox_add(const char *text, int row, Evas_O cmbbox = elm_combobox_add(parent); evas_object_size_hint_weight_set(cmbbox, EVAS_HINT_EXPAND, 0); evas_object_size_hint_align_set(cmbbox, EVAS_HINT_FILL, 0); - elm_object_part_text_set(cmbbox, "guide", "Select the project type"); + elm_object_part_text_set(cmbbox, "guide", _("Select the project type")); elm_object_text_set(cmbbox, "eflproject"); elm_table_pack(parent, cmbbox, 1, row, _EDI_WELCOME_PROJECT_NEW_TABLE_WIDTH - 1, 1); evas_object_smart_callback_add(cmbbox, "item,pressed", @@ -425,25 +425,25 @@ _edi_welcome_project_new_cb(void *data, Evas_Object *obj EINA_UNUSED, void *even username = getenv("USER"); if (!username) username = getenv("USERNAME"); - _edi_welcome_project_new_skeleton_combobox_add("Project Type", row++, content); - _edi_welcome_project_new_directory_row_add("Parent Path", row++, content); - _edi_welcome_project_new_input_row_add("Project Name", NULL, row++, content); - _edi_welcome_project_new_input_row_add("Project URL", NULL, row++, content); + _edi_welcome_project_new_skeleton_combobox_add(_("Project Type"), row++, content); + _edi_welcome_project_new_directory_row_add(_("Parent Path"), row++, content); + _edi_welcome_project_new_input_row_add(_("Project Name"), NULL, row++, content); + _edi_welcome_project_new_input_row_add(_("Project URL"), NULL, row++, content); if (_edi_welcome_user_fullname_get(username, fullname, 1024) > 0) - _edi_welcome_project_new_input_row_add("Creator Name", fullname, row++, content); + _edi_welcome_project_new_input_row_add(_("Creator Name"), fullname, row++, content); else - _edi_welcome_project_new_input_row_add("Creator Name", username, row++, content); - _edi_welcome_project_new_input_row_add("Creator Email", NULL, row++, content); + _edi_welcome_project_new_input_row_add(_("Creator Name"), username, row++, content); + _edi_welcome_project_new_input_row_add(_("Creator Email"), NULL, row++, content); button = elm_button_add(content); - elm_object_text_set(button, "Create"); + elm_object_text_set(button, _("Create")); evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(button); elm_table_pack(content, button, _EDI_WELCOME_PROJECT_NEW_TABLE_WIDTH - 2, row, 2, 1); evas_object_smart_callback_add(button, "clicked", _edi_welcome_project_new_create_cb, NULL); - item = elm_naviframe_item_push(naviframe, "Create New Project", + item = elm_naviframe_item_push(naviframe, _("Create New Project"), NULL, NULL, content, NULL); elm_naviframe_item_title_enabled_set(item, EINA_TRUE, EINA_TRUE); } @@ -463,7 +463,7 @@ _edi_welcome_project_clone_click_cb(void *data EINA_UNUSED, Evas_Object *obj EIN dir = edi_path_append(parent, name); status = edi_scm_git_clone(url, dir); if (status) - _edi_message_open("Unable to clone project, please check URL or try again later", EINA_TRUE); + _edi_message_open(_("Unable to clone project, please check URL or try again later"), EINA_TRUE); else _edi_welcome_project_open(dir, EINA_FALSE); } @@ -480,19 +480,19 @@ _edi_welcome_project_clone_cb(void *data, Evas_Object *obj EINA_UNUSED, void *ev evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_show(content); - _edi_welcome_project_new_input_row_add("Source Control URL", NULL, row++, content); - _edi_welcome_project_new_directory_row_add("Parent Path", row++, content); - _edi_welcome_project_new_input_row_add("Project Name", NULL, row++, content); + _edi_welcome_project_new_input_row_add(_("Source Control URL"), NULL, row++, content); + _edi_welcome_project_new_directory_row_add(_("Parent Path"), row++, content); + _edi_welcome_project_new_input_row_add(_("Project Name"), NULL, row++, content); button = elm_button_add(content); - elm_object_text_set(button, "Checkout"); + elm_object_text_set(button, _("Checkout")); evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(button); elm_table_pack(content, button, _EDI_WELCOME_PROJECT_NEW_TABLE_WIDTH - 2, row, 2, 1); evas_object_smart_callback_add(button, "clicked", _edi_welcome_project_clone_click_cb, NULL); - item = elm_naviframe_item_push(naviframe, "Checkout Existing Project", + item = elm_naviframe_item_push(naviframe, _("Checkout Existing Project"), NULL, NULL, content, NULL); elm_naviframe_item_title_enabled_set(item, EINA_TRUE, EINA_TRUE); } @@ -596,7 +596,7 @@ Evas_Object *edi_welcome_show() Elm_Object_Item *item; char buf[PATH_MAX]; - win = elm_win_util_standard_add("main", "Welcome to Edi"); + win = elm_win_util_standard_add("main", _("Welcome to Edi")); if (!win) return NULL; _welcome_window = win; @@ -622,7 +622,7 @@ Evas_Object *edi_welcome_show() evas_object_show(box); frame = elm_frame_add(box); - elm_object_text_set(frame, "Recent Projects:"); + elm_object_text_set(frame, _("Recent Projects:")); evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(box, frame); @@ -631,7 +631,7 @@ Evas_Object *edi_welcome_show() _edi_project_box = frame; _edi_welcome_add_recent_projects(frame); - button = _edi_welcome_button_create("Open Existing Project", "folder", + button = _edi_welcome_button_create(_("Open Existing Project"), "folder", box, _edi_welcome_project_choose_cb, NULL); elm_box_pack_end(box, button); @@ -651,16 +651,16 @@ Evas_Object *edi_welcome_show() elm_box_pack_end(box, image); evas_object_show(image); - button = _edi_welcome_button_create("Create New Project", "folder-new", + button = _edi_welcome_button_create(_("Create New Project"), "folder-new", box, _edi_welcome_project_new_cb, naviframe); elm_box_pack_end(box, button); - button = _edi_welcome_button_create("Checkout Existing Project", "network-server", + button = _edi_welcome_button_create(_("Checkout Existing Project"), "network-server", box, _edi_welcome_project_clone_cb, naviframe); elm_box_pack_end(box, button); item = elm_naviframe_item_push(naviframe, - "Choose Project", + _("Choose Project"), NULL, NULL, hbx, --