Skip to content

Commit 7575c12

Browse files
committed
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
2 parents e6b8f80 + 599e7a0 commit 7575c12

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

archive.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,11 @@ static int parse_archive_args(int argc, const char **argv,
458458
argc = parse_options(argc, argv, NULL, opts, archive_usage, 0);
459459

460460
if (remote)
461-
die("Unexpected option --remote");
461+
die(_("Unexpected option --remote"));
462462
if (exec)
463-
die("Option --exec can only be used together with --remote");
463+
die(_("Option --exec can only be used together with --remote"));
464464
if (output)
465-
die("Unexpected option --output");
465+
die(_("Unexpected option --output"));
466466

467467
if (!base)
468468
base = "";
@@ -484,14 +484,14 @@ static int parse_archive_args(int argc, const char **argv,
484484
usage_with_options(archive_usage, opts);
485485
*ar = lookup_archiver(format);
486486
if (!*ar || (is_remote && !((*ar)->flags & ARCHIVER_REMOTE)))
487-
die("Unknown archive format '%s'", format);
487+
die(_("Unknown archive format '%s'"), format);
488488

489489
args->compression_level = Z_DEFAULT_COMPRESSION;
490490
if (compression_level != -1) {
491491
if ((*ar)->flags & ARCHIVER_WANT_COMPRESSION_LEVELS)
492492
args->compression_level = compression_level;
493493
else {
494-
die("Argument not supported for format '%s': -%d",
494+
die(_("Argument not supported for format '%s': -%d"),
495495
format, compression_level);
496496
}
497497
}

git-stash.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ save_stash () {
265265
create_stash "$stash_msg" $untracked
266266
store_stash -m "$stash_msg" -q $w_commit ||
267267
die "$(gettext "Cannot save the current status")"
268-
say Saved working directory and index state "$stash_msg"
268+
say "$(eval_gettext "Saved working directory and index state \$stash_msg")"
269269

270270
if test -z "$patch_mode"
271271
then
@@ -548,7 +548,7 @@ pop_stash() {
548548
drop_stash "$@"
549549
else
550550
status=$?
551-
say "The stash is kept in case you need it again."
551+
say "$(gettext "The stash is kept in case you need it again.")"
552552
exit $status
553553
fi
554554
}

setup.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,9 @@ static const char *setup_bare_git_dir(struct strbuf *cwd, int offset,
759759
static const char *setup_nongit(const char *cwd, int *nongit_ok)
760760
{
761761
if (!nongit_ok)
762-
die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT);
762+
die(_("Not a git repository (or any of the parent directories): %s"), DEFAULT_GIT_DIR_ENVIRONMENT);
763763
if (chdir(cwd))
764-
die_errno("Cannot come back to cwd");
764+
die_errno(_("Cannot come back to cwd"));
765765
*nongit_ok = 1;
766766
return NULL;
767767
}
@@ -842,7 +842,7 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
842842
*nongit_ok = 0;
843843

844844
if (strbuf_getcwd(&cwd))
845-
die_errno("Unable to read current working directory");
845+
die_errno(_("Unable to read current working directory"));
846846
offset = cwd.len;
847847

848848
/*
@@ -912,19 +912,19 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
912912
if (parent_device != current_device) {
913913
if (nongit_ok) {
914914
if (chdir(cwd.buf))
915-
die_errno("Cannot come back to cwd");
915+
die_errno(_("Cannot come back to cwd"));
916916
*nongit_ok = 1;
917917
return NULL;
918918
}
919919
strbuf_setlen(&cwd, offset);
920-
die("Not a git repository (or any parent up to mount point %s)\n"
921-
"Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).",
920+
die(_("Not a git repository (or any parent up to mount point %s)\n"
921+
"Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)."),
922922
cwd.buf);
923923
}
924924
}
925925
if (chdir("..")) {
926926
strbuf_setlen(&cwd, offset);
927-
die_errno("Cannot change to '%s/..'", cwd.buf);
927+
die_errno(_("Cannot change to '%s/..'"), cwd.buf);
928928
}
929929
offset = offset_parent;
930930
}
@@ -986,9 +986,9 @@ int git_config_perm(const char *var, const char *value)
986986
/* A filemode value was given: 0xxx */
987987

988988
if ((i & 0600) != 0600)
989-
die("Problem with core.sharedRepository filemode value "
989+
die(_("Problem with core.sharedRepository filemode value "
990990
"(0%.3o).\nThe owner of files must always have "
991-
"read and write permissions.", i);
991+
"read and write permissions."), i);
992992

993993
/*
994994
* Mask filemode value. Others can not get write permission.

0 commit comments

Comments
 (0)