From 10e84a7707f66204e7b4233cd266267ae6460ea7 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 21 May 2021 01:48:55 +0200 Subject: [PATCH] Translate Error messages in main(). --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 0e45eca..c0376b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,7 @@ #include "options.hpp" #include +#include #include #include @@ -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; }