Review Request: Partial date formats for KLocale

Sebastian Kügler sebas at kde.org
Sat May 2 10:36:24 BST 2009


On Friday 01 May 2009 20:33:50 Albert Astals Cid wrote:
> Otherwise seems a very welcome addition

Very welcome indeed. I'd like to use if for displaying the date under the 
clock in Plasma. The space there is very constrained, so I need a bit tighter 
control what to actually display. Currently we're cheating there...

> > 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.)

This sounds like it would suffice for what I have in mind.
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090502/f6e3f8da/attachment.sig>


More information about the kde-core-devel mailing list