X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Ftool%2Fmain.cpp;h=04bf9053d8e23b807e52eb5e69ce178988d3f615;hb=38c96cf43203ac5275225e1177d5e5cd01f07146;hp=d74f3cf5268a490b4363e45aaf9f2e0318dfc196;hpb=37600b4b217caa5e316984ec0b035c5e8f9698af;p=synfig.git diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index d74f3cf..04bf905 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -57,18 +58,26 @@ using namespace synfig; /* === M A C R O S ========================================================= */ +#ifdef ENABLE_NLS +#undef _ +#define _(x) gettext(x) +#else +#undef _ +#define _(x) (x) +#endif + enum exit_code { - SYNFIGTOOL_OK =0, - SYNFIGTOOL_FILENOTFOUND =1, - SYNFIGTOOL_BORRED =2, - SYNFIGTOOL_HELP =3, - SYNFIGTOOL_UNKNOWNARGUMENT =4, - SYNFIGTOOL_UNKNOWNERROR =5, - SYNFIGTOOL_INVALIDTARGET =6, - SYNFIGTOOL_RENDERFAILURE =7, - SYNFIGTOOL_BLANK =8, - SYNFIGTOOL_BADVERSION =9, + SYNFIGTOOL_OK = 0, + SYNFIGTOOL_FILENOTFOUND = 1, + SYNFIGTOOL_BORED = 2, + SYNFIGTOOL_HELP = 3, + SYNFIGTOOL_UNKNOWNARGUMENT = 4, + SYNFIGTOOL_UNKNOWNERROR = 5, + SYNFIGTOOL_INVALIDTARGET = 6, + SYNFIGTOOL_RENDERFAILURE = 7, + SYNFIGTOOL_BLANK = 8, + SYNFIGTOOL_BADVERSION = 9, SYNFIGTOOL_MISSINGARGUMENT =10 }; @@ -836,6 +845,12 @@ int main(int argc, char *argv[]) arg_list_t arg_list; job_list_t job_list; +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + bindtextdomain("synfig", LOCALEDIR); + textdomain("synfig"); +#endif + progname=argv[0]; Progress p(argv[0]); @@ -958,7 +973,8 @@ int main(int argc, char *argv[]) if(target_name.empty() && !job_list.front().outfilename.empty()) { VERBOSE_OUT(3)<<_("Target name undefined, attempting to figure it out")<