public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org, Paul Eggert <eggert@cs.ucla.edu>,
	Benno Schulenberg <coordinator@translationproject.org>
Subject: Re: libc-2.25.90.pot
Date: Tue, 18 Jul 2017 19:02:00 -0000	[thread overview]
Message-ID: <c45da7e9-32f9-4b9c-740b-2a3a2d3e3fe0@linaro.org> (raw)
In-Reply-To: <f0feca6f-c7f4-6a48-c8dc-cbe6cd4dd7ca@translationproject.org>



On 18/07/2017 14:08, Benno Schulenberg wrote:
> 
>>> The GNU C Library is about to release version 2.26.
>>>
>>> * Complete snapshot of 2.16 release containing `po/libc.pot':
>>> ftp://alpha.gnu.org/gnu/glibc/glibc-2.25-737-g66cd050.tar.bz2
>>
>> I see these changes when compared to the previous POT file:
>>
>> -msgid "\"%s\", line %d: "
>> +msgid "\"%s\", line %"
>>
>> -msgid " (rule from \"%s\", line %d)"
>> +msgid " (rule from \"%s\", line %"
>>
>> Are you sure these changes are intentional?  If yes, then maybe
>> they could use a translator hint, to say what is coming after the
>> last "%"?  Also, since those strings are not marked as c-format,
>> a malicious translator might be able to crash the relevant program
>> by putting in %tralala or something instead of %s?
> 
> Ping?
> 
> Benno

I think these a limitation of xgettext used to generate the pot files.
Both are similar defined:

timezone/zic.c

# msgid "\"%s\", line %"
487           fprintf(stderr, _("\"%s\", line %"PRIdLINENO": "), filename, linenum);

# msgid " (rule from \"%s\", line %"
490                 fprintf(stderr, _(" (rule from \"%s\", line %"PRIdLINENO")")

And 'PRIdLINENO' is defined as 

50 typedef intmax_t lineno;
51 #define PRIdLINENO PRIdMAX

Which means we will get different string encodings depending of how
__PRI64_PREFIX is defined by the ABI.

Both changes came from '92bd70fb' (Update timezone code from tzcode 2017b.) and
from original tz project it seems to get from cc8aec6ecb1ecc (zic: some
integer-width fixups).  TZ commit log seems to indicate this is just a integer
cleanup without original from an actual bug or limitation.

Paul I think we can use default %d for ints for these two specific printf to
make translation work as intended. What do you think?

  reply	other threads:[~2017-07-18 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8b9b4e60-f580-e56a-26bc-adb7192ba779@sourceware.org>
     [not found] ` <6e7f7602-3536-2edb-0cf4-e66a948fdb71@translationproject.org>
2017-07-18 17:08   ` libc-2.25.90.pot Benno Schulenberg
2017-07-18 19:02     ` Adhemerval Zanella [this message]
2017-07-19  7:15       ` libc-2.25.90.pot Siddhesh Poyarekar
2017-07-19  7:33         ` libc-2.25.90.pot Benno Schulenberg
2017-07-19 13:28           ` libc-2.25.90.pot Adhemerval Zanella
2017-07-19 13:50             ` libc-2.25.90.pot Siddhesh Poyarekar
2017-07-20 11:17               ` libc-2.25.90.pot Siddhesh Poyarekar
2017-07-20 12:52                 ` libc-2.25.90.pot Adhemerval Zanella
2017-07-20 14:57                   ` libc-2.25.90.pot Siddhesh Poyarekar
2017-07-20 19:41                     ` libc-2.25.90.pot Paul Eggert
2017-07-25 10:23                       ` libc-2.25.90.pot Siddhesh Poyarekar
     [not found]   ` <0961b9b1-b6b9-c0c9-bfe3-929ce522d7a8@sourceware.org>
2017-07-19  7:10     ` libc-2.25.90.pot Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c45da7e9-32f9-4b9c-740b-2a3a2d3e3fe0@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=coordinator@translationproject.org \
    --cc=eggert@cs.ucla.edu \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).