summaryrefslogtreecommitdiff
path: root/src/output.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/output.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/output.cc')
-rw-r--r--src/output.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/output.cc b/src/output.cc
index 7daae417..9c6b20ce 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -105,53 +105,56 @@ void gather_statistics::flush()
{
std::ostream& out(report.output_stream);
- out << "Time period: " << statistics.earliest_post << " to "
- << statistics.latest_post << std::endl << std::endl;
+ {
+ straccstream accum;
+ out << ACCUM(accum << "Time period: %1 to %2" << statistics.earliest_post
+ << statistics.latest_post) << std::endl << std::endl;
+ }
- out << " Files these postings came from:" << std::endl;
+ out << _(" Files these postings came from:") << std::endl;
foreach (const path& pathname, statistics.filenames)
if (! pathname.empty())
out << " " << pathname.string() << std::endl;
out << std::endl;
- out << " Unique payees: ";
+ out << _(" Unique payees: ");
out.width(8);
out << std::right << statistics.payees_referenced.size() << std::endl;
- out << " Unique accounts: ";
+ out << _(" Unique accounts: ");
out.width(8);
out << std::right << statistics.accounts_referenced.size() << std::endl;
- out << " Number of transactions: " ;
+ out << _(" Number of transactions: ") ;
out.width(8);
out << std::right << statistics.total_xacts << std::endl;
- out << " Number of postings: ";
+ out << _(" Number of postings: ");
out.width(8);
out << std::right << statistics.total_posts;
out << " (";
out.precision(2);
out << (double((statistics.latest_post - statistics.earliest_post).days()) /
- double(statistics.total_posts)) << " per day)" << std::endl;
+ double(statistics.total_posts)) << _(" per day)") << std::endl;
- out << " Days since last post: ";
+ out << _(" Days since last post: ");
out.width(8);
out << std::right << (CURRENT_DATE() - statistics.latest_post).days()
<< std::endl;
- out << " Posts in last 7 days: ";
+ out << _(" Posts in last 7 days: ");
out.width(8);
out << std::right << statistics.total_last_7_days << std::endl;
- out << " Posts in last 30 days: ";
+ out << _(" Posts in last 30 days: ");
out.width(8);
out << std::right << statistics.total_last_30_days << std::endl;
- out << " Posts seen this month: ";
+ out << _(" Posts seen this month: ");
out.width(8);
out << std::right << statistics.total_this_month << std::endl;
- out << " Uncleared postings: ";
+ out << _(" Uncleared postings: ");
out.width(8);
out << std::right << statistics.total_uncleared_posts << std::endl;