summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33e92e4)
raw | patch | inline | side by side (parent: 33e92e4)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 22 Feb 2011 23:41:25 +0000 (23:41 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Mar 2011 07:52:52 +0000 (23:52 -0800) |
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: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/init-db.c | patch | blob | history | |
t/t0001-init.sh | patch | blob | history |
diff --git a/builtin/init-db.c b/builtin/init-db.c
index f7ddf5b32f294641fd223c358d2336f6af236c33..e0e5ce3b1985cd2aba66d8c00d134d5c7a5a62ef 100644 (file)
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
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] != '/' ? "/" : "");
}
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f6849932112f1bbea1dafad09150857a707b64e4..dd4c00d14b82b7289e27b4da816be263629699f1 100755 (executable)
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
fi
'
-test_expect_success 'reinit' '
+test_expect_success C_LOCALE_OUTPUT 'reinit' '
(
sane_unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG &&