diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-25 03:51:42 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-25 03:51:42 -0400 |
commit | 238bd7f8a5131e9bc51a649553fd2fafaf6337c2 (patch) | |
tree | b8ba95c43cbf66ed98abab8cc0c1944aa03ea50f /src/option.cc | |
parent | f745767fa68ad26195eed50b8c10dbaccba63e1e (diff) | |
download | fork-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/option.cc')
-rw-r--r-- | src/option.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/option.cc b/src/option.cc index 9000030a..5966c582 100644 --- a/src/option.cc +++ b/src/option.cc @@ -86,11 +86,10 @@ namespace { } catch (const std::exception& err) { if (name[0] == '-') - add_error_context("While parsing option '" << name << "':"); + add_error_context(_("While parsing option '%1'") << name); else - add_error_context("While parsing environent variable '" - << name << "':"); + add_error_context(_("While parsing environent variable '%1'") << name); throw; } } @@ -131,8 +130,8 @@ void process_environment(const char ** envp, const string& tag, process_option(string(buf), scope, q + 1, value); } catch (const std::exception& err) { - add_error_context("While parsing environment variable option '" - << *p << "':"); + add_error_context(_("While parsing environment variable option '%1':") + << *p); throw; } } @@ -192,19 +191,19 @@ strings_list process_arguments(strings_list args, scope_t& scope) op_bool_tuple opt(find_option(scope, opt_name)); if (! opt.first) - throw_(option_error, "Illegal option --" << name); + throw_(option_error, _("Illegal option --%1") << name); if (opt.second && ! value && ++i != args.end() && value == NULL) { value = (*i).c_str(); DEBUG("option.args", " read option value from arg: " << value); if (value == NULL) - throw_(option_error, "Missing option argument for --" << name); + throw_(option_error, _("Missing option argument for --%1") << name); } process_option(opt.first->as_function(), scope, value, string("--") + name); } else if ((*i)[1] == '\0') { - throw_(option_error, "illegal option -"); + throw_(option_error, _("illegal option -%1") << (*i)[0]); } else { DEBUG("option.args", " single-char option"); @@ -215,7 +214,7 @@ strings_list process_arguments(strings_list args, scope_t& scope) for (char c = (*i)[x]; c != '\0'; x++, c = (*i)[x]) { op_bool_tuple opt(find_option(scope, c)); if (! opt.first) - throw_(option_error, "Illegal option -" << c); + throw_(option_error, _("Illegal option -%1") << c); option_queue.push_back(op_bool_char_tuple(opt.first, opt.second, c)); } @@ -227,7 +226,7 @@ strings_list process_arguments(strings_list args, scope_t& scope) DEBUG("option.args", " read option value from arg: " << value); if (value == NULL) throw_(option_error, - "Missing option argument for -" << o.ch); + _("Missing option argument for -%1") << o.ch); } process_option(o.op->as_function(), scope, value, string("-") + o.ch); } |