Review Request 123278: Enable translation scripting for date groups

Alexander Potashev aspotashev at gmail.com
Tue Apr 7 14:42:57 BST 2015


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


The idea is good, the implementation can be better.

Cons #1: The JS (Transcript) code is supposed to tweak translations. The way how it is tweaked will be most likely different for each type of group (week day, recent week, month, ...), therefore the JS code is going to be unnecessarily complex with lots of if-else conditions to determine what type of group we need to tweak.

I suggest we have several i18nc(..., "%1") calls - one for each type of group.

Cons #2: The JS code is going to be unmaintainable because it has to be tied to the list of implemented group type and to the actual translations. For example: the group "One Hour Ago" is not currently implemented, but if it will be then translators will never know about that and the JS code will be outdated. If each group type had a separate i18n("%1"), translators would see another message in the .po file and care to translate it properly.

- Alexander Potashev


On Апрель 7, 2015, 10:39 д.п., Lasse Liehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123278/
> -----------------------------------------------------------
> 
> (Updated Апрель 7, 2015, 10:39 д.п.)
> 
> 
> Review request for Dolphin and Localization and Translation (l10n).
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> This allows to work around limitations in Qt's date formatting.
> 
> Examples:
> 
> * Uppercasing the first character in a string because it's a title: Weekday and month names returned by QDateTime::toString are usually lowercase.
> * Correcting the noun case of a month name from "of [month]" to "in [month]" in Finnish: "of [month]" is correct when talking about a specific day, but wrong when talking about a specific month.
> 
> 
> Diffs
> -----
> 
>   src/kitemviews/kfileitemmodel.cpp eac3ddf 
> 
> Diff: https://git.reviewboard.kde.org/r/123278/diff/
> 
> 
> Testing
> -------
> 
> Checked that grouping by date still worked.
> 
> 
> Thanks,
> 
> Lasse Liehu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20150407/e09b589c/attachment.htm>


More information about the kfm-devel mailing list