Skip to content

Commit

Permalink
Merge branch 'ab/i18n-st'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed Apr 2, 2011
2 parents 84dd63e + ab8b53b commit 6c80cd2
Show file tree
Hide file tree
Showing 59 changed files with 1,009 additions and 875 deletions.
50 changes: 25 additions & 25 deletions builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static void update_callback(struct diff_queue_struct *q,
const char *path = p->one->path;
switch (p->status) {
default:
die("unexpected diff status %c", p->status);
die(_("unexpected diff status %c"), p->status);
case DIFF_STATUS_UNMERGED:
/*
* ADD_CACHE_IGNORE_REMOVAL is unset if "git
Expand All @@ -63,7 +63,7 @@ static void update_callback(struct diff_queue_struct *q,
case DIFF_STATUS_TYPE_CHANGED:
if (add_file_to_index(&the_index, path, data->flags)) {
if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
die("updating files failed");
die(_("updating files failed"));
data->add_errors++;
}
break;
Expand All @@ -73,7 +73,7 @@ static void update_callback(struct diff_queue_struct *q,
if (!(data->flags & ADD_CACHE_PRETEND))
remove_file_from_index(&the_index, path);
if (data->flags & (ADD_CACHE_PRETEND|ADD_CACHE_VERBOSE))
printf("remove '%s'\n", path);
printf(_("remove '%s'\n"), path);
break;
}
}
Expand Down Expand Up @@ -171,7 +171,7 @@ static void treat_gitlinks(const char **pathspec)
/* strip trailing slash */
pathspec[j] = xstrndup(ce->name, len);
else
die ("Path '%s' is in submodule '%.*s'",
die (_("Path '%s' is in submodule '%.*s'"),
pathspec[j], len, ce->name);
}
}
Expand All @@ -187,10 +187,10 @@ static void refresh(int verbose, const char **pathspec)
/* nothing */;
seen = xcalloc(specs, 1);
refresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET,
pathspec, seen, "Unstaged changes after refreshing the index:");
pathspec, seen, _("Unstaged changes after refreshing the index:"));
for (i = 0; i < specs; i++) {
if (!seen[i])
die("pathspec '%s' did not match any files", pathspec[i]);
die(_("pathspec '%s' did not match any files"), pathspec[i]);
}
free(seen);
}
Expand All @@ -204,7 +204,7 @@ static const char **validate_pathspec(int argc, const char **argv, const char *p
for (p = pathspec; *p; p++) {
if (has_symlink_leading_path(*p, strlen(*p))) {
int len = prefix ? strlen(prefix) : 0;
die("'%s' is beyond a symbolic link", *p + len);
die(_("'%s' is beyond a symbolic link"), *p + len);
}
}
}
Expand Down Expand Up @@ -271,7 +271,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */

if (read_cache() < 0)
die ("Could not read the index");
die (_("Could not read the index"));

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

launch_editor(file, NULL, NULL);

if (stat(file, &st))
die_errno("Could not stat '%s'", file);
die_errno(_("Could not stat '%s'"), file);
if (!st.st_size)
die("Empty patch. Aborted.");
die(_("Empty patch. Aborted."));

memset(&child, 0, sizeof(child));
child.git_cmd = 1;
child.argv = apply_argv;
if (run_command(&child))
die ("Could not apply '%s'", file);
die (_("Could not apply '%s'"), file);

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

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

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

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

for (i = 0; i < dir->nr; i++)
if (add_file_to_cache(dir->entries[i]->name, flags)) {
if (!ignore_add_errors)
die("adding files failed");
die(_("adding files failed"));
exit_status = 1;
}
return exit_status;
Expand Down Expand Up @@ -385,9 +385,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)
argv++;

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

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

if (read_cache() < 0)
die("index file corrupt");
die(_("index file corrupt"));
treat_gitlinks(pathspec);

if (add_new_files) {
Expand Down Expand Up @@ -450,7 +450,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
if (excluded(&dir, pathspec[i], &dtype))
dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
} else
die("pathspec '%s' did not match any files",
die(_("pathspec '%s' did not match any files"),
pathspec[i]);
}
}
Expand All @@ -466,7 +466,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
die("Unable to write new index file");
die(_("Unable to write new index file"));
}

return exit_status;
Expand Down
14 changes: 7 additions & 7 deletions builtin/archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ static void create_output_file(const char *output_file)
{
int output_fd = open(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666);
if (output_fd < 0)
die_errno("could not create archive file '%s'", output_file);
die_errno(_("could not create archive file '%s'"), output_file);
if (output_fd != 1) {
if (dup2(output_fd, 1) < 0)
die_errno("could not redirect output");
die_errno(_("could not redirect output"));
else
close(output_fd);
}
Expand All @@ -33,7 +33,7 @@ static int run_remote_archiver(int argc, const char **argv,

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

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

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

len = packet_read_line(fd[0], buf, sizeof(buf));
if (len)
die("git archive: expected a flush");
die(_("git archive: expected a flush"));

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

0 comments on commit 6c80cd2

Please sign in to comment.