# [PATCH] Collocate strings to simplify translation

5 messages from 2012-05-24 to 2012-05-24. Participants: Vincent van Ravesteijn, Zbigniew Jędrzejewski-Szmek, Johannes Sixt.
Thread: https://gitlist.dev/t/30607

## Vincent van Ravesteijn, 2012-05-24 07:41

Subject: [PATCH] Collocate strings to simplify translation
Message-ID: <1337845288-7656-1-git-send-email-vfr@lyx.org>
URL: https://gitlist.dev/e/1337845288-7656-1-git-send-email-vfr%40lyx.org

```
The translation of 'Untracked' and 'Ignored' might depend on the following
word. To help the translator, this patch collocates the term 'files'.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
 wt-status.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/wt-status.c b/wt-status.c
index dd6d8c4..9b65a8c 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -185,7 +185,7 @@ static void wt_status_print_other_header(struct wt_status *s,
 					 const char *how)
 {
 	const char *c = color(WT_STATUS_HEADER, s);
-	status_printf_ln(s, c, _("%s files:"), what);
+	status_printf_ln(s, c, _("%s:"), what);
 	if (!advice_status_hints)
 		return;
 	status_printf_ln(s, c, _("  (use \"git %s <file>...\" to include in what will be committed)"), how);
@@ -766,9 +766,9 @@ void wt_status_print(struct wt_status *s)
 		wt_status_print_submodule_summary(s, 1);  /* unstaged */
 	}
 	if (s->show_untracked_files) {
-		wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
+		wt_status_print_other(s, &s->untracked, _("Untracked files"), "add");
 		if (s->show_ignored_files)
-			wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
+			wt_status_print_other(s, &s->ignored, _("Ignored files"), "add -f");
 	} else if (s->commitable)
 		status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
 			advice_status_hints
-- 
1.7.9.msysgit.0

```

## Zbigniew Jędrzejewski-Szmek, 2012-05-24 08:32

Subject: Re: [PATCH] Collocate strings to simplify translation
Message-ID: <4FBDF21F.1010807@in.waw.pl>
URL: https://gitlist.dev/e/4FBDF21F.1010807%40in.waw.pl
In-Reply-To: <1337845288-7656-1-git-send-email-vfr@lyx.org>

```
On 05/24/2012 09:41 AM, Vincent van Ravesteijn wrote:
> The translation of 'Untracked' and 'Ignored' might depend on the following
> word. To help the translator, this patch collocates the term 'files'.
> 
> Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
> ---
>  wt-status.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/wt-status.c b/wt-status.c
> index dd6d8c4..9b65a8c 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -185,7 +185,7 @@ static void wt_status_print_other_header(struct wt_status *s,
>  					 const char *how)
>  {
>  	const char *c = color(WT_STATUS_HEADER, s);
> -	status_printf_ln(s, c, _("%s files:"), what);
> +	status_printf_ln(s, c, _("%s:"), what);
How can "%s:" be translated? _() should be removed here.

>  	if (!advice_status_hints)
>  		return;
>  	status_printf_ln(s, c, _("  (use \"git %s <file>...\" to include in what will be committed)"), how);
> @@ -766,9 +766,9 @@ void wt_status_print(struct wt_status *s)
>  		wt_status_print_submodule_summary(s, 1);  /* unstaged */
>  	}
>  	if (s->show_untracked_files) {
> -		wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
> +		wt_status_print_other(s, &s->untracked, _("Untracked files"), "add");
>  		if (s->show_ignored_files)
> -			wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
> +			wt_status_print_other(s, &s->ignored, _("Ignored files"), "add -f");
This part is looks sensible.

>  	} else if (s->commitable)
>  		status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
>  			advice_status_hints

Zbyszek

```

## Vincent van Ravesteijn, 2012-05-24 09:55

Subject: Re: [PATCH] Collocate strings to simplify translation
Message-ID: <4FBE0593.7070205@lyx.org>
URL: https://gitlist.dev/e/4FBE0593.7070205%40lyx.org
In-Reply-To: <4FBDF21F.1010807@in.waw.pl>

