Re: clock format



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.


> #. translators: reverse the order of these arguments
> #. *              if the time should come before the
> #. *              date on a clock in your locale.
> #.
> #: applets/gen_util/clock.c:200
> #, c-format
> msgid "%s, %s"
> msgstr ""
> 
> How are we supposed to 'reverse the order' of arguments? You mean
> changing the code directly?

No. Use the "%2$s, %1$s" notation to swap the order.


Christian





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