Collocate strings to simplify translation
PATCH 1/1 Collocate strings to simplify translation
The translation of 'Untracked' and 'Ignored' might depend on the following word. To help the translator, this patch collocates the term 'files'.
--- wt-status.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
wt-status.c +3 -3
@@ -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
Signature · 1 line
1.7.9.msysgit.0
Quoted 13 lines · Vincent van Ravesteijn
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 <[email protected]>--- wt-status.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)wt-status.c +0
-0
wt-status.c static void wt_status_print_other_header(struct wt_status *s, · line 188
Quoted 5 lines
wt-status.c +1
-1@@ -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.
wt-status.c void wt_status_print(struct wt_status *s) · line 771
Quoted 12 lines
wt-status.c +2
-2if (!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.
wt-status.c void wt_status_print(struct wt_status *s) · line 774
Quoted 3 lines
wt-status.c +0
-0}else if (s->commitable)status_printf_ln (s,GIT_COLOR_NORMAL ,_ ("Untracked files not listed%s" ), advice_status_hints
Zbyszek
Op 24-5-2012 10:32, Zbigniew Jędrzejewski-Szmek schreef:
Quoted 9 lines · Vincent van Ravesteijn
Quoted 8 lines
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<[email protected]>--- wt-status.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Quoted 11 lines
wt-status.c static void wt_status_print_other_header(struct wt_status *s, · line 188
Quoted 10 lines
wt-status.c +1
-1@@ -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
Am 5/24/2012 11:55, schrieb Vincent van Ravesteijn:
Quoted 6 lines
Op 24-5-2012 10:32, Zbigniew Jędrzejewski-Szmek schreef:
Quoted 4 lines · Vincent van Ravesteijn
wt-status.c static void wt_status_print_other_header(struct wt_status *s, · line 188
Quoted 2 lines
wt-status.c +1
-1-status_printf_ln (s, c,_ ("%s files:" ), what); +status_printf_ln (s, c,_ ("%s:" ), what);How can "%s:" be translated?
_()should be removed here.
Quoted 7 lines
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
Op 24-5-2012 14:20, Johannes Sixt schreef:
Quoted 18 lines
Am 5/24/2012 11:55, schrieb Vincent van Ravesteijn:
Quoted 4 lines
Op 24-5-2012 10:32, Zbigniew Jędrzejewski-Szmek schreef:
Quoted 3 lines · Vincent van Ravesteijn
Quoted 2 lines
wt-status.c +1
-1-status_printf_ln (s, c,_ ("%s files:" ), what); +status_printf_ln (s, c,_ ("%s:" ), what);Quoted 8 lines
Quoted 1 line
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:
(quoted diff) +1
-1- status_printf_ln(s, c, _("%s files:"), what); + status_printf_ln(s, c, "%s", what);
Quoted 1 line
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