```
Op 24-5-2012 10:32, Zbigniew Jędrzejewski-Szmek schreef:
> On 05/24/2012 09:41 AM, Vincent van Ravesteijn wrote:
>> The translation of 'Untracked' and 'Ignored' might depend on the following
>> word. To help the translator, this patch collocates the term 'files'.
>>
>> Signed-off-by: Vincent van Ravesteijn<vfr@lyx.org>
>> ---
>>   wt-status.c |    6 +++---
>>   1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/wt-status.c b/wt-status.c
>> index dd6d8c4..9b65a8c 100644
>> --- a/wt-status.c
>> +++ b/wt-status.c
>> @@ -185,7 +185,7 @@ static void wt_status_print_other_header(struct wt_status *s,
>>   					 const char *how)
>>   {
>>   	const char *c = color(WT_STATUS_HEADER, s);
>> -	status_printf_ln(s, c, _("%s files:"), what);
>> +	status_printf_ln(s, c, _("%s:"), what);
> How can "%s:" be translated? _() should be removed here.

Some languages might use a character different from ':'. For example, 
Chinese uses a full-width character ':' (unicode 0xFF1A) instead of a 
half-width character. Maybe this is taken care of by the system/shell or 
whatever, maybe not. Other examples are languages that read from right 
to left. I guess it should then be translated by ":%s".

This will probably be a matter of convention.

Vincent

```

## Johannes Sixt, 2012-05-24 12:20

Subject: Re: [PATCH] Collocate strings to simplify translation
Message-ID: <4FBE2797.80505@viscovery.net>
URL: https://gitlist.dev/e/4FBE2797.80505%40viscovery.net
In-Reply-To: <4FBE0593.7070205@lyx.org>

```
Am 5/24/2012 11:55, schrieb Vincent van Ravesteijn:
> Op 24-5-2012 10:32, Zbigniew Jędrzejewski-Szmek schreef:
>> On 05/24/2012 09:41 AM, Vincent van Ravesteijn wrote:
>>> -    status_printf_ln(s, c, _("%s files:"), what);
>>> +    status_printf_ln(s, c, _("%s:"), what);
>> How can "%s:" be translated? _() should be removed here.
> 
> Some languages might use a character different from ':'. For example,
> Chinese uses a full-width character ':' (unicode 0xFF1A) instead of a
> half-width character. Maybe this is taken care of by the system/shell or
> whatever, maybe not. Other examples are languages that read from right to
> left. I guess it should then be translated by ":%s".
> 
> This will probably be a matter of convention.

Shouldn't you then move the colon with the "files"? That is, here we have:

-	status_printf_ln(s, c, _("%s files:"), what);
+	status_printf_ln(s, c, "%s", what);

and elsewhere we use _("Untracked files:") and _("Ignored files:").

-- Hannes

```

## Vincent van Ravesteijn, 2012-05-24 12:34

Subject: Re: [PATCH] Collocate strings to simplify translation
Message-ID: <4FBE2AB9.6010502@lyx.org>
URL: https://gitlist.dev/e/4FBE2AB9.6010502%40lyx.org
In-Reply-To: <4FBE2797.80505@viscovery.net>

```
Op 24-5-2012 14:20, Johannes Sixt schreef:
> Am 5/24/2012 11:55, schrieb Vincent van Ravesteijn:
>> Op 24-5-2012 10:32, Zbigniew Jędrzejewski-Szmek schreef:
>>> On 05/24/2012 09:41 AM, Vincent van Ravesteijn wrote:
>>>> -    status_printf_ln(s, c, _("%s files:"), what);
>>>> +    status_printf_ln(s, c, _("%s:"), what);
>>> How can "%s:" be translated? _() should be removed here.
>> Some languages might use a character different from ':'. For example,
>> Chinese uses a full-width character ':' (unicode 0xFF1A) instead of a
>> half-width character. Maybe this is taken care of by the system/shell or
>> whatever, maybe not. Other examples are languages that read from right to
>> left. I guess it should then be translated by ":%s".
>>
>> This will probably be a matter of convention.
> Shouldn't you then move the colon with the "files"? That is, here we have:
>
> -	status_printf_ln(s, c, _("%s files:"), what);
> +	status_printf_ln(s, c, "%s", what);
>
> and elsewhere we use _("Untracked files:") and _("Ignored files:").

I would avoid having too many 'decorations' in the strings themselves, 
because it is annoying to have to translate "Untracked files", 
"untracked files", "untracked files:", "  (untracked files)" etc.

Besides, the translation of "%s:" can be reused numerous times.

Just my opinion.

Vincent

```
