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/balance.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/balance.cc') diff --git a/src/balance.cc b/src/balance.cc index 39392aa3..1b343fb7 100644 --- a/src/balance.cc +++ b/src/balance.cc @@ -45,7 +45,7 @@ balance_t& balance_t::operator+=(const amount_t& amt) { if (amt.is_null()) throw_(balance_error, - "Cannot add an uninitialized amount to a balance"); + _("Cannot add an uninitialized amount to a balance")); if (amt.is_realzero()) return *this; @@ -70,7 +70,7 @@ balance_t& balance_t::operator-=(const amount_t& amt) { if (amt.is_null()) throw_(balance_error, - "Cannot subtract an uninitialized amount from a balance"); + _("Cannot subtract an uninitialized amount from a balance")); if (amt.is_realzero()) return *this; @@ -90,7 +90,7 @@ balance_t& balance_t::operator*=(const amount_t& amt) { if (amt.is_null()) throw_(balance_error, - "Cannot multiply a balance by an uninitialized amount"); + _("Cannot multiply a balance by an uninitialized amount")); if (is_realzero()) { ; @@ -112,12 +112,12 @@ balance_t& balance_t::operator*=(const amount_t& amt) amounts.begin()->second *= amt; else throw_(balance_error, - "Cannot multiply a balance with annotated commodities by a commoditized amount"); + _("Cannot multiply a balance with annotated commodities by a commoditized amount")); } else { assert(amounts.size() > 1); throw_(balance_error, - "Cannot multiply a multi-commodity balance by a commoditized amount"); + _("Cannot multiply a multi-commodity balance by a commoditized amount")); } return *this; } @@ -126,13 +126,13 @@ balance_t& balance_t::operator/=(const amount_t& amt) { if (amt.is_null()) throw_(balance_error, - "Cannot divide a balance by an uninitialized amount"); + _("Cannot divide a balance by an uninitialized amount")); if (is_realzero()) { ; } else if (amt.is_realzero()) { - throw_(balance_error, "Divide by zero"); + throw_(balance_error, _("Divide by zero")); } else if (! amt.commodity()) { // Dividing by an amount with no commodity causes all the @@ -148,12 +148,12 @@ balance_t& balance_t::operator/=(const amount_t& amt) amounts.begin()->second /= amt; else throw_(balance_error, - "Cannot divide a balance with annotated commodities by a commoditized amount"); + _("Cannot divide a balance with annotated commodities by a commoditized amount")); } else { assert(amounts.size() > 1); throw_(balance_error, - "Cannot divide a multi-commodity balance by a commoditized amount"); + _("Cannot divide a multi-commodity balance by a commoditized amount")); } return *this; } @@ -193,7 +193,7 @@ balance_t::commodity_amount(const optional& commodity) const return temp.commodity_amount(commodity); throw_(amount_error, - "Requested amount of a balance with multiple commodities: " << temp); + _("Requested amount of a balance with multiple commodities: %1") << temp); } #endif } -- cgit v1.2.3