summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a616aec)
raw | patch | inline | side by side (parent: a616aec)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Thu, 2 Sep 2010 18:46:15 +0000 (18:46 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:12:09 +0000 (07:12 +0000) |
Make the messages in git-reset that use the reset_type_names static
array to be translatable by marking the array items with N_() and
using _() later.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
array to be translatable by marking the array items with N_() and
using _() later.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
builtin/reset.c | patch | blob | history |
diff --git a/builtin/reset.c b/builtin/reset.c
index 7bd350d76129eb120f6dcef53a64a19e3890cdc6..f6befc88477bf00c905c1196aca5243700e41c9a 100644 (file)
--- a/builtin/reset.c
+++ b/builtin/reset.c
enum reset_type { MIXED, SOFT, HARD, MERGE, KEEP, NONE };
static const char *reset_type_names[] = {
- "mixed", "soft", "hard", "merge", "keep", NULL
+ N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
};
static char *args_to_str(const char **argv)
static void die_if_unmerged_cache(int reset_type)
{
if (is_merge() || read_cache() < 0 || unmerged_cache())
- die("Cannot do a %s reset in the middle of a merge.",
- reset_type_names[reset_type]);
+ die(_("Cannot do a %s reset in the middle of a merge."),
+ _(reset_type_names[reset_type]));
}
if (reset_type == MIXED)
warning(_("--mixed with paths is deprecated; use 'git reset -- <paths>' instead."));
else if (reset_type != NONE)
- die("Cannot do %s reset with paths.",
- reset_type_names[reset_type]);
+ die(_("Cannot do %s reset with paths."),
+ _(reset_type_names[reset_type]));
return read_from_tree(prefix, argv + i, sha1,
quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
}
setup_work_tree();
if (reset_type == MIXED && is_bare_repository())
- die("%s reset is not allowed in a bare repository",
- reset_type_names[reset_type]);
+ die(_("%s reset is not allowed in a bare repository"),
+ _(reset_type_names[reset_type]));
/* Soft reset does not touch the index file nor the working tree
* at all, but requires them in a good order. Other resets reset