Translate Error messages in main().
This commit is contained in:
parent
7007d5e89a
commit
10e84a7707
|
@ -17,6 +17,7 @@
|
|||
#include "options.hpp"
|
||||
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/message.hpp>
|
||||
#include <boost/program_options/errors.hpp>
|
||||
#include <boost/program_options/variables_map.hpp>
|
||||
|
||||
|
@ -31,6 +32,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
namespace po = boost::program_options;
|
||||
|
||||
using boost::locale::translate;
|
||||
using std::cerr;
|
||||
using std::cout;
|
||||
|
||||
|
@ -48,7 +50,8 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
catch (std::exception &e)
|
||||
{ // Exceptions we can't recover from or ones we don't know.
|
||||
cerr << "ERROR: " << e.what() << '\n';
|
||||
cerr << translate("ERROR: ") << e.what() << '\n';
|
||||
cerr << translate("Error while parsing options.") << '\n';
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user