Re: [Tails-dev] Tails Clock v0.3 - Update

Borrar esta mensaxe

Responder a esta mensaxe
Autor: winterfairy
Data:  
Para: tails-dev
Asunto: Re: [Tails-dev] Tails Clock v0.3 - Update
Kevin wrote:
> Would changing the label to read: "Display AM/PM time?" be suitable?
>
> [...]
>
> Some locales don't have AM/PM at all, some default with seconds,
> others don't ...


LANG=sv (Swedish, as I tested) does not have AM/PM, only 24-hour time.
Apparently AM or PM is not written after the clock. E.g. instead of "10.34
AM", only "10.34" is displayed, even with 12-hour clock enabled. I think
having 12-hour clock disabled by default for Swedish would be preferable,
but I don't know if locale specific default settings is easy to do.

Kevin wrote:
> "Preferences" and "About" are using the stock GNOME items and so don't
> need to be translated within Tails Clock itself.


Actually they seems not to be for Gtk2, see "create_menu2" in
TailsClockApplet.py. Only the icon seems to be set as stock.

Either way, relying to stock items for translations is in my opinion bad
practice. What if the stock translation is missing? When the whole applet
cannot be translated! I think it would be better if you used only the
stock icons, and made the actual strings translatable. This is what I
usually do, and seems to be what the current GNOME clock do :)

Reason: Consistency.

("gnome-panel-2.30.2/applets/clock/GNOME_ClockApplet.xml" gives example of
how to make it translatable, I think.)

Kevin wrote:
> The root of the problem here is the locale-dependent strftime string.
> Typically these are in the form of "%a %b %e %H:%M:%S" or something
> along those lines.
>
> [...]
>
> Programmatically supporting this is impractical which led me to examine
> the source code for the official GNOME panel clock applet. Basically,
> they support the formats via translation strings.
>
> I will now head down the path of supporting the date/time formats via
> translation strings.


This sounds like a good solution to me.

> As a bonus, I'll follow the same design pattern as
> the GNOME clock applet and we can "borrow" the translation strings from
> them (both projects being GPL, I don't believe this should be an issue,
> please correct me if I'm wrong).


This should be fine, yes.

Kevin wrote:
> winterfairy wrote:
>> Is this clock applet supposed to be a standalone deb, like now, or is it
>> supposed to be merged into the tails repository with all other tiny
>> utilities we have? intrigeri?
>
> As far as I know, it's built for Tails but is a stand-alone project.
>
>> If standalone like now, we need to get Runa or someone to add a new
>> translation resource on Transifex for it. In this case, which repository
>> and which branch should we be tracking the pot file in?
>
> tails at git.tails.boum.org:kevin/clock.git
>
> The stable branch is "master".


If I get the clear sign from a "higher-up" Tails dev that this is the way
to do it, I volunteer to contact Runa and get it added. :)