[kde-russian] Fwd: Review Request 119738: Port Fuzzy Clock to Plasma 5

Alexander Potashev aspotashev на gmail.com
Чт Авг 14 22:57:28 MSK 2014


Нам бы тоже в kdeplasma-addons/plasma_applet_fuzzy_clock.po не помешала
такая магия с использованием Transcript. Сейчас "half past %1" переведено
как "%1 тридцать", но хочется, чтобы вместо "пять тридцать" часы всё-таки
показывали "половина шестого".

Прошу прощения за письмо в HTML.

Alexander Potashev

---------- Forwarded message ----------
From: Lasse Liehu <lasse.liehu at gmail.com>
Date: 2014-08-14 22:33 GMT+04:00
Subject: Re: Review Request 119738: Port Fuzzy Clock to Plasma 5
To: Lasse Liehu <lasse.liehu at gmail.com>, Plasma <plasma-devel at kde.org>, Kai
Uwe Broulik <kde at privat.broulik.de>, David Edmundson <
david at davidedmundson.co.uk>, Marco Martin <notmart at gmail.com>

   This is an automatically generated e-mail. To reply, visit:

On elokuu 14th, 2014, 4:58 ip UTC, *David Edmundson* wrote:

revision 1)


            var timeString =

  we don't need the i18n here, we'd be trying to translate an already
translated string.

hourNames[Math.floor()] seems wrong, would that not give us

5 to 9

when it's 9:55?

 On elokuu 14th, 2014, 5:04 ip UTC, *Kai Uwe Broulik* wrote:

Ah, that is why :)

Hmm, the original implementation just casts to int, I think. Would a
Math.round fix that?

 On elokuu 14th, 2014, 5:07 ip UTC, *Kai Uwe Broulik* wrote:

But honestly I don't really get that fuzzy logic either. Will test.

 On elokuu 14th, 2014, 5:15 ip UTC, *Marco Martin* wrote:

Math.round seems more correct, yes

 On elokuu 14th, 2014, 6:14 ip UTC, *David Edmundson* wrote:

I don't think either works. Assume the time is 10:30

in English that's half past ten.

In German that's half to eleven.

Not sure how to solve that.

 On elokuu 14th, 2014, 6:23 ip UTC, *Kai Uwe Broulik* wrote:


That is the German translation file. And it does some "30 Minuten nach
%1|/|halb $[stunde+1 %1]" magic. How does that work?
eins|/|$[Eigenschaft stunde+1 zwei] $[Eigenschaft vollestunde ein] ?!
So I guess here lies the trick.

 This is scripting translations using Transcript,

A property stunde+1 is added to each hour message. For example "one"
is translated as "eins|/|$[Eigenschaft stunde+1 zwei] $[Eigenschaft
vollestunde ein]". Then translation of "half past %1" uses that
property by calling "$[stunde+1 %1]", which returns "zwei".

- Lasse

On elokuu 12th, 2014, 6:08 ip UTC, Kai Uwe Broulik wrote:
  Review request for Plasma.
By Kai Uwe Broulik.

*Updated elo 12, 2014, 6:08 ip*
 *Repository: * kdeplasma-addons

This ports the infamous Fuzzy Clock to Plasma 5.

The code is derived from digital clock with the fuzzy logic derived
from the original implementation.

I had to substitute %1 by $1 in the i18n strings (and replace them
back), otherwise I got "I18N_EXCESSIVE_ARGUMENTS" thingies appended to
my fuzzy string.

Missing is the ability to show the time zone (really needed here?),
and the "Percent of taskbar size" slider because that layouting logic
copied from digital clock is beyond me :)

Also missing is the "Configure time format" (why's there no "Configure
Date and Time" in digital clock?) because fuzzy clock doesn't really
adhere to the locale anyway and I didn't want to yet again duplicate
that ProcessRunner plugin which seems to have been copied all over the
place already.


I've been running it since yesterday evening and didn't notice unusual
behavior, except that due to the update interval of 30s it doesn't
update right away when session is resumed from Suspend (but I guess
this is a Plasma issue?).

Also it tends to cut off in a vertical panel due to its (sane) minimum
font size (smallest theme font) being larger than in the original
implementation where it used to get super tiny then.


   - applets/fuzzy-clock/fuzzyClockConfig.ui (15cc658)
   - applets/fuzzy-clock/package/contents/config/config.qml (PRE-CREATION)
   - applets/fuzzy-clock/package/contents/config/main.xml (PRE-CREATION)
   - applets/fuzzy-clock/package/contents/ui/FuzzyClock.qml (PRE-CREATION)
   - applets/fuzzy-clock/package/contents/ui/configAppearance.qml
   - applets/fuzzy-clock/package/contents/ui/main.qml (PRE-CREATION)
   - applets/fuzzy-clock/package/metadata.desktop (PRE-CREATION)
   - applets/fuzzy-clock/plasma-clock-fuzzy.desktop (5f6d30b)
   - applets/CMakeLists.txt (661ecb4)
   - applets/fuzzy-clock/CMakeLists.txt (1068150)
   - applets/fuzzy-clock/Messages.sh (c8c9f06)
   - applets/fuzzy-clock/fuzzyClock.h (9bf5c4e)
   - applets/fuzzy-clock/fuzzyClock.cpp (2cd189d)

View Diff <https://git.reviewboard.kde.org/r/119738/diff/>
File Attachments
In horizontal panel
On the Desktop
Configuration UI

Plasma-devel mailing list
Plasma-devel at kde.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kde.ru/pipermail/kde-russian/attachments/20140814/66abeff0/attachment-0001.html>

Подробная информация о списке рассылки kde-russian