Re: [PATCH] status merge: guarentee space between msg and path

2014-03-12 Thread Junio C Hamano
Duy Nguyen  writes:

> On Wed, Mar 12, 2014 at 3:26 AM, Junio C Hamano  wrote:
>> Sandy Carter  writes:
>>
>>> 3651e45c takes the colon out of the control of the translators.
>>
>> That is a separate bug we would need to address, then.  Duy Cc'ed.
>
> We went through this before
>
> http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/1109239/focus=239560
>
> If the colon needs language specific treatment then it should be part
> of the translatable strings.

OK.  So we should resurrect $gmane/239537 and adjust the codepath
that was touched by 3651e45c to move the colon into translatable
string?

What other places do we assume that colons are to immediately follow
whatever human-readable text used as a label/heading, I wonder...


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] status merge: guarentee space between msg and path

2014-03-11 Thread Duy Nguyen
On Wed, Mar 12, 2014 at 3:26 AM, Junio C Hamano  wrote:
> Sandy Carter  writes:
>
>> Le 2014-03-11 15:59, Junio C Hamano a écrit :
>>> Sandy Carter  writes:
>>>
 diff --git a/wt-status.c b/wt-status.c
 index a452407..69e0dfc 100644
 --- a/wt-status.c
 +++ b/wt-status.c
 @@ -264,7 +264,7 @@ static void wt_status_print_unmerged_data(struct 
 wt_status *s,
 case 6: how = _("both added:"); break;
 case 7: how = _("both modified:"); break;
 }
 -   status_printf_more(s, c, "%-20s%s\n", how, one);
 +   status_printf_more(s, c, "%-19s %s\n", how, one);
 strbuf_release(&onebuf);
   }
>>>
>>> Thanks; I have to wonder if we would want to do something similar to
>>> what 3651e45c (wt-status: take the alignment burden off translators,
>>> 2013-11-05) to the other parts of the output, though.
>>>
>>
>> I could, do this. It would be cleaner, but there's just the issue of
>> the colon (:) which requires a space before it in the french
>> language[1]. As you can see in po/fr.po, the french translators have
>> done a good job at including it [2].
>>
>> 3651e45c takes the colon out of the control of the translators.
>
> That is a separate bug we would need to address, then.  Duy Cc'ed.

We went through this before

http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/1109239/focus=239560

If the colon needs language specific treatment then it should be part
of the translatable strings.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] status merge: guarentee space between msg and path

2014-03-11 Thread Junio C Hamano
Sandy Carter  writes:

> Le 2014-03-11 15:59, Junio C Hamano a écrit :
>> Sandy Carter  writes:
>>
>>> diff --git a/wt-status.c b/wt-status.c
>>> index a452407..69e0dfc 100644
>>> --- a/wt-status.c
>>> +++ b/wt-status.c
>>> @@ -264,7 +264,7 @@ static void wt_status_print_unmerged_data(struct 
>>> wt_status *s,
>>> case 6: how = _("both added:"); break;
>>> case 7: how = _("both modified:"); break;
>>> }
>>> -   status_printf_more(s, c, "%-20s%s\n", how, one);
>>> +   status_printf_more(s, c, "%-19s %s\n", how, one);
>>> strbuf_release(&onebuf);
>>>   }
>>
>> Thanks; I have to wonder if we would want to do something similar to
>> what 3651e45c (wt-status: take the alignment burden off translators,
>> 2013-11-05) to the other parts of the output, though.
>>
>
> I could, do this. It would be cleaner, but there's just the issue of
> the colon (:) which requires a space before it in the french
> language[1]. As you can see in po/fr.po, the french translators have
> done a good job at including it [2].
>
> 3651e45c takes the colon out of the control of the translators.

That is a separate bug we would need to address, then.  Duy Cc'ed.

