Re: Is it okay to not use %d in msgstr, even if %d in msgid?
- From: Danilo Segan <danilo gnome org>
- To: =?utf-8?b?w4VzbXVuZCBTa2rDpnZlbGE=?= =?utf-8?b?bmQ=?= <aasmunds ulrik uio no>
- Cc: GNOME i18n list <gnome-i18n gnome org>
- Subject: Re: Is it okay to not use %d in msgstr, even if %d in msgid?
- Date: Wed, 14 Jan 2004 10:10:37 +0100
Åsmund Skjæveland <aasmunds@ulrik.uio.no> writes:
>
> Do I have to use the '%d' in [0], or can i use a word for 'one' instead
> of the number 1?
>
I don't think it's neccessary — I did it in a couple of places, and
neither msgfmt, nor the compiler complained.
Though, you would have to watch for some cases, like when there are
more format specifiers, eg.
msgid_plural "Waiting for %d seconds [%s]"
If you simply drop "%d" here, whatever *printf command is used will
use the number of seconds as a pointer to string, which most likely
means a Segmentation fault (unless you're privileged enough to access
memory at 0x1, when %d is 1; i.e. you're a kernel :), and a bug which
developers would hate to debug (I guess).
So, be careful if you do it ;)
Cheers,
Danilo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]