From: Frederik Schwarzer <schwarzerf@gmail.com>
To: git@vger.kernel.org
Subject: i18n: Avoid sentence puzzles
Date: Mon, 30 Jan 2012 12:31:20 +0100 [thread overview]
Message-ID: <201201301231.21090.schwarzerf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]
Hi,
in order to enable translators to prepare proper translations,
sentence puzzles have to be avoided. While it makes perfect sense for
English, some languages may have to separate those words to sound or
even be correct.
The attached patch demonstrates a change to achive that. I did not
test it because its purpose is only to raise awareness and start a
discussion about this topic. After all the question is, how important
translations are for a tool like Git. I have started a German
translation but many things are really hard to translate.
1) Many words are used in a germanised way, so translating them
not only feels awkward in some cases but it also might confuse
users who are used to the original wording.
2) English is a language that can be used in a very compact way.
In German that can feel dumb or even rude. So texts can grow
up to twice or thrice their size. That can clutter the terminal
appearance quite a bit.
Given those problems many people avoid using command line tools in
their language and I see the usefulness of translations rather
limited.
So my question would be: Is it considered worth it to extend the code
for translators' and translations' sake? If so, I would be glad to
help with that.
Regards
[-- Attachment #2: 0001-Avoid-puzzle-sentences.patch --]
[-- Type: text/x-patch, Size: 2440 bytes --]
From 7b1475cbffe120fdae1b46a2974a7b94846702c4 Mon Sep 17 00:00:00 2001
From: Frederik Schwarzer <schwarzerf@gmail.com>
Date: Mon, 30 Jan 2012 12:02:46 +0100
Subject: [PATCH] Avoid puzzle sentences.
---
builtin/branch.c | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 7095718..a07ac54 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -154,18 +154,17 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
const char *fmt, *remote;
int i;
int ret = 0;
+ int is_remote = 0;
struct strbuf bname = STRBUF_INIT;
switch (kinds) {
case REF_REMOTE_BRANCH:
fmt = "refs/remotes/%s";
- /* TRANSLATORS: This is "remote " in "remote branch '%s' not found" */
- remote = _("remote ");
+ is_remote = 1;
force = 1;
break;
case REF_LOCAL_BRANCH:
fmt = "refs/heads/%s";
- remote = "";
break;
default:
die(_("cannot use -a with -d"));
@@ -189,8 +188,11 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
name = xstrdup(mkpath(fmt, bname.buf));
if (read_ref(name, sha1)) {
- error(_("%sbranch '%s' not found."),
- remote, bname.buf);
+ if (is_remote) {
+ error(_("remote branch '%s' not found."), bname.buf);
+ } else {
+ error(_("branch '%s' not found."), bname.buf);
+ }
ret = 1;
continue;
}
@@ -211,14 +213,21 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
}
if (delete_ref(name, sha1, 0)) {
- error(_("Error deleting %sbranch '%s'"), remote,
- bname.buf);
+ if (is_remote) {
+ error(_("Error deleting remote branch '%s'"), bname.buf);
+ } else {
+ error(_("Error deleting branch '%s'"), bname.buf);
+ }
ret = 1;
} else {
struct strbuf buf = STRBUF_INIT;
- printf(_("Deleted %sbranch %s (was %s).\n"), remote,
- bname.buf,
+ if (is_remote) {
+ printf(_("Deleted remote branch %s (was %s).\n"), bname.buf,
find_unique_abbrev(sha1, DEFAULT_ABBREV));
+ } else {
+ printf(_("Deleted branch %s (was %s).\n"), bname.buf,
+ find_unique_abbrev(sha1, DEFAULT_ABBREV));
+ }
strbuf_addf(&buf, "branch.%s", bname.buf);
if (git_config_rename_section(buf.buf, NULL) < 0)
warning(_("Update of config-file failed"));
--
1.7.8.3
next reply other threads:[~2012-01-30 11:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 11:31 Frederik Schwarzer [this message]
2012-01-30 11:46 ` i18n: Avoid sentence puzzles Nguyen Thai Ngoc Duy
2012-01-30 18:57 ` Junio C Hamano
2012-01-30 21:12 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201201301231.21090.schwarzerf@gmail.com \
--to=schwarzerf@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).