Skip to content

Commit 6c80cd2

Browse files
committed
Merge branch 'ab/i18n-st'
* ab/i18n-st: (69 commits) i18n: git-shortlog basic messages i18n: git-revert split up "could not revert/apply" message i18n: git-revert literal "me" messages i18n: git-revert "Your local changes" message i18n: git-revert basic messages i18n: git-notes GIT_NOTES_REWRITE_MODE error message i18n: git-notes basic commands i18n: git-gc "Auto packing the repository" message i18n: git-gc basic messages i18n: git-describe basic messages i18n: git-clean clean.requireForce messages i18n: git-clean basic messages i18n: git-bundle basic messages i18n: git-archive basic messages i18n: git-status "renamed: " message i18n: git-status "Initial commit" message i18n: git-status "Changes to be committed" message i18n: git-status shortstatus messages i18n: git-status "nothing to commit" messages i18n: git-status basic messages ... Conflicts: builtin/branch.c builtin/checkout.c builtin/clone.c builtin/commit.c builtin/grep.c builtin/merge.c builtin/push.c builtin/revert.c t/t3507-cherry-pick-conflict.sh t/t7607-merge-overwrite.sh
2 parents 84dd63e + ab8b53b commit 6c80cd2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1009
-875
lines changed

builtin/add.c

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void update_callback(struct diff_queue_struct *q,
3737
const char *path = p->one->path;
3838
switch (p->status) {
3939
default:
40-
die("unexpected diff status %c", p->status);
40+
die(_("unexpected diff status %c"), p->status);
4141
case DIFF_STATUS_UNMERGED:
4242
/*
4343
* ADD_CACHE_IGNORE_REMOVAL is unset if "git
@@ -63,7 +63,7 @@ static void update_callback(struct diff_queue_struct *q,
6363
case DIFF_STATUS_TYPE_CHANGED:
6464
if (add_file_to_index(&the_index, path, data->flags)) {
6565
if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
66-
die("updating files failed");
66+
die(_("updating files failed"));
6767
data->add_errors++;
6868
}
6969
break;
@@ -73,7 +73,7 @@ static void update_callback(struct diff_queue_struct *q,
7373
if (!(data->flags & ADD_CACHE_PRETEND))
7474
remove_file_from_index(&the_index, path);
7575
if (data->flags & (ADD_CACHE_PRETEND|ADD_CACHE_VERBOSE))
76-
printf("remove '%s'\n", path);
76+
printf(_("remove '%s'\n"), path);
7777
break;
7878
}
7979
}
@@ -171,7 +171,7 @@ static void treat_gitlinks(const char **pathspec)
171171
/* strip trailing slash */
172172
pathspec[j] = xstrndup(ce->name, len);
173173
else
174-
die ("Path '%s' is in submodule '%.*s'",
174+
die (_("Path '%s' is in submodule '%.*s'"),
175175
pathspec[j], len, ce->name);
176176
}
177177
}
@@ -187,10 +187,10 @@ static void refresh(int verbose, const char **pathspec)
187187
/* nothing */;
188188
seen = xcalloc(specs, 1);
189189
refresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET,
190-
pathspec, seen, "Unstaged changes after refreshing the index:");
190+
pathspec, seen, _("Unstaged changes after refreshing the index:"));
191191
for (i = 0; i < specs; i++) {
192192
if (!seen[i])
193-
die("pathspec '%s' did not match any files", pathspec[i]);
193+
die(_("pathspec '%s' did not match any files"), pathspec[i]);
194194
}
195195
free(seen);
196196
}
@@ -204,7 +204,7 @@ static const char **validate_pathspec(int argc, const char **argv, const char *p
204204
for (p = pathspec; *p; p++) {
205205
if (has_symlink_leading_path(*p, strlen(*p))) {
206206
int len = prefix ? strlen(prefix) : 0;
207-
die("'%s' is beyond a symbolic link", *p + len);
207+
die(_("'%s' is beyond a symbolic link"), *p + len);
208208
}
209209
}
210210
}
@@ -271,7 +271,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
271271
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
272272

273273
if (read_cache() < 0)
274-
die ("Could not read the index");
274+
die (_("Could not read the index"));
275275

276276
init_revisions(&rev, prefix);
277277
rev.diffopt.context = 7;
@@ -280,24 +280,24 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
280280
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
281281
out = open(file, O_CREAT | O_WRONLY, 0644);
282282
if (out < 0)
283-
die ("Could not open '%s' for writing.", file);
283+
die (_("Could not open '%s' for writing."), file);
284284
rev.diffopt.file = xfdopen(out, "w");
285285
rev.diffopt.close_file = 1;
286286
if (run_diff_files(&rev, 0))
287-
die ("Could not write patch");
287+
die (_("Could not write patch"));
288288

289289
launch_editor(file, NULL, NULL);
290290

291291
if (stat(file, &st))
292-
die_errno("Could not stat '%s'", file);
292+
die_errno(_("Could not stat '%s'"), file);
293293
if (!st.st_size)
294-
die("Empty patch. Aborted.");
294+
die(_("Empty patch. Aborted."));
295295

296296
memset(&child, 0, sizeof(child));
297297
child.git_cmd = 1;
298298
child.argv = apply_argv;
299299
if (run_command(&child))
300-
die ("Could not apply '%s'", file);
300+
die (_("Could not apply '%s'"), file);
301301

302302
unlink(file);
303303
return 0;
@@ -306,7 +306,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
306306
static struct lock_file lock_file;
307307

