Review Request: Add ISO Currency Code support to KLocale
John Layt
johnlayt at googlemail.com
Wed Nov 11 17:45:52 GMT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2049/
-----------------------------------------------------------
(Updated 2009-11-11 17:45:52.548980)
Review request for kdelibs.
Changes
-------
Bump. Any comments? I'd like to commit this by this weekend as it's holding up other KLocale code changes I have to make. The only proposed change so far is to rename the class form KCurrency to KCurrencyCode.
Summary (updated)
-------
I am proposing to change KLocale to support the ISO 4217 Currency Code standard (http://en.wikipedia.org/wiki/ISO_4217).
The existing currency support is based on a free-text currency symbol field. This leaves applications such as KSpread, KMyMoney, Skrooge, Kraft, KEuroCalc, and various Plasma widgets to provide their own implementation of the ISO codes and translations of the names, leading to unnecessary duplication and inconsistency.
This is an initial proposal aimed at improving the l10n and i18n issues, so comment is particularly sought from the translation teams on a number of issues, especially given how much work may be involved for them. (cc via email)
I am also seeking comment from the various financial applications to ensure the initial implementation is flexible enough to meet their needs both now and in the future.
Details of the Design and Outstanding Issues are at http://techbase.kde.org/Projects/kdelibs/localisation#ISO_4217_Currency_Code_Support . Please read this first before reviewing the code.
The code below consists of both the kdelibs component and the kdebase/runtime component.
The core code is in kdelibs consisting of a new KCurrency class which wraps the individual currency config files, and changes to KLocale to use the new KCurrency class and new separate Decimal Places settings for numbers and money in place of the existing shared fracDigits setting.
The kdebase part consists of the new currency config files, changes to the locale config files, and changes to the Locale KCM to utilise the new settings. Only a limited sample of config files have been completed pending the outcome of the review. Example screenshots are shown for the Zimbabwe locale, note the effect of the new fields on the example Number and Money text at the bottom.
Diffs
-----
trunk/KDE/kdebase/runtime/CMakeLists.txt 1043597
trunk/KDE/kdebase/runtime/kcontrol/locale/localemon.h 1043597
trunk/KDE/kdebase/runtime/kcontrol/locale/localemon.cpp 1043597
trunk/KDE/kdebase/runtime/kcontrol/locale/localemon.ui 1043597
trunk/KDE/kdebase/runtime/kcontrol/locale/localenum.h 1043597
trunk/KDE/kdebase/runtime/kcontrol/locale/localenum.cpp 1043597
trunk/KDE/kdebase/runtime/l10n/cn/entry.desktop 1043597
trunk/KDE/kdebase/runtime/l10n/mg/entry.desktop 1043597
trunk/KDE/kdebase/runtime/l10n/nz/entry.desktop 1043597
trunk/KDE/kdebase/runtime/l10n/us/entry.desktop 1043597
trunk/KDE/kdebase/runtime/l10n/zw/entry.desktop 1043597
trunk/KDE/kdebase/runtime/localization/CMakeLists.txt PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/CMakeLists.txt PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/bwp.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/cny.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/eur.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/gbp.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/mga.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/nzd.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/usd.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/zar.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/zwl.desktop PRE-CREATION
trunk/KDE/kdebase/runtime/localization/currency/zwr.desktop PRE-CREATION
trunk/KDE/kdelibs/kdecore/CMakeLists.txt 1043553
trunk/KDE/kdelibs/kdecore/localization/kcurrency.h PRE-CREATION
trunk/KDE/kdelibs/kdecore/localization/kcurrency.cpp PRE-CREATION
trunk/KDE/kdelibs/kdecore/localization/klocale.h 1043553
trunk/KDE/kdelibs/kdecore/localization/klocale.cpp 1043553
Diff: http://reviewboard.kde.org/r/2049/diff
Testing
-------
The Locale KCM has been used as a test bed for the changes. Existing (and rather limited) unit tests for number formats still pass. New unit tests will be written when implementation is finalised.
Screenshots
-----------
Locale KCM Numbers
http://reviewboard.kde.org/r/2049/s/245/
Locale KCM Money
http://reviewboard.kde.org/r/2049/s/246/
Locale KCM Currency Combo
http://reviewboard.kde.org/r/2049/s/247/
Locale KCM Currency Symbols Combo
http://reviewboard.kde.org/r/2049/s/248/
Thanks,
John
More information about the kde-core-devel
mailing list