Skip to content

Commit

Permalink
Merge branch 'nd/i18n'
Browse files Browse the repository at this point in the history
More _("i18n") markings.

* nd/i18n:
  fsck: mark strings for translation
  fsck: reduce word legos to help i18n
  parse-options.c: mark more strings for translation
  parse-options.c: turn some die() to BUG()
  parse-options: replace opterror() with optname()
  repack: mark more strings for translation
  remote.c: mark messages for translation
  remote.c: turn some error() or die() to BUG()
  reflog: mark strings for translation
  read-cache.c: add missing colon separators
  read-cache.c: mark more strings for translation
  read-cache.c: turn die("internal error") to BUG()
  attr.c: mark more string for translation
  archive.c: mark more strings for translation
  alias.c: mark split_cmdline_strerror() strings for translation
  git.c: mark more strings for translation
  • Loading branch information
gitster committed Jan 4, 2019
2 parents b21ebb6 + 674ba34 commit 3813a89
Show file tree
Hide file tree
Showing 23 changed files with 303 additions and 266 deletions.
4 changes: 2 additions & 2 deletions alias.c
Expand Up @@ -47,8 +47,8 @@ void list_aliases(struct string_list *list)
#define SPLIT_CMDLINE_BAD_ENDING 1
#define SPLIT_CMDLINE_UNCLOSED_QUOTE 2
static const char *split_cmdline_errors[] = {
"cmdline ends with \\",
"unclosed quote"
N_("cmdline ends with \\"),
N_("unclosed quote")
};

int split_cmdline(char *cmdline, const char ***argv)
Expand Down
8 changes: 4 additions & 4 deletions archive.c
Expand Up @@ -391,12 +391,12 @@ static void parse_treeish_arg(const char **argv,
int refnamelen = colon - name;

if (!dwim_ref(name, refnamelen, &oid, &ref))
die("no such ref: %.*s", refnamelen, name);
die(_("no such ref: %.*s"), refnamelen, name);
free(ref);
}

if (get_oid(name, &oid))
die("Not a valid object name");
die(_("not a valid object name: %s"), name);

commit = lookup_commit_reference_gently(ar_args->repo, &oid, 1);
if (commit) {
Expand All @@ -409,7 +409,7 @@ static void parse_treeish_arg(const char **argv,

tree = parse_tree_indirect(&oid);
if (tree == NULL)
die("not a tree object");
die(_("not a tree object: %s"), oid_to_hex(&oid));

if (prefix) {
struct object_id tree_oid;
Expand All @@ -419,7 +419,7 @@ static void parse_treeish_arg(const char **argv,
err = get_tree_entry(&tree->object.oid, prefix, &tree_oid,
&mode);
if (err || !S_ISDIR(mode))
die("current working directory is untracked");
die(_("current working directory is untracked"));

tree = parse_tree_indirect(&tree_oid);
}
Expand Down
4 changes: 2 additions & 2 deletions attr.c
Expand Up @@ -366,8 +366,8 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,
if (strlen(ATTRIBUTE_MACRO_PREFIX) < namelen &&
starts_with(name, ATTRIBUTE_MACRO_PREFIX)) {
if (!macro_ok) {
fprintf(stderr, "%s not allowed: %s:%d\n",
name, src, lineno);
fprintf_ln(stderr, _("%s not allowed: %s:%d"),
name, src, lineno);
goto fail_return;
}
is_macro = 1;
Expand Down

0 comments on commit 3813a89

Please sign in to comment.