Re: clock format



On Thu, Jan 02, 2003 at 09:23:10PM +0100, Christian Rose wrote:
> tor 2003-01-02 klockan 19.41 skrev Gustavo Noronha Silva:
> > > I'm translating gnome-panel at the moment. There are some time / date
> > > format strings in there like these:
> > > 
> > > #: applets/gen_util/clock.c:171
> > > #, fuzzy
> > > msgid "%l:%M:%S %p"
> > > msgstr "%I:%M:%S %p"
> > 
> > I don't think you should change the %l to %k, as that is probably
> > configurable... removing the %p is probably undisered for the same
> > reason, I think.
> 
> It is configurable in this case, so the user can choose between the
> various clock formats that are present in this file. But on the same
> time, the values the specifiers represent are chosen with respect to the
> user's locale, and this also applies to the %p.
> In Sweden, 24-hour clock is always used in writing, and there is no
> equivalent to the "am"/"pm" notation. Hence, the "am" and "pm" strings
> that the %p gets replaced with in the "sv_SE" locale are empty. Thus,
> any clock format in the "sv" translations that uses %p or %P and %l or
> %I is pretty much unusable to the user anyway, since day and night times
> are undistinguishable with this format because of this. That's why we
> always translate all time format strings into using 24-hour clock values
> in the "sv" translations, and also in gnome-panel where the user can
> choose between the values. There's no point in keeping a broken choice,
> and the 12-hour clock is broken in this case in this locale because of
> this.
> 
> So I would check if the locale has "am"/"pm" values before deciding on
> whether to keep 12-hour notation in some of the clock formats. You can
> do this by running:
> 
>   locale am_pm
> 
> This shows the "AM"/"PM" strings in your currently set locale. If you
> want to check with another locale you can do this by specifying LC_TIME
> with the desired locale before thusly:
> 
>   LC_TIME=sv_SE locale am_pm
>   LC_TIME=en_US locale am_pm
> 
> etc.

For the same reason, that many locales do not have an AM/PM notation,
because they are 24 hours, I would recommend that the "msgid" be changed to
not use %I and %p. This would mean that gnome-panel is more likely not
to generate erroneous or misleading figures. msgid should rather be
"%H:%M:%S".

then the "en" versions should  be  msgstr "%l:%M:%S %p"

Kind regards
Keld



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]