Merge branch 'va/i18n'

* va/i18n:
  i18n: git-stash: mark messages for translation
  i18n: archive: mark errors for translation
  i18n: setup: mark error messages for translation
This commit is contained in:
Junio C Hamano 2016-08-12 09:47:38 -07:00
commit 7575c12321
3 changed files with 16 additions and 16 deletions

View File

@ -458,11 +458,11 @@ static int parse_archive_args(int argc, const char **argv,
argc = parse_options(argc, argv, NULL, opts, archive_usage, 0); argc = parse_options(argc, argv, NULL, opts, archive_usage, 0);
if (remote) if (remote)
die("Unexpected option --remote"); die(_("Unexpected option --remote"));
if (exec) if (exec)
die("Option --exec can only be used together with --remote"); die(_("Option --exec can only be used together with --remote"));
if (output) if (output)
die("Unexpected option --output"); die(_("Unexpected option --output"));
if (!base) if (!base)
base = ""; base = "";
@ -484,14 +484,14 @@ static int parse_archive_args(int argc, const char **argv,
usage_with_options(archive_usage, opts); usage_with_options(archive_usage, opts);
*ar = lookup_archiver(format); *ar = lookup_archiver(format);
if (!*ar || (is_remote && !((*ar)->flags & ARCHIVER_REMOTE))) if (!*ar || (is_remote && !((*ar)->flags & ARCHIVER_REMOTE)))
die("Unknown archive format '%s'", format); die(_("Unknown archive format '%s'"), format);
args->compression_level = Z_DEFAULT_COMPRESSION; args->compression_level = Z_DEFAULT_COMPRESSION;
if (compression_level != -1) { if (compression_level != -1) {
if ((*ar)->flags & ARCHIVER_WANT_COMPRESSION_LEVELS) if ((*ar)->flags & ARCHIVER_WANT_COMPRESSION_LEVELS)
args->compression_level = compression_level; args->compression_level = compression_level;
else { else {
die("Argument not supported for format '%s': -%d", die(_("Argument not supported for format '%s': -%d"),
format, compression_level); format, compression_level);
} }
} }

View File

@ -265,7 +265,7 @@ save_stash () {
create_stash "$stash_msg" $untracked create_stash "$stash_msg" $untracked
store_stash -m "$stash_msg" -q $w_commit || store_stash -m "$stash_msg" -q $w_commit ||
die "$(gettext "Cannot save the current status")" die "$(gettext "Cannot save the current status")"
say Saved working directory and index state "$stash_msg" say "$(eval_gettext "Saved working directory and index state \$stash_msg")"
if test -z "$patch_mode" if test -z "$patch_mode"
then then
@ -548,7 +548,7 @@ pop_stash() {
drop_stash "$@" drop_stash "$@"
else else
status=$? status=$?
say "The stash is kept in case you need it again." say "$(gettext "The stash is kept in case you need it again.")"
exit $status exit $status
fi fi
} }

18
setup.c
View File

@ -759,9 +759,9 @@ static const char *setup_bare_git_dir(struct strbuf *cwd, int offset,
static const char *setup_nongit(const char *cwd, int *nongit_ok) static const char *setup_nongit(const char *cwd, int *nongit_ok)
{ {
if (!nongit_ok) if (!nongit_ok)
die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT); die(_("Not a git repository (or any of the parent directories): %s"), DEFAULT_GIT_DIR_ENVIRONMENT);
if (chdir(cwd)) if (chdir(cwd))
die_errno("Cannot come back to cwd"); die_errno(_("Cannot come back to cwd"));
*nongit_ok = 1; *nongit_ok = 1;
return NULL; return NULL;
} }
@ -842,7 +842,7 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
*nongit_ok = 0; *nongit_ok = 0;
if (strbuf_getcwd(&cwd)) if (strbuf_getcwd(&cwd))
die_errno("Unable to read current working directory"); die_errno(_("Unable to read current working directory"));
offset = cwd.len; offset = cwd.len;
/* /*
@ -912,19 +912,19 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
if (parent_device != current_device) { if (parent_device != current_device) {
if (nongit_ok) { if (nongit_ok) {
if (chdir(cwd.buf)) if (chdir(cwd.buf))
die_errno("Cannot come back to cwd"); die_errno(_("Cannot come back to cwd"));
*nongit_ok = 1; *nongit_ok = 1;
return NULL; return NULL;
} }
strbuf_setlen(&cwd, offset); strbuf_setlen(&cwd, offset);
die("Not a git repository (or any parent up to mount point %s)\n" die(_("Not a git repository (or any parent up to mount point %s)\n"
"Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", "Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)."),
cwd.buf); cwd.buf);
} }
} }
if (chdir("..")) { if (chdir("..")) {
strbuf_setlen(&cwd, offset); strbuf_setlen(&cwd, offset);
die_errno("Cannot change to '%s/..'", cwd.buf); die_errno(_("Cannot change to '%s/..'"), cwd.buf);
} }
offset = offset_parent; offset = offset_parent;
} }
@ -986,9 +986,9 @@ int git_config_perm(const char *var, const char *value)
/* A filemode value was given: 0xxx */ /* A filemode value was given: 0xxx */
if ((i & 0600) != 0600) if ((i & 0600) != 0600)
die("Problem with core.sharedRepository filemode value " die(_("Problem with core.sharedRepository filemode value "
"(0%.3o).\nThe owner of files must always have " "(0%.3o).\nThe owner of files must always have "
"read and write permissions.", i); "read and write permissions."), i);
/* /*
* Mask filemode value. Others can not get write permission. * Mask filemode value. Others can not get write permission.