From 238bd7f8a5131e9bc51a649553fd2fafaf6337c2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 25 Feb 2009 03:51:42 -0400 Subject: 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". --- src/session.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/session.cc') diff --git a/src/session.cc b/src/session.cc index 3c6b6ddb..22434f5a 100644 --- a/src/session.cc +++ b/src/session.cc @@ -94,7 +94,7 @@ std::size_t session_t::read_journal(const path& pathname, account_t * master) { if (! exists(pathname)) - throw_(std::logic_error, "Cannot read file" << pathname); + throw_(std::logic_error, _("Cannot read file '%1'") << pathname); ifstream stream(pathname); return read_journal(stream, pathname, master); @@ -114,7 +114,7 @@ std::size_t session_t::read_data(const string& master_account) if (HANDLED(price_db_)) { path price_db_path = resolve_path(HANDLER(price_db_).str()); if (exists(price_db_path) && read_journal(price_db_path) > 0) - throw_(parse_error, "Transactions not allowed in price history file"); + throw_(parse_error, _("Transactions not allowed in price history file")); } foreach (const path& pathname, HANDLER(file_).data_files) { @@ -141,7 +141,7 @@ std::size_t session_t::read_data(const string& master_account) xact_count += read_journal(filename, acct); } else { - throw_(parse_error, "Could not read journal file '" << filename << "'"); + throw_(parse_error, _("Could not read journal file '%1'") << filename); } } @@ -160,8 +160,8 @@ void session_t::read_journal_files() std::size_t count = read_data(master_account); if (count == 0) - throw_(parse_error, "Failed to locate any transactions; " - "did you specify a valid file with -f?"); + throw_(parse_error, + _("Failed to locate any transactions; did you specify a valid file with -f?")); INFO_FINISH(journal); -- cgit v1.2.3