Review Request: Partial date formats for KLocale

Chusslove Illich caslav.ilic at gmx.net
Fri May 1 19:43:37 BST 2009



> On 2009-05-01 11:33:49, Albert Astals Cid wrote:
> > DayShort,               /**< Partial date: e.g. 08 @since 4.3 */
> > DayLong,                /**< Partial date: e.g. 08 @since 4.3 */
> > 
> > The comment is wrong, right?
> > 
> > Otherwise seems a very welcome addition

Not wrong, just forced inadequate example: judging by current short/long formats in English, there would be no difference between the two. Some other language may make short without the leading zero, and long with, dunno.


- Chusslove


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/648/#review1019
-----------------------------------------------------------


On 2009-05-01 09:25:45, Chusslove Illich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/648/
> -----------------------------------------------------------
> 
> (Updated 2009-05-01 09:25:45)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> KLocale provides default short and long full date formatting (e.g. "04/08/2007" and "Sunday 08 April 2007"), which are properly localized. However, at many places it is clunky to use full dates, and some shortening is preferred (e.g. just day and month, just month and year, etc.) In such situations, programmers resort to one of: hardcoding KLocale format strings, piecing up date strings from QDate reported day/month names, exposing any mix of these to translators, or not even that. This leads to headache whenever such a "partial" date is reported as improperly localizable by translators.
> 
> Therefore it would be good to extend possible KLocale date formats to partial dates too. Current patch is only proposal for the interface: adding enums for sane combinations (e.g. day+month and month+year, but not day+year), and for each a long, short, and numeric form (e.g. "December 2008", "Dec 2008", "12/2008") as applicable. (Translators would get to set one localized format pattern for each partial format, in kdelibs4.po.)
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdecore/localization/klocale.h 961864 
> 
> Diff: http://reviewboard.kde.org/r/648/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Chusslove
> 
>





More information about the kde-core-devel mailing list