X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Ftool%2Fmain.cpp;h=afda5228f739a68ed310ae1f7fa7f859412f539d;hb=ab74bd093111b6417597b3a406a12be7ee459da5;hp=424d2ea2be88a0c757d9cbafba61cd507b5de377;hpb=a5c294876b8c1962048f3ca7e08554f94822f273;p=synfig.git diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index 424d2ea..afda522 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -34,6 +35,7 @@ #include #include #include +#include #include #include @@ -56,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 }; @@ -122,7 +132,7 @@ public: } virtual bool - amount_complete(int current, int total) + amount_complete(int /*current*/, int /*total*/) { return true; } @@ -835,6 +845,13 @@ int main(int argc, char *argv[]) arg_list_t arg_list; job_list_t job_list; + setlocale(LC_ALL, ""); + +#ifdef ENABLE_NLS + bindtextdomain("synfig", LOCALEDIR); + textdomain("synfig"); +#endif + progname=argv[0]; Progress p(argv[0]); @@ -957,7 +974,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")<