mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
A few translation tweaks in gnucash and gnucash-cli
Contrary to glib's option parsing, boost's doesn't do further translations internally, so pass it pre-translated messages.
This commit is contained in:
parent
18adb5723c
commit
ad826e0f44
@ -96,19 +96,19 @@ Gnucash::GnucashCli::configure_program_options (void)
|
||||
bpo::options_description quotes_options(_("Price Quotes Retrieval Options"));
|
||||
quotes_options.add_options()
|
||||
("add-price-quotes", bpo::bool_switch(),
|
||||
N_("Add price quotes to given GnuCash datafile.\n"))
|
||||
_("Add price quotes to given GnuCash datafile."))
|
||||
("namespace", bpo::value<std::string>(),
|
||||
N_("Regular expression determining which namespace commodities will be retrieved"));
|
||||
_("Regular expression determining which namespace commodities will be retrieved"));
|
||||
m_opt_desc->add (quotes_options);
|
||||
|
||||
bpo::options_description report_options(_("Report Generation Options"));
|
||||
report_options.add_options()
|
||||
("run-report", bpo::value<std::string>(),
|
||||
N_("Runs a report\n"))
|
||||
_("Runs a report\n"))
|
||||
("export-type", bpo::value<std::string>(),
|
||||
N_("Specify export type\n"))
|
||||
_("Specify export type\n"))
|
||||
("output-file", bpo::value<std::string>(),
|
||||
N_("Output file for report\n"));
|
||||
_("Output file for report\n"));
|
||||
m_opt_desc->add (report_options);
|
||||
|
||||
}
|
||||
|
@ -561,7 +561,8 @@ Gnucash::CoreApp::CoreApp (const char* app_name)
|
||||
|
||||
// Now that gettext is properly initialized, set our help tagline.
|
||||
tagline = bl::translate("- GnuCash, accounting for personal and small business finance").str(gnc_get_locale());
|
||||
m_opt_desc = std::make_unique<bpo::options_description> ((bl::format (bl::gettext ("{1} [options]")) % m_app_name).str() + tagline);
|
||||
m_opt_desc = std::make_unique<bpo::options_description>
|
||||
((bl::format (bl::gettext ("{1} [options] [datafile]")) % m_app_name).str() + std::string(" ") + tagline);
|
||||
add_common_program_options();
|
||||
}
|
||||
|
||||
@ -636,21 +637,21 @@ Gnucash::CoreApp::add_common_program_options (void)
|
||||
bpo::options_description common_options(_("Common Options"));
|
||||
common_options.add_options()
|
||||
("help,h", bpo::bool_switch(),
|
||||
N_("Show this help message"))
|
||||
_("Show this help message"))
|
||||
("version,v", bpo::bool_switch(),
|
||||
N_("Show GnuCash version"))
|
||||
_("Show GnuCash version"))
|
||||
("debug", bpo::bool_switch(),
|
||||
N_("Enable debugging mode: provide deep detail in the logs.\nThis is equivalent to: --log \"=info\" --log \"qof=info\" --log \"gnc=info\""))
|
||||
_("Enable debugging mode: provide deep detail in the logs.\nThis is equivalent to: --log \"=info\" --log \"qof=info\" --log \"gnc=info\""))
|
||||
("extra", bpo::bool_switch(),
|
||||
N_("Enable extra/development/debugging features."))
|
||||
_("Enable extra/development/debugging features."))
|
||||
("log", bpo::value< std::vector<std::string> >(),
|
||||
N_("Log level overrides, of the form \"modulename={debug,info,warn,crit,error}\"\nExamples: \"--log qof=debug\" or \"--log gnc.backend.file.sx=info\"\nThis can be invoked multiple times."))
|
||||
_("Log level overrides, of the form \"modulename={debug,info,warn,crit,error}\"\nExamples: \"--log qof=debug\" or \"--log gnc.backend.file.sx=info\"\nThis can be invoked multiple times."))
|
||||
("logto", bpo::value<std::string>(),
|
||||
N_("File to log into; defaults to \"/tmp/gnucash.trace\"; can be \"stderr\" or \"stdout\"."))
|
||||
_("File to log into; defaults to \"/tmp/gnucash.trace\"; can be \"stderr\" or \"stdout\"."))
|
||||
("gsettings-prefix", bpo::value<std::string>(),
|
||||
N_("Set the prefix for gsettings schemas for gsettings queries. This can be useful to have a different settings tree while debugging."))
|
||||
_("Set the prefix for gsettings schemas for gsettings queries. This can be useful to have a different settings tree while debugging."))
|
||||
("input-file", bpo::value<std::string>(),
|
||||
N_("[datafile]"));
|
||||
_("[datafile]"));
|
||||
|
||||
m_pos_opt_desc.add("input-file", -1);
|
||||
|
||||
|
@ -333,12 +333,12 @@ Gnucash::Gnucash::configure_program_options (void)
|
||||
bpo::options_description depr_options(_("Deprecated Options"));
|
||||
depr_options.add_options()
|
||||
("add-price-quotes", bpo::bool_switch(),
|
||||
N_("Add price quotes to given GnuCash datafile.\n"
|
||||
_("Add price quotes to given GnuCash datafile.\n"
|
||||
"Note this option has been deprecated and will be removed in GnuCash 5.0.\n"
|
||||
"Please use \"gnucash-cli --add-price-quotes\" instead."))
|
||||
("namespace", bpo::value<std::string>(),
|
||||
N_("Regular expression determining which namespace commodities will be retrieved"
|
||||
"Note this option has been deprecated and will be removed in GnuCash 5.0.\n"
|
||||
_("Regular expression determining which namespace commodities will be retrieved.\n"
|
||||
"Note this option has been deprecated and will be removed in GnuCash 5.0.\n"
|
||||
"Please use \"gnucash-cli --add-price-quotes\" instead."));
|
||||
|
||||
m_opt_desc->add (app_options).add (depr_options);
|
||||
|
Loading…
Reference in New Issue
Block a user