summaryrefslogtreecommitdiff
path: root/src/global.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-25 03:51:42 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-25 03:51:42 -0400
commit238bd7f8a5131e9bc51a649553fd2fafaf6337c2 (patch)
treeb8ba95c43cbf66ed98abab8cc0c1944aa03ea50f /src/global.cc
parentf745767fa68ad26195eed50b8c10dbaccba63e1e (diff)
downloadfork-ledger-238bd7f8a5131e9bc51a649553fd2fafaf6337c2.tar.gz
fork-ledger-238bd7f8a5131e9bc51a649553fd2fafaf6337c2.tar.bz2
fork-ledger-238bd7f8a5131e9bc51a649553fd2fafaf6337c2.zip
Marked all strings needing internationalization
These strings are now collected automagically in the file po/ledger.pot. If you'd like to produce a translation, just run this command after building Ledger: msginit -l LOCALE -o LANG.po -i po/ledger.pot Where LOCALE is a string like de or en_GB, and LANG is a short descriptive word for your language. Then send me this .po file so I can commit it to the Ledger sources (alternatively, you could maintain the file in a fork on GitHub), and setup the build script to format and install your new message catalog during a "make install".
Diffstat (limited to 'src/global.cc')
-rw-r--r--src/global.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/global.cc b/src/global.cc
index c0c95b5e..c4b47b30 100644
--- a/src/global.cc
+++ b/src/global.cc
@@ -102,8 +102,8 @@ void global_scope_t::read_init()
if (session().read_journal(init_file) > 0 ||
session().journal->auto_xacts.size() > 0 ||
session().journal->period_xacts.size() > 0) {
- throw_(parse_error, "Transactions found in initialization file '"
- << init_file << "'");
+ throw_(parse_error, _("Transactions found in initialization file '%1'")
+ << init_file);
}
TRACE_FINISH(init, 1);
@@ -132,7 +132,7 @@ void global_scope_t::report_error(const std::exception& err)
if (! context.empty())
std::cerr << context << std::endl;
- std::cerr << "Error: " << err.what() << std::endl;
+ std::cerr << _("Error: ") << err.what() << std::endl;
} else {
caught_signal = NONE_CAUGHT;
}
@@ -173,7 +173,7 @@ void global_scope_t::execute_command(strings_list args, bool at_repl)
if (bool(command = look_for_precommand(bound_scope, verb)))
is_precommand = true;
else if (! bool(command = look_for_command(bound_scope, verb)))
- throw_(std::logic_error, "Unrecognized command '" << verb << "'");
+ throw_(std::logic_error, _("Unrecognized command '%1'") << verb);
// If it is not a pre-command, then parse the user's ledger data at this
// time if not done alreday (i.e., if not at a REPL). Then patch up the
@@ -471,7 +471,7 @@ void global_scope_t::visit_man_page() const
{
int pid = fork();
if (pid < 0) {
- throw std::logic_error("Failed to fork child process");
+ throw std::logic_error(_("Failed to fork child process"));
}
else if (pid == 0) { // child
execlp("man", "man", "1", "ledger", (char *)0);
@@ -516,7 +516,7 @@ void handle_debug_options(int argc, char * argv[])
_trace_level = boost::lexical_cast<int>(argv[i + 1]);
}
catch (const boost::bad_lexical_cast& e) {
- throw std::logic_error("Argument to --trace must be an integer");
+ throw std::logic_error(_("Argument to --trace must be an integer"));
}
i++;
#endif