threads / patch / 57076

patchl10n: README: call more attention to plural strings

Subject: [PATCH] l10n: README: call more attention to plural strings

## tl;dr

9 messages between Dec 13, 2021 and Dec 22, 2021. Diffs are folded; open one to read it.

replies: 8people: 3as markdown or json

Josh Steadmon· Dec 13, 2021, 19:56 UTC · lore

In po/README.md, we point core developers to gettext's "Preparing Strings" documentation for advice on marking strings for translation. However, this doc doesn't really discuss the issues around plural form translation, which can make it seem that nothing special needs to be done in this case.

Add a specific callout here about marking plural-form strings so that the advice later on in the README is not overlooked.

Signed-off-by: Josh Steadmon <steadmon@google.com>
---
 po/README.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Show changes to po/README.md +4 −1
diff --git a/po/README.md b/po/README.md
index dcd8436c25..fd1e024dd3 100644
--- a/po/README.md
+++ b/po/README.md
@@ -219,7 +219,10 @@ General advice:
   they're part of Git's API.
 
 - Adjust the strings so that they're easy to translate. Most of the
-  advice in `info '(gettext)Preparing Strings'` applies here.
+  advice in `info '(gettext)Preparing Strings'` applies here. Strings
+  referencing numbers of items may need to be split into singular and
+  plural forms; see the Q\_() wrapper in the C sub-section below for an
+  example.
 
 - If something is unclear or ambiguous you can use a "TRANSLATORS"
   comment to tell the translators what to make of it. These will be

base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
-- 
2.34.1.173.g76aa8bc2d0-goog
Junio C Hamano· Dec 13, 2021, 21:56 UTC · re: Josh Steadmon · lore

Re: [PATCH] l10n: README: call more attention to plural strings

Josh Steadmon <steadmon@google.com> writes:
Show 30 quoted lines
> In po/README.md, we point core developers to gettext's "Preparing
> Strings" documentation for advice on marking strings for translation.
> However, this doc doesn't really discuss the issues around plural form
> translation, which can make it seem that nothing special needs to be
> done in this case.
>
> Add a specific callout here about marking plural-form strings so that
> the advice later on in the README is not overlooked.
>
> Signed-off-by: Josh Steadmon <steadmon@google.com>
> ---
>  po/README.md | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/po/README.md b/po/README.md
> index dcd8436c25..fd1e024dd3 100644
> --- a/po/README.md
> +++ b/po/README.md
> @@ -219,7 +219,10 @@ General advice:
>    they're part of Git's API.
>  
>  - Adjust the strings so that they're easy to translate. Most of the
> -  advice in `info '(gettext)Preparing Strings'` applies here.
> +  advice in `info '(gettext)Preparing Strings'` applies here. Strings
> +  referencing numbers of items may need to be split into singular and
> +  plural forms; see the Q\_() wrapper in the C sub-section below for an
> +  example.
>  
>  - If something is unclear or ambiguous you can use a "TRANSLATORS"
>    comment to tell the translators what to make of it. These will be

Sounds good to me, but I'd want an ack by those from the l10n department.

Thanks.
Josh Steadmon· Dec 13, 2021, 22:02 UTC · re: Junio C Hamano · lore

Re: [PATCH] l10n: README: call more attention to plural strings

