summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/amount.cc')
-rw-r--r--src/amount.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 5e933215..803787e8 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -397,8 +397,8 @@ int amount_t::compare(const amount_t& amt) const
if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) {
throw_(amount_error,
- _("Cannot compare amounts with different commodities: '%1' and '%2'")
- << commodity() << amt.commodity());
+ _f("Cannot compare amounts with different commodities: '%1%' and '%2%'")
+ % commodity() % amt.commodity());
}
return mpq_cmp(MP(quantity), MP(amt.quantity));
@@ -432,8 +432,8 @@ amount_t& amount_t::operator+=(const amount_t& amt)
if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) {
throw_(amount_error,
- _("Adding amounts with different commodities: '%1' != '%2'")
- << commodity() << amt.commodity());
+ _f("Adding amounts with different commodities: '%1%' != '%2%'")
+ % commodity() % amt.commodity());
}
_dup();
@@ -462,8 +462,8 @@ amount_t& amount_t::operator-=(const amount_t& amt)
if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) {
throw_(amount_error,
- _("Subtracting amounts with different commodities: '%1' != '%2'")
- << commodity() << amt.commodity());
+ _f("Subtracting amounts with different commodities: '%1%' != '%2%'")
+ % commodity() % amt.commodity());
}
_dup();