#
# patch "ChangeLog"
# from [02cd30c09d6055d286253494f88bab6c71319332]
# to [7395128e00e24f276e8170c96b0bb9cb9b05f47d]
#
# patch "commands.cc"
# from [98677594640c4f9e40d52276d6374bb63414dfad]
# to [f49af71084614f5fbfc72b9d6ef1b9793e0d0b11]
#
# patch "monotone.cc"
# from [69c76898ed9e7ba5139a6409aa236615ca083ff2]
# to [5e9b9255786a729640bc5fedb9da7eec2282d968]
#
# patch "po/Makevars"
# from [ed2a11db54beabe567122b68eab8b1744fddcddf]
# to [30b1cd41511bac2cefc696f3b904764b193c8b8c]
#
========================================================================
--- ChangeLog 02cd30c09d6055d286253494f88bab6c71319332
+++ ChangeLog 7395128e00e24f276e8170c96b0bb9cb9b05f47d
@@ -1,5 +1,13 @@
2005-08-22 Nathaniel Smith
+ * monotone.cc (coptions, options): Use gettext_noop to mark usage
+ strings for i18n.
+ * commands.cc (commands): gettextify command descriptions
+ * po/Makevars (XGETTEXT_OPTIONS): Include the 2nd, 3rd, and 4th
+ arguments to CMD macro as translatedable strings.
+
+2005-08-22 Nathaniel Smith
+
* database.cc: Replace a bunch of F()'s by boost::format's,
because F is only for strings displayed to user.
========================================================================
--- commands.cc 98677594640c4f9e40d52276d6374bb63414dfad
+++ commands.cc f49af71084614f5fbfc72b9d6ef1b9793e0d0b11
@@ -21,6 +21,8 @@
#include
#include
+#include "gettext.h"
+
#include "commands.hh"
#include "constants.hh"
@@ -113,7 +115,8 @@
string const & p,
string const & d,
command_opts const & o)
- : name(n), cmdgroup(g), params(p), desc(d), options(o)
+ : name(n), cmdgroup(gettext(g)), params(gettext(p)), desc(gettext(d)),
+ options(o)
{ cmds[n] = this; }
virtual ~command() {}
virtual void exec(app_state & app, vector const & args) = 0;
========================================================================
--- monotone.cc 69c76898ed9e7ba5139a6409aa236615ca083ff2
+++ monotone.cc 5e9b9255786a729640bc5fedb9da7eec2282d968
@@ -47,25 +47,25 @@
struct poptOption coptions[] =
{
- {"branch", 'b', POPT_ARG_STRING, &argstr, OPT_BRANCH_NAME, "select branch cert for operation", NULL},
- {"revision", 'r', POPT_ARG_STRING, &argstr, OPT_REVISION, "select revision id for operation", NULL},
- {"message", 'm', POPT_ARG_STRING, &argstr, OPT_MESSAGE, "set commit changelog message", NULL},
- {"message-file", 0, POPT_ARG_STRING, &argstr, OPT_MSGFILE, "set filename containing commit changelog message", NULL},
- {"date", 0, POPT_ARG_STRING, &argstr, OPT_DATE, "override date/time for commit", NULL},
- {"author", 0, POPT_ARG_STRING, &argstr, OPT_AUTHOR, "override author for commit", NULL},
- {"depth", 0, POPT_ARG_LONG, &arglong, OPT_DEPTH, "limit the number of levels of directories to descend", NULL},
- {"last", 0, POPT_ARG_LONG, &arglong, OPT_LAST, "limit the log output to the given number of entries", NULL},
- {"pid-file", 0, POPT_ARG_STRING, &argstr, OPT_PIDFILE, "record process id of server", NULL},
- {"brief", 0, POPT_ARG_NONE, NULL, OPT_BRIEF, "print a brief version of the normal output", NULL},
- {"diffs", 0, POPT_ARG_NONE, NULL, OPT_DIFFS, "print diffs along with logs", NULL},
- {"no-merges", 0, POPT_ARG_NONE, NULL, OPT_NO_MERGES, "skip merges when printing logs", NULL},
- {"set-default", 0, POPT_ARG_NONE, NULL, OPT_SET_DEFAULT, "use the current arguments as the future default", NULL},
- {"exclude", 0, POPT_ARG_STRING, &argstr, OPT_EXCLUDE, "leave out branches matching a pattern", NULL},
- {"unified", 0, POPT_ARG_NONE, NULL, OPT_UNIFIED_DIFF, "Use unified diff format", NULL},
- {"context", 0, POPT_ARG_NONE, NULL, OPT_CONTEXT_DIFF, "Use context diff format", NULL},
- {"external", 0, POPT_ARG_NONE, NULL, OPT_EXTERNAL_DIFF, "Use external diff hook for generating diffs", NULL},
- {"diff-args", 0, POPT_ARG_STRING, &argstr, OPT_EXTERNAL_DIFF_ARGS, "Argument to pass external diff hook", NULL},
- {"lca", 0, POPT_ARG_NONE, NULL, OPT_LCA, "Use least common ancestor as ancestor for merge", NULL},
+ {"branch", 'b', POPT_ARG_STRING, &argstr, OPT_BRANCH_NAME, gettext_noop("select branch cert for operation"), NULL},
+ {"revision", 'r', POPT_ARG_STRING, &argstr, OPT_REVISION, gettext_noop("select revision id for operation"), NULL},
+ {"message", 'm', POPT_ARG_STRING, &argstr, OPT_MESSAGE, gettext_noop("set commit changelog message"), NULL},
+ {"message-file", 0, POPT_ARG_STRING, &argstr, OPT_MSGFILE, gettext_noop("set filename containing commit changelog message"), NULL},
+ {"date", 0, POPT_ARG_STRING, &argstr, OPT_DATE, gettext_noop("override date/time for commit"), NULL},
+ {"author", 0, POPT_ARG_STRING, &argstr, OPT_AUTHOR, gettext_noop("override author for commit"), NULL},
+ {"depth", 0, POPT_ARG_LONG, &arglong, OPT_DEPTH, gettext_noop("limit the number of levels of directories to descend"), NULL},
+ {"last", 0, POPT_ARG_LONG, &arglong, OPT_LAST, gettext_noop("limit the log output to the given number of entries"), NULL},
+ {"pid-file", 0, POPT_ARG_STRING, &argstr, OPT_PIDFILE, gettext_noop("record process id of server"), NULL},
+ {"brief", 0, POPT_ARG_NONE, NULL, OPT_BRIEF, gettext_noop("print a brief version of the normal output"), NULL},
+ {"diffs", 0, POPT_ARG_NONE, NULL, OPT_DIFFS, gettext_noop("print diffs along with logs"), NULL},
+ {"no-merges", 0, POPT_ARG_NONE, NULL, OPT_NO_MERGES, gettext_noop("skip merges when printing logs"), NULL},
+ {"set-default", 0, POPT_ARG_NONE, NULL, OPT_SET_DEFAULT, gettext_noop("use the current arguments as the future default"), NULL},
+ {"exclude", 0, POPT_ARG_STRING, &argstr, OPT_EXCLUDE, gettext_noop("leave out branches matching a pattern"), NULL},
+ {"unified", 0, POPT_ARG_NONE, NULL, OPT_UNIFIED_DIFF, gettext_noop("Use unified diff format"), NULL},
+ {"context", 0, POPT_ARG_NONE, NULL, OPT_CONTEXT_DIFF, gettext_noop("Use context diff format"), NULL},
+ {"external", 0, POPT_ARG_NONE, NULL, OPT_EXTERNAL_DIFF, gettext_noop("Use external diff hook for generating diffs"), NULL},
+ {"diff-args", 0, POPT_ARG_STRING, &argstr, OPT_EXTERNAL_DIFF_ARGS, gettext_noop("Argument to pass external diff hook"), NULL},
+ {"lca", 0, POPT_ARG_NONE, NULL, OPT_LCA, gettext_noop("Use least common ancestor as ancestor for merge"), NULL},
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
@@ -74,21 +74,21 @@
// Use the coptions table as well.
{ NULL, 0, POPT_ARG_INCLUDE_TABLE, coptions, 0, NULL, NULL },
- {"debug", 0, POPT_ARG_NONE, NULL, OPT_DEBUG, "print debug log to stderr while running", NULL},
- {"dump", 0, POPT_ARG_STRING, &argstr, OPT_DUMP, "file to dump debugging log to, on failure", NULL},
- {"quiet", 0, POPT_ARG_NONE, NULL, OPT_QUIET, "suppress log and progress messages", NULL},
- {"help", 0, POPT_ARG_NONE, NULL, OPT_HELP, "display help message", NULL},
- {"version", 0, POPT_ARG_NONE, NULL, OPT_VERSION, "print version number, then exit", NULL},
- {"full-version", 0, POPT_ARG_NONE, NULL, OPT_FULL_VERSION, "print detailed version number, then exit", NULL},
- {"xargs", '@', POPT_ARG_STRING, &argstr, OPT_ARGFILE, "insert command line arguments taken from the given file", NULL},
- {"ticker", 0, POPT_ARG_STRING, &argstr, OPT_TICKER, "set ticker style (count|dot|none) [count]", NULL},
- {"nostd", 0, POPT_ARG_NONE, NULL, OPT_NOSTD, "do not load standard lua hooks", NULL},
- {"norc", 0, POPT_ARG_NONE, NULL, OPT_NORC, "do not load ~/.monotone/monotonerc or MT/monotonerc lua files", NULL},
- {"rcfile", 0, POPT_ARG_STRING, &argstr, OPT_RCFILE, "load extra rc file", NULL},
- {"key", 'k', POPT_ARG_STRING, &argstr, OPT_KEY_NAME, "set key for signatures", NULL},
- {"db", 'd', POPT_ARG_STRING, &argstr, OPT_DB_NAME, "set name of database", NULL},
- {"root", 0, POPT_ARG_STRING, &argstr, OPT_ROOT, "limit search for working copy to specified root", NULL},
- {"verbose", 0, POPT_ARG_NONE, NULL, OPT_VERBOSE, "verbose completion output", NULL},
+ {"debug", 0, POPT_ARG_NONE, NULL, OPT_DEBUG, gettext_noop("print debug log to stderr while running"), NULL},
+ {"dump", 0, POPT_ARG_STRING, &argstr, OPT_DUMP, gettext_noop("file to dump debugging log to, on failure"), NULL},
+ {"quiet", 0, POPT_ARG_NONE, NULL, OPT_QUIET, gettext_noop("suppress log and progress messages"), NULL},
+ {"help", 0, POPT_ARG_NONE, NULL, OPT_HELP, gettext_noop("display help message"), NULL},
+ {"version", 0, POPT_ARG_NONE, NULL, OPT_VERSION, gettext_noop("print version number, then exit"), NULL},
+ {"full-version", 0, POPT_ARG_NONE, NULL, OPT_FULL_VERSION, gettext_noop("print detailed version number, then exit"), NULL},
+ {"xargs", '@', POPT_ARG_STRING, &argstr, OPT_ARGFILE, gettext_noop("insert command line arguments taken from the given file"), NULL},
+ {"ticker", 0, POPT_ARG_STRING, &argstr, OPT_TICKER, gettext_noop("set ticker style (count|dot|none) [count]"), NULL},
+ {"nostd", 0, POPT_ARG_NONE, NULL, OPT_NOSTD, gettext_noop("do not load standard lua hooks"), NULL},
+ {"norc", 0, POPT_ARG_NONE, NULL, OPT_NORC, gettext_noop("do not load ~/.monotone/monotonerc or MT/monotonerc lua files"), NULL},
+ {"rcfile", 0, POPT_ARG_STRING, &argstr, OPT_RCFILE, gettext_noop("load extra rc file"), NULL},
+ {"key", 'k', POPT_ARG_STRING, &argstr, OPT_KEY_NAME, gettext_noop("set key for signatures"), NULL},
+ {"db", 'd', POPT_ARG_STRING, &argstr, OPT_DB_NAME, gettext_noop("set name of database"), NULL},
+ {"root", 0, POPT_ARG_STRING, &argstr, OPT_ROOT, gettext_noop("limit search for working copy to specified root"), NULL},
+ {"verbose", 0, POPT_ARG_NONE, NULL, OPT_VERBOSE, gettext_noop("verbose completion output"), NULL},
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
========================================================================
--- po/Makevars ed2a11db54beabe567122b68eab8b1744fddcddf
+++ po/Makevars 30b1cd41511bac2cefc696f3b904764b193c8b8c
@@ -8,7 +8,7 @@
top_builddir = ..
# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=F --keyword=FP:1,2
+XGETTEXT_OPTIONS = --keyword=F --keyword=FP:1,2 --keyword=CMD:2 --keyword=CMD:3 --keyword=CMD:4
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding