--Boundary-00=_tEWkAbjPCIPbhCF Content-Type: Text/Plain; charset="us-ascii"; boundary="" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The attached patch moves some stuff around in KLocale, reading from _three_= =20 config files instead of just two, now. This allows you to add a NounDeclension=3Dtrue line to the language's entry.desktop, which will override the locale's one.= I=20 think Edi put it well why this is a good thing. It certainly allows me to r= un=20 both hsb and cs with correct declension of months in KOrganizer in my C and= =20 nl locales, which it otherwise wouldn't. =2D --=20 pub 1024D/FEA2A3FE 2002-06-18 Adriaan de Groot Would you like a freem? =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAkWEzdqzuAf6io/4RAhbgAJ0V1sunuF+98gMictCaiImSXWSA2gCfUpzr afzVBJEvBa4do4p7W2rkB5Q=3D =3DF6uI =2D----END PGP SIGNATURE----- --Boundary-00=_tEWkAbjPCIPbhCF Content-Type: text/x-diff; charset="us-ascii"; name="diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="diff" Index: klocale.cpp =================================================================== RCS file: /home/kde/kdelibs/kdecore/klocale.cpp,v retrieving revision 1.344.2.1 diff -u -3 -p -r1.344.2.1 klocale.cpp --- klocale.cpp 19 Jan 2004 21:16:06 -0000 1.344.2.1 +++ klocale.cpp 29 Apr 2004 20:02:06 -0000 @@ -317,15 +317,11 @@ void KLocale::initFormat() readConfigNumEntry("NegativeMonetarySignPosition", (int)ParensAround, m_negativeMonetarySignPosition, SignPosition); - //Grammatical - readConfigBoolEntry("NounDeclension", false, d->nounDeclension); // Date and time readConfigEntry("TimeFormat", "%H:%M:%S", m_timeFormat); readConfigEntry("DateFormat", "%A %d %B %Y", m_dateFormat); readConfigEntry("DateFormatShort", "%Y-%m-%d", m_dateFormatShort); - readConfigBoolEntry("DateMonthNamePossessive", false, - d->dateMonthNamePossessive); readConfigNumEntry("WeekStartDay", 1, d->weekStartDay, int); // other @@ -336,6 +332,21 @@ void KLocale::initFormat() delete d->calendar; d->calendar = 0; // ### HPB Is this the correct place? + //Grammatical + //Precedence here is l10n / i18n / config file + KSimpleConfig language(locate("locale", + QString::fromLatin1("%1/entry.desktop") + .arg(m_language)), true); + language.setGroup("KCM Locale"); +#define read3ConfigBoolEntry(key, default, save) \ + save = entry.readBoolEntry(key, default); \ + save = language.readBoolEntry(key, save); \ + save = config->readBoolEntry(key, save); + + read3ConfigBoolEntry("NounDeclension", false, d->nounDeclension); + read3ConfigBoolEntry("DateMonthNamePossessive", false, + d->dateMonthNamePossessive); + // end of hack KGlobal::_locale = lsave; } --Boundary-00=_tEWkAbjPCIPbhCF--