On 2021.12.13 13:56, Junio C Hamano wrote:
Show 37 quoted lines
> Josh Steadmon <steadmon@google.com> writes:
> 
> > In po/README.md, we point core developers to gettext's "Preparing
> > Strings" documentation for advice on marking strings for translation.
> > However, this doc doesn't really discuss the issues around plural form
> > translation, which can make it seem that nothing special needs to be
> > done in this case.
> >
> > Add a specific callout here about marking plural-form strings so that
> > the advice later on in the README is not overlooked.
> >
> > Signed-off-by: Josh Steadmon <steadmon@google.com>
> > ---
> >  po/README.md | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/po/README.md b/po/README.md
> > index dcd8436c25..fd1e024dd3 100644
> > --- a/po/README.md
> > +++ b/po/README.md
> > @@ -219,7 +219,10 @@ General advice:
> >    they're part of Git's API.
> >  
> >  - Adjust the strings so that they're easy to translate. Most of the
> > -  advice in `info '(gettext)Preparing Strings'` applies here.
> > +  advice in `info '(gettext)Preparing Strings'` applies here. Strings
> > +  referencing numbers of items may need to be split into singular and
> > +  plural forms; see the Q\_() wrapper in the C sub-section below for an
> > +  example.
> >  
> >  - If something is unclear or ambiguous you can use a "TRANSLATORS"
> >    comment to tell the translators what to make of it. These will be
> 
> Sounds good to me, but I'd want an ack by those from the l10n
> department.
> 
> Thanks.

Hmm, I meant to CC both Jiang and Bagas, not sure why it didn't go through.

Junio C Hamano· Dec 13, 2021, 22:18 UTC · re: Josh Steadmon · lore

Re: [PATCH] l10n: README: call more attention to plural strings

Josh Steadmon <steadmon@google.com> writes:
Show 41 quoted lines
> On 2021.12.13 13:56, Junio C Hamano wrote:
>> Josh Steadmon <steadmon@google.com> writes:
>> 
>> > In po/README.md, we point core developers to gettext's "Preparing
>> > Strings" documentation for advice on marking strings for translation.
>> > However, this doc doesn't really discuss the issues around plural form
>> > translation, which can make it seem that nothing special needs to be
>> > done in this case.
>> >
>> > Add a specific callout here about marking plural-form strings so that
>> > the advice later on in the README is not overlooked.
>> >
>> > Signed-off-by: Josh Steadmon <steadmon@google.com>
>> > ---
>> >  po/README.md | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/po/README.md b/po/README.md
>> > index dcd8436c25..fd1e024dd3 100644
>> > --- a/po/README.md
>> > +++ b/po/README.md
>> > @@ -219,7 +219,10 @@ General advice:
>> >    they're part of Git's API.
>> >  
>> >  - Adjust the strings so that they're easy to translate. Most of the
>> > -  advice in `info '(gettext)Preparing Strings'` applies here.
>> > +  advice in `info '(gettext)Preparing Strings'` applies here. Strings
>> > +  referencing numbers of items may need to be split into singular and
>> > +  plural forms; see the Q\_() wrapper in the C sub-section below for an
>> > +  example.
>> >  
>> >  - If something is unclear or ambiguous you can use a "TRANSLATORS"
>> >    comment to tell the translators what to make of it. These will be
>> 
>> Sounds good to me, but I'd want an ack by those from the l10n
>> department.
>> 
>> Thanks.
>
> Hmm, I meant to CC both Jiang and Bagas, not sure why it didn't go
> through.
That's OK.  We watch each other's back ;-)
Jiang Xin· Dec 16, 2021, 01:10 UTC · re: Josh Steadmon · lore

Re: [PATCH] l10n: README: call more attention to plural strings

On Tue, Dec 14, 2021 at 6:02 AM Josh Steadmon <steadmon@google.com> wrote:
Show 31 quoted lines
>
> On 2021.12.13 13:56, Junio C Hamano wrote:
> > Josh Steadmon <steadmon@google.com> writes:
> >
> > > In po/README.md, we point core developers to gettext's "Preparing
> > > Strings" documentation for advice on marking strings for translation.
> > > However, this doc doesn't really discuss the issues around plural form
> > > translation, which can make it seem that nothing special needs to be
> > > done in this case.
> > >
> > > Add a specific callout here about marking plural-form strings so that
> > > the advice later on in the README is not overlooked.
> > >
> > > Signed-off-by: Josh Steadmon <steadmon@google.com>
> > > ---
> > >  po/README.md | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/po/README.md b/po/README.md
> > > index dcd8436c25..fd1e024dd3 100644
> > > --- a/po/README.md
> > > +++ b/po/README.md
> > > @@ -219,7 +219,10 @@ General advice:
> > >    they're part of Git's API.
> > >
> > >  - Adjust the strings so that they're easy to translate. Most of the
> > > -  advice in `info '(gettext)Preparing Strings'` applies here.
> > > +  advice in `info '(gettext)Preparing Strings'` applies here. Strings
> > > +  referencing numbers of items may need to be split into singular and
> > > +  plural forms; see the Q\_() wrapper in the C sub-section below for an
> > > +  example.

