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

9 messages from 2021-12-13 to 2021-12-22. Participants: Josh Steadmon, Junio C Hamano, Jiang Xin.
Thread: https://gitlist.dev/t/57076

## Josh Steadmon, 2021-12-13 19:56

Subject: [PATCH] l10n: README: call more attention to plural strings
Message-ID: <25107068cbbf8c9ce6886e66e25dff19e072583f.1639425295.git.steadmon@google.com>
URL: https://gitlist.dev/e/25107068cbbf8c9ce6886e66e25dff19e072583f.1639425295.git.steadmon%40google.com

```
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

base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
-- 
2.34.1.173.g76aa8bc2d0-goog


```

## Junio C Hamano, 2021-12-13 21:56

Subject: Re: [PATCH] l10n: README: call more attention to plural strings
Message-ID: <xmqqa6h4b24o.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqa6h4b24o.fsf%40gitster.g
In-Reply-To: <25107068cbbf8c9ce6886e66e25dff19e072583f.1639425295.git.steadmon@google.com>

```
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.

```

## Josh Steadmon, 2021-12-13 22:02

Subject: Re: [PATCH] l10n: README: call more attention to plural strings
Message-ID: <YbfC5/+Q7lPp0G2i@google.com>
URL: https://gitlist.dev/e/YbfC5%2F%2BQ7lPp0G2i%40google.com
In-Reply-To: <xmqqa6h4b24o.fsf@gitster.g>

```
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.

```

## Junio C Hamano, 2021-12-13 22:18

Subject: Re: [PATCH] l10n: README: call more attention to plural strings
Message-ID: <xmqqr1ag9mig.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqr1ag9mig.fsf%40gitster.g
In-Reply-To: <YbfC5/+Q7lPp0G2i@google.com>

```
Josh Steadmon <steadmon@google.com> writes:

> 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, 2021-12-16 01:10

Subject: Re: [PATCH] l10n: README: call more attention to plural strings
Message-ID: <CANYiYbF31o-sQYU-OjJk=pQR5RHM0k7jqmEhiKGLeO3Suu1khQ@mail.gmail.com>
URL: https://gitlist.dev/e/CANYiYbF31o-sQYU-OjJk%3DpQR5RHM0k7jqmEhiKGLeO3Suu1khQ%40mail.gmail.com
In-Reply-To: <YbfC5/+Q7lPp0G2i@google.com>

```
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?

> > >
> > >  - 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, 2021-12-21 19:00

Subject: [PATCH v2] l10n: README: call more attention to plural strings
Message-ID: <a9453065c2e89d79fc117363fe41fa10986e06d1.1640113138.git.steadmon@google.com>
URL: https://gitlist.dev/e/a9453065c2e89d79fc117363fe41fa10986e06d1.1640113138.git.steadmon%40google.com
In-Reply-To: <25107068cbbf8c9ce6886e66e25dff19e072583f.1639425295.git.steadmon@google.com>

```
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
-- 
2.34.1.307.g9b7440fafd-goog


```

## Josh Steadmon, 2021-12-21 19:01

Subject: Re: [PATCH] l10n: README: call more attention to plural strings
Message-ID: <YcIkdXcLgzUk3+Jc@google.com>
URL: https://gitlist.dev/e/YcIkdXcLgzUk3%2BJc%40google.com
In-Reply-To: <CANYiYbF31o-sQYU-OjJk=pQR5RHM0k7jqmEhiKGLeO3Suu1khQ@mail.gmail.com>

```
On 2021.12.16 09:10, Jiang Xin wrote:
> 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!

```

## Junio C Hamano, 2021-12-21 20:54

Subject: Re: [PATCH v2] l10n: README: call more attention to plural strings
Message-ID: <xmqq1r25ptjx.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq1r25ptjx.fsf%40gitster.g
In-Reply-To: <a9453065c2e89d79fc117363fe41fa10986e06d1.1640113138.git.steadmon@google.com>

```
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.

Thanks.

```

## Jiang Xin, 2021-12-22 01:46

Subject: Re: [PATCH v2] l10n: README: call more attention to plural strings
Message-ID: <CANYiYbFmVRBUgwqKBcOvOz6LRLE8gRUoFfJUjVR7_YeQjjT2ig@mail.gmail.com>
URL: https://gitlist.dev/e/CANYiYbFmVRBUgwqKBcOvOz6LRLE8gRUoFfJUjVR7_YeQjjT2ig%40mail.gmail.com
In-Reply-To: <xmqq1r25ptjx.fsf@gitster.g>

```
On Wed, Dec 22, 2021 at 4:55 AM Junio C Hamano <gitster@pobox.com> 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 | 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

```