> +   if (status == DIFF_STATUS_COPIED || status == DIFF_STATUS_RENAMED)
> +   status_printf_more(s, c, "%s:%.*s%s -> %s",
> +  what, len, padding, one, two);
> +   else
> +   status_printf_more(s, c, "%s:%.*s%s",
> +  what, len, padding, one);
>
>
> [1] https://en.wikipedia.org/wiki/Colon_%28punctuation%29#Spacing
> [2] https://github.com/git/git/blob/master/po/fr.po#L585
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] status merge: guarentee space between msg and path

2014-03-11 Thread Sandy Carter

Le 2014-03-11 15:59, Junio C Hamano a écrit :

Sandy Carter  writes:


diff --git a/wt-status.c b/wt-status.c
index a452407..69e0dfc 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -264,7 +264,7 @@ static void wt_status_print_unmerged_data(struct wt_status 
*s,
case 6: how = _("both added:"); break;
case 7: how = _("both modified:"); break;
}
-   status_printf_more(s, c, "%-20s%s\n", how, one);
+   status_printf_more(s, c, "%-19s %s\n", how, one);
strbuf_release(&onebuf);
  }


Thanks; I have to wonder if we would want to do something similar to
what 3651e45c (wt-status: take the alignment burden off translators,
2013-11-05) to the other parts of the output, though.



I could, do this. It would be cleaner, but there's just the issue of the 
colon (:) which requires a space before it in the french language[1]. As 
you can see in po/fr.po, the french translators have done a good job at 
including it [2].


3651e45c takes the colon out of the control of the translators.

+   if (status == DIFF_STATUS_COPIED || status == DIFF_STATUS_RENAMED)
+   status_printf_more(s, c, "%s:%.*s%s -> %s",
+  what, len, padding, one, two);
+   else
+   status_printf_more(s, c, "%s:%.*s%s",
+  what, len, padding, one);


[1] https://en.wikipedia.org/wiki/Colon_%28punctuation%29#Spacing
[2] https://github.com/git/git/blob/master/po/fr.po#L585
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] status merge: guarentee space between msg and path

2014-03-11 Thread Junio C Hamano
Sandy Carter  writes:

> diff --git a/wt-status.c b/wt-status.c
> index a452407..69e0dfc 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -264,7 +264,7 @@ static void wt_status_print_unmerged_data(struct 
> wt_status *s,
>   case 6: how = _("both added:"); break;
>   case 7: how = _("both modified:"); break;
>   }
> - status_printf_more(s, c, "%-20s%s\n", how, one);
> + status_printf_more(s, c, "%-19s %s\n", how, one);
>   strbuf_release(&onebuf);
>  }

Thanks; I have to wonder if we would want to do something similar to
what 3651e45c (wt-status: take the alignment burden off translators,
2013-11-05) to the other parts of the output, though.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] status merge: guarentee space between msg and path

2014-03-11 Thread Sandy Carter
Add space between how and one when printing status of unmerged data.
This fixes an appending of the how message when it is longer than 20.
This is the case in some translations such as the french one where
the colon gets appended to the file:

supprimé par nous :wt-status.c
modifié des deux côtés :wt-status.h

Additionally, having a space makes the file in question easier to select
in console to quickly address the problem. Without the space, the colon
(and, sometimes the last word) of the message is selected along with the
file.

The previous french example should now print as the following, which is
more proper:

supprimé par nous : wt-status.c
modifié des deux côtés : wt-status.h

Signed-off-by: Sandy Carter 
---
 wt-status.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wt-status.c b/wt-status.c
index a452407..69e0dfc 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -264,7 +264,7 @@ static void wt_status_print_unmerged_data(struct wt_status 
*s,
case 6: how = _("both added:"); break;
case 7: how = _("both modified:"); break;
}
-   status_printf_more(s, c, "%-20s%s\n", how, one);
+   status_printf_more(s, c, "%-19s %s\n", how, one);
strbuf_release(&onebuf);
 }
 
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html