Wouldn't it be better if we add a new rule ("Strings ... an example.") after this one?

Show 11 quoted lines
> > >
> > >  - If something is unclear or ambiguous you can use a "TRANSLATORS"
> > >    comment to tell the translators what to make of it. These will be
> >
> > Sounds good to me, but I'd want an ack by those from the l10n
> > department.
> >
> > Thanks.
>
> Hmm, I meant to CC both Jiang and Bagas, not sure why it didn't go
> through.
Yesterday I was interrupted by a meeting while reading this thread.

-- Jiang Xin

Josh Steadmon· Dec 21, 2021, 19:01 UTC · re: Jiang Xin · lore

Re: [PATCH] l10n: README: call more attention to plural strings

On 2021.12.16 09:10, Jiang Xin wrote:
Show 35 quoted lines
> On Tue, Dec 14, 2021 at 6:02 AM Josh Steadmon <steadmon@google.com> wrote:
> >
> > On 2021.12.13 13:56, Junio C Hamano wrote:
> > > Josh Steadmon <steadmon@google.com> writes:
> > >
> > > > In po/README.md, we point core developers to gettext's "Preparing
> > > > Strings" documentation for advice on marking strings for translation.
> > > > However, this doc doesn't really discuss the issues around plural form
> > > > translation, which can make it seem that nothing special needs to be
> > > > done in this case.
> > > >
> > > > Add a specific callout here about marking plural-form strings so that
> > > > the advice later on in the README is not overlooked.
> > > >
> > > > Signed-off-by: Josh Steadmon <steadmon@google.com>
> > > > ---
> > > >  po/README.md | 5 ++++-
> > > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/po/README.md b/po/README.md
> > > > index dcd8436c25..fd1e024dd3 100644
> > > > --- a/po/README.md
> > > > +++ b/po/README.md
> > > > @@ -219,7 +219,10 @@ General advice:
> > > >    they're part of Git's API.
> > > >
> > > >  - Adjust the strings so that they're easy to translate. Most of the
> > > > -  advice in `info '(gettext)Preparing Strings'` applies here.
> > > > +  advice in `info '(gettext)Preparing Strings'` applies here. Strings
> > > > +  referencing numbers of items may need to be split into singular and
> > > > +  plural forms; see the Q\_() wrapper in the C sub-section below for an
> > > > +  example.
> 
> Wouldn't it be better if we add a new rule ("Strings ... an example.")
> after this one?
Fixed in V2, thanks!
Josh Steadmon· Dec 21, 2021, 19:00 UTC · re: Josh Steadmon · lore

[PATCH v2] l10n: README: call more attention to plural strings

In po/README.md, we point core developers to gettext's "Preparing Strings" documentation for advice on marking strings for translation. However, this doc doesn't really discuss the issues around plural form translation, which can make it seem that nothing special needs to be done in this case.

Add a specific callout here about marking plural-form strings so that the advice later on in the README is not overlooked.

Signed-off-by: Josh Steadmon <steadmon@google.com>
---
 po/README.md | 4 ++++
 1 file changed, 4 insertions(+)
Show changes to po/README.md +4 −0
diff --git a/po/README.md b/po/README.md
index dcd8436c25..19fabb4acf 100644
--- a/po/README.md
+++ b/po/README.md
@@ -221,6 +221,10 @@ General advice:
 - Adjust the strings so that they're easy to translate. Most of the
   advice in `info '(gettext)Preparing Strings'` applies here.
 
