author | zecke <zecke> | 2004-02-20 00:50:32 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-20 00:50:32 (UTC) |
commit | 060b4fc7a3fd5c1b5f745167fe084f7486719b7e (patch) (side-by-side diff) | |
tree | 76f02084f4b088a04f09cb57977b35695860cb0d /library/timestring.cpp | |
parent | e54e1cb01c3da0655fc6e86bd9d169b002a63e66 (diff) | |
download | opie-060b4fc7a3fd5c1b5f745167fe084f7486719b7e.zip opie-060b4fc7a3fd5c1b5f745167fe084f7486719b7e.tar.gz opie-060b4fc7a3fd5c1b5f745167fe084f7486719b7e.tar.bz2 |
Update the API Documentation for DateFormat and TimeString utility classes
Add a Translator hint what M, D, Y mean
-rw-r--r-- | library/timestring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/timestring.cpp b/library/timestring.cpp index 8f60b72..2fd0191 100644 --- a/library/timestring.cpp +++ b/library/timestring.cpp @@ -38,68 +38,68 @@ private slots: void formatChanged( DateFormat f ) { format = f; } private: static TimeStringFormatKeeper *self; DateFormat format; TimeStringFormatKeeper() : QObject( qApp ) { Config config("qpe"); config.setGroup( "Date" ); format = DateFormat(QChar(config.readEntry("Separator", "/")[0]), (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear), (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear)); connect( qApp, SIGNAL( dateFormatChanged(DateFormat) ), this, SLOT( formatChanged( DateFormat ) ) ); } }; TimeStringFormatKeeper *TimeStringFormatKeeper::self = 0; QString DateFormat::toNumberString() const { QString buf = ""; // for each part of the order for (int i = 0; i < 3; i++) { // switch on the relavent 3 bits. switch((_shortOrder >> (i * 3)) & 0x0007) { case 0x0001: - buf += QObject::tr( "D" ); + buf += QObject::tr( "D" , "Shortcut for Day"); break; case 0x0002: - buf += QObject::tr( "M" ); + buf += QObject::tr( "M", "Shortcur for Month" ); break; case 0x0004: buf += QObject::tr( "Y" ); break; } if (i < 2) buf += _shortSeparator; } return buf; } QString DateFormat::toWordString() const { QString buf = ""; // for each part of the order for (int i = 0; i < 3; i++) { // switch on the relavent 3 bits. switch((_longOrder >> (i * 3)) & 0x0007) { case 0x0001: buf += QObject::tr( "day" ); if (i < 2) { if ((_shortOrder << ((i+1) * 3)) & 0x0007) buf += ", "; else buf += " "; } break; case 0x0002: buf += QObject::tr( "month" ); if (i < 2) buf += " "; break; |