308308
static const char ignore_error[] =
309-
"The following paths are ignored by one of your .gitignore files:\n";
309+
N_("The following paths are ignored by one of your .gitignore files:\n");
310310

311311
static int verbose = 0, show_only = 0, ignored_too = 0, refresh_only = 0;
312312
static int ignore_add_errors, addremove, intent_to_add, ignore_missing = 0;
@@ -343,17 +343,17 @@ static int add_files(struct dir_struct *dir, int flags)
343343
int i, exit_status = 0;
344344

345345
if (dir->ignored_nr) {
346-
fprintf(stderr, ignore_error);
346+
fprintf(stderr, _(ignore_error));
347347
for (i = 0; i < dir->ignored_nr; i++)
348348
fprintf(stderr, "%s\n", dir->ignored[i]->name);
349-
fprintf(stderr, "Use -f if you really want to add them.\n");
350-
die("no files added");
349+
fprintf(stderr, _("Use -f if you really want to add them.\n"));
350+
die(_("no files added"));
351351
}
352352

353353
for (i = 0; i < dir->nr; i++)
354354
if (add_file_to_cache(dir->entries[i]->name, flags)) {
355355
if (!ignore_add_errors)
356-
die("adding files failed");
356+
die(_("adding files failed"));
357357
exit_status = 1;
358358
}
359359
return exit_status;
@@ -385,9 +385,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)
385385
argv++;
386386

387387
if (addremove && take_worktree_changes)
388-
die("-A and -u are mutually incompatible");
388+
die(_("-A and -u are mutually incompatible"));
389389
if (!show_only && ignore_missing)
390-
die("Option --ignore-missing can only be used together with --dry-run");
390+
die(_("Option --ignore-missing can only be used together with --dry-run"));
391391
if ((addremove || take_worktree_changes) && !argc) {
392392
static const char *here[2] = { ".", NULL };
393393
argc = 1;
@@ -407,14 +407,14 @@ int cmd_add(int argc, const char **argv, const char *prefix)
407407
? ADD_CACHE_IGNORE_REMOVAL : 0));
408408

409409
if (require_pathspec && argc == 0) {
410-
fprintf(stderr, "Nothing specified, nothing added.\n");
411-
fprintf(stderr, "Maybe you wanted to say 'git add .'?\n");
410+
fprintf(stderr, _("Nothing specified, nothing added.\n"));
411+
fprintf(stderr, _("Maybe you wanted to say 'git add .'?\n"));
412412
return 0;
413413
}
414414
pathspec = validate_pathspec(argc, argv, prefix);
415415

416416
if (read_cache() < 0)
417-
die("index file corrupt");
417+
die(_("index file corrupt"));
418418
treat_gitlinks(pathspec);
419419

420420
if (add_new_files) {
@@ -450,7 +450,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
450450
if (excluded(&dir, pathspec[i], &dtype))
451451
dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
452452
} else
453-
die("pathspec '%s' did not match any files",
453+
die(_("pathspec '%s' did not match any files"),
454454
pathspec[i]);
455455
}
456456
}
@@ -466,7 +466,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
466466
if (active_cache_changed) {
467467
if (write_cache(newfd, active_cache, active_nr) ||
468468
commit_locked_index(&lock_file))
469-
die("Unable to write new index file");
469+
die(_("Unable to write new index file"));
470470
}
471471

472472
return exit_status;

builtin/archive.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ static void create_output_file(const char *output_file)
1414
{
1515
int output_fd = open(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666);
1616
if (output_fd < 0)
17-
die_errno("could not create archive file '%s'", output_file);
17+
die_errno(_("could not create archive file '%s'"), output_file);
1818
if (output_fd != 1) {
1919
if (dup2(output_fd, 1) < 0)
20-
die_errno("could not redirect output");
20+
die_errno(_("could not redirect output"));
2121
else
2222
close(output_fd);
2323
}
@@ -33,7 +33,7 @@ static int run_remote_archiver(int argc, const char **argv,
3333

3434
_remote = remote_get(remote);
3535
if (!_remote->url[0])
36-
die("git archive: Remote with no URL");
36+
die(_("git archive: Remote with no URL"));
3737
transport = transport_get(_remote, _remote->url[0]);
3838
transport_connect(transport, "git-upload-archive", exec, fd);
3939

@@ -43,18 +43,18 @@ static int run_remote_archiver(int argc, const char **argv,
4343

4444
len = packet_read_line(fd[0], buf, sizeof(buf));
4545
if (!len)
46-
die("git archive: expected ACK/NAK, got EOF");
46+
die(_("git archive: expected ACK/NAK, got EOF"));
4747
if (buf[len-1] == '\n')
4848
buf[--len] = 0;
4949
if (strcmp(buf, "ACK")) {
5050
if (len > 5 && !prefixcmp(buf, "NACK "))
51-
die("git archive: NACK %s", buf + 5);
52-
die("git archive: protocol error");
51+
die(_("git archive: NACK %s"), buf + 5);
52+
die(_("git archive: protocol error"));
5353
}
5454

5555
len = packet_read_line(fd[0], buf, sizeof(buf));
5656
if (len)
57-
die("git archive: expected a flush");
57+
die(_("git archive: expected a flush"));
5858

5959
/* Now, start reading from fd[0] and spit it out to stdout */
6060
rv = recv_sideband("archive", fd[0], 1);

0 commit comments

Comments
 (0)