提交 3e5dd7e9 编写于 作者: Æ Ævar Arnfjörð Bjarmason 提交者: Junio C Hamano

i18n: git-init "Initialized [...] repository" message

These messages could benefit from splitting up.  An earlier version of
this patch began like this:

    const char *reinit_shared   = _("Reinitialized existing shared Git repository in %s\n");
    const char *init_shared     = _("Initialized empty shared Git repository in %s\n");
    const char *reinit_noshared = _("Reinitialized existing Git repository in %s\n");
    const char *init_noshared   = _("Initialized empty Git repository in %s\n");

But in the first round of gettextization I'm aiming to keep code
changes to a minimum for ease of review.  So just add a comment
explaining to translators how the sprintf format gets used so they
can cope for now if the language's grammar allows.
Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 33e92e47
......@@ -354,9 +354,15 @@ int init_db(const char *template_dir, unsigned int flags)
if (!(flags & INIT_DB_QUIET)) {
const char *git_dir = get_git_dir();
int len = strlen(git_dir);
printf("%s%s Git repository in %s%s\n",
reinit ? "Reinitialized existing" : "Initialized empty",
shared_repository ? " shared" : "",
/*
* TRANSLATORS: The first '%s' is either "Reinitialized
* existing" or "Initialized empty", the second " shared" or
* "", and the last '%s%s' is the verbatim directory name.
*/
printf(_("%s%s Git repository in %s%s\n"),
reinit ? _("Reinitialized existing") : _("Initialized empty"),
shared_repository ? _(" shared") : "",
git_dir, len && git_dir[len-1] != '/' ? "/" : "");
}
......
......@@ -180,7 +180,7 @@ test_expect_success 'GIT_DIR & GIT_WORK_TREE (2)' '
fi
'
test_expect_success 'reinit' '
test_expect_success C_LOCALE_OUTPUT 'reinit' '
(
sane_unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册