Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-22 Thread Jean-Noël Avila
Le 22/07/2017 à 19:02, Kaartic Sivaraam a écrit :
> On Sat, 2017-07-15 at 21:30 +0200, Jean-Noël Avila wrote:
>>  * commit 4ddb1354e8 ("status: contextually notify user about an initial
>> commit") plays sentence lego while introducing colorization which again
>> does not play well with i18n.
>>
> What, if anything, should be done about this?
>

I only spotted it because the string is new for translation. But the
previous version was already playing sentence lego. So this is not a
regression ;-)


If I understand correctly, getting a i18n friendly string would require
being able to "color_sprintf" the branche name, and then "color_fprintf"
the output with a %s formatting string. None of this is already
available and that would introduce cumbersome logic in the code.


More generally, i18n puts some pressure on coding style for sure, and it
gets worse with multi-platform and coloring... how can we ease the
burden of developpers on this front without resorting to ad hoc patches?



Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-22 Thread Kaartic Sivaraam
On Sat, 2017-07-15 at 21:30 +0200, Jean-Noël Avila wrote:
>  * commit 4ddb1354e8 ("status: contextually notify user about an initial
> commit") plays sentence lego while introducing colorization which again
> does not play well with i18n.
> 
What, if anything, should be done about this?

-- 
Kaartic


Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-19 Thread Jiang Xin
2017-07-19 13:44 GMT+08:00 Jordi Mas :
> El 15/07/2017 a les 07:06, Jiang Xin ha escrit:
>>
>
> Hello Jiang,
>
> Sometimes I do several commits to complete the translation. However, github
> from the UI does not offer me the option to Merge and Squash.
>
> Can you check that you have "Allow squash merging" activated for the
> https://github.com/git-l10n/git-po repository?

Yes, it was activated. But I doubt the commit log of the squash merge
won't follow our standard.

For me, I prefer doing an interactive rebase and squashing all the
commits into one, and will record the contributors in header of the
file and in the commit log message.

>
> Allowing this from the Github UI will make life more easy.
>
> Thanks,
>
> Jordi,
> --
> Jordi Mas i Hernàndez -Bloc: http://gent.softcatala.org/jmas/bloc/
> Planet Softcatalà -> http://planeta.softcatala.org
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>



-- 
Jiang Xin


Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-18 Thread Jordi Mas

El 15/07/2017 a les 07:06, Jiang Xin ha escrit:

Hi,

Git v2.14.0-rc0 has been released, and it's time to start new round of git l10n.
This time there are 30+ updated messages need to be translated since last
update:

 l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)

 Generate po/git.pot from v2.14.0-rc0 for git v2.14.0 l10n round 1.

 Signed-off-by: Jiang Xin 

You can get it from the usual place:

 https://github.com/git-l10n/git-po/

As how to update your XX.po and help to translate Git, please see
"Updating a XX.po file" and other sections in “po/README" file.


Hello Jiang,

Sometimes I do several commits to complete the translation. However, 
github from the UI does not offer me the option to Merge and Squash.


Can you check that you have "Allow squash merging" activated for the 
https://github.com/git-l10n/git-po repository?


Allowing this from the Github UI will make life more easy.

Thanks,

Jordi,
--
Jordi Mas i Hernàndez -Bloc: http://gent.softcatala.org/jmas/bloc/
Planet Softcatalà -> http://planeta.softcatala.org

---
This email has been checked for viruses by AVG.
http://www.avg.com



Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-17 Thread Kaartic Sivaraam
Hello,

As a heads up (and because I have been pulled into this thread :)), I
wanted to bring to the notice of translators that the commit,

b884244c8 commit-template: remove outdated notice about explicit paths

