Review Request 119738: Port Fuzzy Clock to Plasma 5

Lasse Liehu lasse.liehu at gmail.com
Thu Aug 14 18:33:17 UTC 2014



> On elo 14, 2014, 4:58 ip, David Edmundson wrote:
> > applets/fuzzy-clock/package/contents/ui/FuzzyClock.qml, line 118
> > <https://git.reviewboard.kde.org/r/119738/diff/1/?file=304020#file304020line118>
> >
> >     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?
> 
> Kai Uwe Broulik wrote:
>     Ah, that is why :) 
>     
>     Hmm, the original implementation just casts to int, I think. Would a Math.round fix that?
> 
> Kai Uwe Broulik wrote:
>     But honestly I don't really get that fuzzy logic either. Will test.
> 
> Marco Martin wrote:
>     Math.round seems more correct, yes
> 
> 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.
> 
> Kai Uwe Broulik wrote:
>     http://websvn.kde.org/*checkout*/branches/stable/l10n-kde4/de/messages/kdeplasma-addons/plasma_applet_fuzzy_clock.po
>     
>     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, https://techbase.kde.org/Localization/Concepts/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


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119738/#review64539
-----------------------------------------------------------


On elo 12, 2014, 6:08 ip, Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119738/
> -----------------------------------------------------------
> 
> (Updated elo 12, 2014, 6:08 ip)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: kdeplasma-addons
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   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 PRE-CREATION 
>   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 
> 
> Diff: https://git.reviewboard.kde.org/r/119738/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> File Attachments
> ----------------
> 
> In horizontal panel
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/08/12/35e0fea1-8a28-4ddb-9a81-9112bb85eab5__fuzzyinapanel.png
> On the Desktop
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/08/12/a246f3b3-bb12-4756-8069-594d25bd39f6__fuzzyonthedesktop.png
> Configuration UI
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/08/12/a144ea07-e18a-4a90-965a-3db51d91fb5d__fuzzyconfig.png
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140814/01758b82/attachment.html>


More information about the Plasma-devel mailing list