+- Strings referencing numbers of items may need to be split into singular and
+  plural forms; see the Q\_() wrapper in the C sub-section below for an
+  example.
+
 - If something is unclear or ambiguous you can use a "TRANSLATORS"
   comment to tell the translators what to make of it. These will be
   extracted by xgettext(1) and put in the "po/\*.po" files, e.g. from

base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
-- 
2.34.1.307.g9b7440fafd-goog
Junio C Hamano· Dec 21, 2021, 20:54 UTC · re: Josh Steadmon · lore

Re: [PATCH v2] l10n: README: call more attention to plural strings

Josh Steadmon <steadmon@google.com> writes:
Show 31 quoted lines
> In po/README.md, we point core developers to gettext's "Preparing
> Strings" documentation for advice on marking strings for translation.
> However, this doc doesn't really discuss the issues around plural form
> translation, which can make it seem that nothing special needs to be
> done in this case.
>
> Add a specific callout here about marking plural-form strings so that
> the advice later on in the README is not overlooked.
>
> Signed-off-by: Josh Steadmon <steadmon@google.com>
> ---
>  po/README.md | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/po/README.md b/po/README.md
> index dcd8436c25..19fabb4acf 100644
> --- a/po/README.md
> +++ b/po/README.md
> @@ -221,6 +221,10 @@ General advice:
>  - Adjust the strings so that they're easy to translate. Most of the
>    advice in `info '(gettext)Preparing Strings'` applies here.
>  
> +- Strings referencing numbers of items may need to be split into singular and
> +  plural forms; see the Q\_() wrapper in the C sub-section below for an
> +  example.
> +
>  - If something is unclear or ambiguous you can use a "TRANSLATORS"
>    comment to tell the translators what to make of it. These will be
>    extracted by xgettext(1) and put in the "po/\*.po" files, e.g. from
>
> base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
Looks sensible to me.

I do not mind taking this myself, instead of getting it via our i18n manager, if Jiang is OK with it.

Thanks.
Jiang Xin· Dec 22, 2021, 01:46 UTC · re: Junio C Hamano · lore

Re: [PATCH v2] l10n: README: call more attention to plural strings

On Wed, Dec 22, 2021 at 4:55 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 39 quoted lines
>
> Josh Steadmon <steadmon@google.com> writes:
>
> > In po/README.md, we point core developers to gettext's "Preparing
> > Strings" documentation for advice on marking strings for translation.
> > However, this doc doesn't really discuss the issues around plural form
> > translation, which can make it seem that nothing special needs to be
> > done in this case.
> >
> > Add a specific callout here about marking plural-form strings so that
> > the advice later on in the README is not overlooked.
> >
> > Signed-off-by: Josh Steadmon <steadmon@google.com>
> > ---
> >  po/README.md | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/po/README.md b/po/README.md
> > index dcd8436c25..19fabb4acf 100644
> > --- a/po/README.md
> > +++ b/po/README.md
> > @@ -221,6 +221,10 @@ General advice:
> >  - Adjust the strings so that they're easy to translate. Most of the
> >    advice in `info '(gettext)Preparing Strings'` applies here.
> >
> > +- Strings referencing numbers of items may need to be split into singular and
> > +  plural forms; see the Q\_() wrapper in the C sub-section below for an
> > +  example.
> > +
> >  - If something is unclear or ambiguous you can use a "TRANSLATORS"
> >    comment to tell the translators what to make of it. These will be
> >    extracted by xgettext(1) and put in the "po/\*.po" files, e.g. from
> >
> > base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
>
> Looks sensible to me.
>
> I do not mind taking this myself, instead of getting it via our i18n
> manager, if Jiang is OK with it.

Look good to me, and please help merge, otherwise the patch will have to wait about 1 month for the next l10n window.

-- Jiang Xin

← back to recent threads