i18n: commit: mark parseopt strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Aug 20, 2012 at 19:32 UTC
9c23f4c537fc81b03549a5e9b7a4c0332802ff8f
1 file changed
+39
-39
builtin/commit.c
+39
-39
@@ -30,7 +30,7 @@
30
#include "column.h"
31
32
static const char * const builtin_commit_usage[] = {
33
- "git commit [options] [--] <filepattern>...",
33
+ N_("git commit [options] [--] <filepattern>..."),
34
NULL
35
};
36
@@ -1188,7 +1188,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
1188
{ OPTION_STRING, 0, "ignore-submodules", &ignore_submodule_arg, "when",
1189
"ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)",
1190
PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
1191
- OPT_COLUMN(0, "column", &s.colopts, "list untracked files in columns"),
1191
+ OPT_COLUMN(0, "column", &s.colopts, N_("list untracked files in columns")),
1192
OPT_END(),
1193
};
1194
@@ -1369,53 +1369,53 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
1369
{
1370
static struct wt_status s;
1371
static struct option builtin_commit_options[] = {
1372
- OPT__QUIET(&quiet, "suppress summary after successful commit"),
1373
- OPT__VERBOSE(&verbose, "show diff in commit message template"),
1374
-
1375
- OPT_GROUP("Commit message options"),
1376
- OPT_FILENAME('F', "file", &logfile, "read message from file"),
1377
- OPT_STRING(0, "author", &force_author, "author", "override author for commit"),
1378
- OPT_STRING(0, "date", &force_date, "date", "override date for commit"),
1379
- OPT_CALLBACK('m', "message", &message, "message", "commit message", opt_parse_m),
1380
- OPT_STRING('c', "reedit-message", &edit_message, "commit", "reuse and edit message from specified commit"),
1381
- OPT_STRING('C', "reuse-message", &use_message, "commit", "reuse message from specified commit"),
1382
- OPT_STRING(0, "fixup", &fixup_message, "commit", "use autosquash formatted message to fixup specified commit"),
1383
- OPT_STRING(0, "squash", &squash_message, "commit", "use autosquash formatted message to squash specified commit"),
1384
- OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C/-c/--amend)"),
1385
- OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
1386
- OPT_FILENAME('t', "template", &template_file, "use specified template file"),
1387
- OPT_BOOL('e', "edit", &edit_flag, "force edit of commit"),
1388
- OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"),
1389
- OPT_BOOLEAN(0, "status", &include_status, "include status in commit message template"),
1390
- { OPTION_STRING, 'S', "gpg-sign", &sign_commit, "key id",
1391
- "GPG sign commit", PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
1372
+ OPT__QUIET(&quiet, N_("suppress summary after successful commit")),
1373
+ OPT__VERBOSE(&verbose, N_("show diff in commit message template")),
1374
+
1375
+ OPT_GROUP(N_("Commit message options")),
1376
+ OPT_FILENAME('F', "file", &logfile, N_("read message from file")),
1377
+ OPT_STRING(0, "author", &force_author, N_("author"), N_("override author for commit")),
1378
+ OPT_STRING(0, "date", &force_date, N_("date"), N_("override date for commit")),
1379
+ OPT_CALLBACK('m', "message", &message, N_("message"), N_("commit message"), opt_parse_m),
1380
+ OPT_STRING('c', "reedit-message", &edit_message, N_("commit"), N_("reuse and edit message from specified commit")),
1381
+ OPT_STRING('C', "reuse-message", &use_message, N_("commit"), N_("reuse message from specified commit")),
1382
+ OPT_STRING(0, "fixup", &fixup_message, N_("commit"), N_("use autosquash formatted message to fixup specified commit")),
1383
+ OPT_STRING(0, "squash", &squash_message, N_("commit"), N_("use autosquash formatted message to squash specified commit")),
1384
+ OPT_BOOLEAN(0, "reset-author", &renew_authorship, N_("the commit is authored by me now (used with -C/-c/--amend)")),
1385
+ OPT_BOOLEAN('s', "signoff", &signoff, N_("add Signed-off-by:")),
1386
+ OPT_FILENAME('t', "template", &template_file, N_("use specified template file")),
1387
+ OPT_BOOL('e', "edit", &edit_flag, N_("force edit of commit")),
1388
+ OPT_STRING(0, "cleanup", &cleanup_arg, N_("default"), N_("how to strip spaces and #comments from message")),
1389
+ OPT_BOOLEAN(0, "status", &include_status, N_("include status in commit message template")),
1390
+ { OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key id"),
1391
+ N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
1392
/* end commit message options */
1393
1394
- OPT_GROUP("Commit contents options"),
1395
- OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
1396
- OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"),
1397
- OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"),
1398
- OPT_BOOLEAN('p', "patch", &patch_interactive, "interactively add changes"),
1399
- OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
1400
- OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
1401
- OPT_BOOLEAN(0, "dry-run", &dry_run, "show what would be committed"),
1402
- OPT_SET_INT(0, "short", &status_format, "show status concisely",
1394
+ OPT_GROUP(N_("Commit contents options")),
1395
+ OPT_BOOLEAN('a', "all", &all, N_("commit all changed files")),
1396
+ OPT_BOOLEAN('i', "include", &also, N_("add specified files to index for commit")),
1397
+ OPT_BOOLEAN(0, "interactive", &interactive, N_("interactively add files")),
1398
+ OPT_BOOLEAN('p', "patch", &patch_interactive, N_("interactively add changes")),
1399
+ OPT_BOOLEAN('o', "only", &only, N_("commit only specified files")),
1400
+ OPT_BOOLEAN('n', "no-verify", &no_verify, N_("bypass pre-commit hook")),
1401
+ OPT_BOOLEAN(0, "dry-run", &dry_run, N_("show what would be committed")),
1402
+ OPT_SET_INT(0, "short", &status_format, N_("show status concisely"),
1403
STATUS_FORMAT_SHORT),
1404
- OPT_BOOLEAN(0, "branch", &s.show_branch, "show branch information"),
1404
+ OPT_BOOLEAN(0, "branch", &s.show_branch, N_("show branch information")),
1405
OPT_SET_INT(0, "porcelain", &status_format,
1406
- "machine-readable output", STATUS_FORMAT_PORCELAIN),
1406
+ N_("machine-readable output"), STATUS_FORMAT_PORCELAIN),
1407
OPT_BOOLEAN('z', "null", &s.null_termination,
1408
- "terminate entries with NUL"),
1409
- OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
1410
- OPT_BOOLEAN(0, "no-post-rewrite", &no_post_rewrite, "bypass post-rewrite hook"),
1411
- { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
1408
+ N_("terminate entries with NUL")),
1409
+ OPT_BOOLEAN(0, "amend", &amend, N_("amend previous commit")),
1410
+ OPT_BOOLEAN(0, "no-post-rewrite", &no_post_rewrite, N_("bypass post-rewrite hook")),
1411
+ { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, N_("mode"), N_("show untracked files, optional modes: all, normal, no. (Default: all)"), PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
1412
/* end commit contents options */
1413
1414
{ OPTION_BOOLEAN, 0, "allow-empty", &allow_empty, NULL,
1415
- "ok to record an empty change",
1415
+ N_("ok to record an empty change"),
1416
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
1417
{ OPTION_BOOLEAN, 0, "allow-empty-message", &allow_empty_message, NULL,
1418
- "ok to record a change with an empty message",
1418
+ N_("ok to record a change with an empty message"),
1419
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
1420
1421
OPT_END()