*removes* a message ("Explicit paths specified without -i or -o;
assuming --only paths...") that's currently being translated.

-- 
Kaartic


Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-17 Thread Jiang Xin
2017-07-18 0:06 GMT+08:00 Johannes Schindelin :
> Hi,
>
> On Mon, 17 Jul 2017, Jiang Xin wrote:
>
>> 2017-07-16 3:30 GMT+08:00 Jean-Noël Avila :
>> >
>> >
>> > A few remarks on i18n:
>> >
>> >  * commit cb71f8bdb5 ("PRItime: introduce a new "printf format" for
>> > timestamps") does not play well with i18n framework. The static string
>> > concatenation cannot be correctly interpreted by msgmerge. I don't know
>> > how we can combine variable format indicators with translatable strings.
>> >
>>
>> We can add a new wrapper for raw timestamp like:
>>
>> +const char *format_raw_time(timestamp_t time)
>> +{
>> +   static struct strbuf time_buf = STRBUF_INIT;
>> +
>> +   strbuf_reset(_buf);
>> +   strbuf_addf(_buf, "%"PRItime, time);
>> +   return time_buf.buf;
>> +}
>>
>>
>> , and replace macro PRItime in i18n messages with format_raw_time
>> wrapper, like this:
>>
>> -   strbuf_addf(, Q_("%"PRItime" year",
>> "%"PRItime" years", years), years);
>> +   strbuf_addf(, Q_("%s year", "%s years",
>> years), format_raw_time(years));
>
> That would come at the price of complexifying the code just to accommodate
> a translation tool.
>
> How do you gentle people deal with PRIuMAX?

Can we just use PRIuMAX instead of the macro PRItime?  PRIuMAX can be
handled properly by gettext utilities, while PRItime not.

If replace PRItime to PRIuMAX like this:

-Q_("%"PRItime" second ago", "%"PRItime"
seconds ago", diff), diff);
+Q_("%"PRIuMAX" second ago", "%"PRIuMAX"
seconds ago", diff), diff);

The above l10n message can be extracted properly by running `make pot`:

#: date.c:122
#, c-format
msgid "% second ago"
msgid_plural "% seconds ago"
msgstr[0] ""
msgstr[1] ""

> Ciao,
> Dscho



-- 
Jiang Xin


Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-17 Thread Johannes Schindelin
Hi,

On Mon, 17 Jul 2017, Jiang Xin wrote:

> 2017-07-16 3:30 GMT+08:00 Jean-Noël Avila :
> >
> >
> > A few remarks on i18n:
> >
> >  * commit cb71f8bdb5 ("PRItime: introduce a new "printf format" for
> > timestamps") does not play well with i18n framework. The static string
> > concatenation cannot be correctly interpreted by msgmerge. I don't know
> > how we can combine variable format indicators with translatable strings.
> >
> 
> We can add a new wrapper for raw timestamp like:
> 
> +const char *format_raw_time(timestamp_t time)
> +{
> +   static struct strbuf time_buf = STRBUF_INIT;
> +
> +   strbuf_reset(_buf);
> +   strbuf_addf(_buf, "%"PRItime, time);
> +   return time_buf.buf;
> +}
> 
> 
> , and replace macro PRItime in i18n messages with format_raw_time
> wrapper, like this:
> 
> -   strbuf_addf(, Q_("%"PRItime" year",
> "%"PRItime" years", years), years);
> +   strbuf_addf(, Q_("%s year", "%s years",
> years), format_raw_time(years));

That would come at the price of complexifying the code just to accommodate
a translation tool.

How do you gentle people deal with PRIuMAX?

Ciao,
Dscho

Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-16 Thread Jiang Xin
2017-07-16 3:30 GMT+08:00 Jean-Noël Avila :
>
>
> A few remarks on i18n:
>
>  * commit cb71f8bdb5 ("PRItime: introduce a new "printf format" for
> timestamps") does not play well with i18n framework. The static string
> concatenation cannot be correctly interpreted by msgmerge. I don't know
> how we can combine variable format indicators with translatable strings.
>

We can add a new wrapper for raw timestamp like:

+const char *format_raw_time(timestamp_t time)
+{
+   static struct strbuf time_buf = STRBUF_INIT;
+
+   strbuf_reset(_buf);
+   strbuf_addf(_buf, "%"PRItime, time);
+   return time_buf.buf;
+}


, and replace macro PRItime in i18n messages with format_raw_time
wrapper, like this:

-   strbuf_addf(, Q_("%"PRItime" year",
"%"PRItime" years", years), years);
+   strbuf_addf(, Q_("%s year", "%s years",
years), format_raw_time(years));




-- 
Jiang Xin


Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-15 Thread Jean-Noël Avila
Le 15/07/2017 à 07:06, Jiang Xin a écrit :
> Hi,
>
> Git v2.14.0-rc0 has been released, and it's time to start new round of git 
> l10n.
> This time there are 30+ updated messages need to be translated since last
> update:
>
> l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)
>
> Generate po/git.pot from v2.14.0-rc0 for git v2.14.0 l10n round 1.
>
> Signed-off-by: Jiang Xin 
>
> You can get it from the usual place:
>
> https://github.com/git-l10n/git-po/
>
> As how to update your XX.po and help to translate Git, please see
> "Updating a XX.po file" and other sections in “po/README" file.
>
> --
> Jiang Xin
Hi all,


A few remarks on i18n:

 * commit cb71f8bdb5 ("PRItime: introduce a new "printf format" for
timestamps") does not play well with i18n framework. The static string
concatenation cannot be correctly interpreted by msgmerge. I don't know
how we can combine variable format indicators with translatable strings.

 * commit 4ddb1354e8 ("status: contextually notify user about an initial
commit") plays sentence lego while introducing colorization which again
does not play well with i18n.


Thank you.