classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Locale update and addition to java.util.Currency


From: Andrew John Hughes
Subject: [cp-patches] Locale update and addition to java.util.Currency
Date: Mon, 31 Jan 2005 01:35:08 +0000
User-agent: Mutt/1.5.6+20040907i

I'm committing an update to the locales, along with a java.util.Currency
fix (necessary, as the current code breaks with the new locales).
I've not attached a patch as this is over 3mb; if anyone wants a copy,
they are welcome to mail me for one ;)

The changes can be summarized as follows:

        * Fixed the ordering of the zone information, as suggested
        by Ito.  The ID is now the first element, rather than the last.
        * The locales all now contain \u00A6 (a broken bar) as the separator
        rather than the | added by Mark.  Using the | as a separator breaks
        when parsing the currency symbol for Indian rupees.  Hopefully, the
        new value is unique enough (as well as being a pretty nifty pointer
        to what our original implementation was).
        * The data is now up-to-date with the latest CLDR data pulled from
        CVS.  This also has the advantage of unifying our locale data, some
        of which appears to have not been updated on the last run (root.xml
        in particular, which broke down badly when updated).  The files
        are now as generated.  If you find a regression due to missing data,
        please report this as a bug.  Ideally, we can then fix it by adapting
        the generator rather than having locale data as a hybrid of automatic
        and manual updates.
        * The changes broke our java.util.Currency, which gave me an incentive
        to also finally add the update to this class, which allows our currency
        symbols to be localized and correctly match the specification.  Before,
        they were simply pulled from gnu.java.locale.LocaleInformation in
        an unlocalized form.  As part of this, I also added a new class,
        gnu.java.locale.LocaleHelper, which currently contains one static
        method, getLocalizedString().  This is basically an adapted version
        of a method I wrote for java.util.Locale, but which would seem to be
        useful in other contexts (two at least so far ;) )

Changelog:

2005-01-31  Andrew John Hughes  <address@hidden>

        * gnu/java/locale/LocaleHelper.java:
        New utility class.
        (getLocalizedString(java.util.Locale,
        String, String, boolean, boolean)):
        More generic version of what was
        java.util.Locale.getDisplayString, now
        available to all classes.
        * gnu/java/locale/LocaleInformation.java,
        gnu/java/locale/LocaleInformation_aa.java,
        gnu/java/locale/LocaleInformation_aa_ET.java,
        gnu/java/locale/LocaleInformation_af.java,
        gnu/java/locale/LocaleInformation_am.java,
        gnu/java/locale/LocaleInformation_am_ET.java,
        gnu/java/locale/LocaleInformation_ar.java,
        gnu/java/locale/LocaleInformation_as.java,
        gnu/java/locale/LocaleInformation_az.java,
        gnu/java/locale/LocaleInformation_be.java,
        gnu/java/locale/LocaleInformation_bg.java,
        gnu/java/locale/LocaleInformation_bn.java,
        gnu/java/locale/LocaleInformation_byn.java
        gnu/java/locale/LocaleInformation_byn_ER.java
        gnu/java/locale/LocaleInformation_ca.java,
        gnu/java/locale/LocaleInformation_cs.java,
        gnu/java/locale/LocaleInformation_cy.java,
        gnu/java/locale/LocaleInformation_da.java,
        gnu/java/locale/LocaleInformation_de.java,
        gnu/java/locale/LocaleInformation_de_AT.java,
        gnu/java/locale/LocaleInformation_de_BE.java,
        gnu/java/locale/LocaleInformation_de_CH.java,
        gnu/java/locale/LocaleInformation_de_LU.java,
        gnu/java/locale/LocaleInformation_dv.java,
        gnu/java/locale/LocaleInformation_dz.java,
        gnu/java/locale/LocaleInformation_dz_BT.java,
        gnu/java/locale/LocaleInformation_el.java,
        gnu/java/locale/LocaleInformation_el_GR.java,
        gnu/java/locale/LocaleInformation_en.java,
        gnu/java/locale/LocaleInformation_en_AU.java,
        gnu/java/locale/LocaleInformation_en_BE.java,
        gnu/java/locale/LocaleInformation_en_CA.java,
        gnu/java/locale/LocaleInformation_en_GB.java,
        gnu/java/locale/LocaleInformation_en_HK.java,
        gnu/java/locale/LocaleInformation_en_IE.java,
        gnu/java/locale/LocaleInformation_en_MT.java,
        gnu/java/locale/LocaleInformation_en_NZ.java,
        gnu/java/locale/LocaleInformation_en_PH.java,
        gnu/java/locale/LocaleInformation_en_SG.java,
        gnu/java/locale/LocaleInformation_en_US.java,
        gnu/java/locale/LocaleInformation_en_ZW.java,
        gnu/java/locale/LocaleInformation_eo.java,
        gnu/java/locale/LocaleInformation_es.java,
        gnu/java/locale/LocaleInformation_es_AR.java,
        gnu/java/locale/LocaleInformation_es_CL.java,
        gnu/java/locale/LocaleInformation_es_CO.java,
        gnu/java/locale/LocaleInformation_es_ES.java,
        gnu/java/locale/LocaleInformation_es_MX.java,
        gnu/java/locale/LocaleInformation_es_PR.java,
        gnu/java/locale/LocaleInformation_et.java,
        gnu/java/locale/LocaleInformation_eu.java,
        gnu/java/locale/LocaleInformation_fa.java,
        gnu/java/locale/LocaleInformation_fa_AF.java,
        gnu/java/locale/LocaleInformation_fi.java,
        gnu/java/locale/LocaleInformation_fo.java,
        gnu/java/locale/LocaleInformation_fr.java,
        gnu/java/locale/LocaleInformation_fr_CA.java,
        gnu/java/locale/LocaleInformation_fr_LU.java,
        gnu/java/locale/LocaleInformation_ga.java,
        gnu/java/locale/LocaleInformation_ga_IE.java,
        gnu/java/locale/LocaleInformation_gez.java
        gnu/java/locale/LocaleInformation_gez_ER.java
        gnu/java/locale/LocaleInformation_gez_ET.java
        gnu/java/locale/LocaleInformation_gl.java,
        gnu/java/locale/LocaleInformation_gu.java,
        gnu/java/locale/LocaleInformation_gv.java,
        gnu/java/locale/LocaleInformation_haw.java
        gnu/java/locale/LocaleInformation_haw_US.java
        gnu/java/locale/LocaleInformation_he.java,
        gnu/java/locale/LocaleInformation_hi.java,
        gnu/java/locale/LocaleInformation_hr.java,
        gnu/java/locale/LocaleInformation_hu.java,
        gnu/java/locale/LocaleInformation_hy.java,
        gnu/java/locale/LocaleInformation_id.java,
        gnu/java/locale/LocaleInformation_is.java,
        gnu/java/locale/LocaleInformation_it.java,
        gnu/java/locale/LocaleInformation_it_IT.java,
        gnu/java/locale/LocaleInformation_iu.java,
        gnu/java/locale/LocaleInformation_ja.java,
        gnu/java/locale/LocaleInformation_ka.java,
        gnu/java/locale/LocaleInformation_kk.java,
        gnu/java/locale/LocaleInformation_kl.java,
        gnu/java/locale/LocaleInformation_km.java,
        gnu/java/locale/LocaleInformation_kn.java,
        gnu/java/locale/LocaleInformation_ko.java,
        gnu/java/locale/LocaleInformation_kok.java
        gnu/java/locale/LocaleInformation_kok_IN.java
        gnu/java/locale/LocaleInformation_kw.java,
        gnu/java/locale/LocaleInformation_ky.java,
        gnu/java/locale/LocaleInformation_lo.java,
        gnu/java/locale/LocaleInformation_lt.java,
        gnu/java/locale/LocaleInformation_lv.java,
        gnu/java/locale/LocaleInformation_mk.java,
        gnu/java/locale/LocaleInformation_ml.java,
        gnu/java/locale/LocaleInformation_mn.java,
        gnu/java/locale/LocaleInformation_mn_MN.java,
        gnu/java/locale/LocaleInformation_mr.java,
        gnu/java/locale/LocaleInformation_ms.java,
        gnu/java/locale/LocaleInformation_ms_BN.java,
        gnu/java/locale/LocaleInformation_mt.java,
        gnu/java/locale/LocaleInformation_nb.java,
        gnu/java/locale/LocaleInformation_nl.java,
        gnu/java/locale/LocaleInformation_nn.java,
        gnu/java/locale/LocaleInformation_om.java,
        gnu/java/locale/LocaleInformation_om_ET.java,
        gnu/java/locale/LocaleInformation_or.java,
        gnu/java/locale/LocaleInformation_pa.java,
        gnu/java/locale/LocaleInformation_pl.java,
        gnu/java/locale/LocaleInformation_ps.java,
        gnu/java/locale/LocaleInformation_pt.java,
        gnu/java/locale/LocaleInformation_pt_PT.java,
        gnu/java/locale/LocaleInformation_ro.java,
        gnu/java/locale/LocaleInformation_ru.java,
        gnu/java/locale/LocaleInformation_sa.java,
        gnu/java/locale/LocaleInformation_sid.java
        gnu/java/locale/LocaleInformation_sid_ET.java
        gnu/java/locale/LocaleInformation_sk.java,
        gnu/java/locale/LocaleInformation_sl.java,
        gnu/java/locale/LocaleInformation_so.java,
        gnu/java/locale/LocaleInformation_so_DJ.java,
        gnu/java/locale/LocaleInformation_so_ET.java,
        gnu/java/locale/LocaleInformation_so_SO.java,
        gnu/java/locale/LocaleInformation_sq.java,
        gnu/java/locale/LocaleInformation_sr.java,
        gnu/java/locale/LocaleInformation_sr_Latn.java,
        gnu/java/locale/LocaleInformation_sv.java,
        gnu/java/locale/LocaleInformation_sw.java,
        gnu/java/locale/LocaleInformation_syr.java
        gnu/java/locale/LocaleInformation_syr_SY.java
        gnu/java/locale/LocaleInformation_ta.java,
        gnu/java/locale/LocaleInformation_te.java,
        gnu/java/locale/LocaleInformation_th.java,
        gnu/java/locale/LocaleInformation_ti.java,
        gnu/java/locale/LocaleInformation_ti_ER.java,
        gnu/java/locale/LocaleInformation_ti_ET.java,
        gnu/java/locale/LocaleInformation_tig.java
        gnu/java/locale/LocaleInformation_tig_ER.java
        gnu/java/locale/LocaleInformation_tr.java,
        gnu/java/locale/LocaleInformation_tt.java,
        gnu/java/locale/LocaleInformation_uk.java,
        gnu/java/locale/LocaleInformation_ur.java,
        gnu/java/locale/LocaleInformation_uz.java,
        gnu/java/locale/LocaleInformation_uz_AF.java,
        gnu/java/locale/LocaleInformation_vi.java,
        gnu/java/locale/LocaleInformation_wal.java
        gnu/java/locale/LocaleInformation_wal_ET.java
        gnu/java/locale/LocaleInformation_zh.java,
        gnu/java/locale/LocaleInformation_zh_HK_Hant.java,
        gnu/java/locale/LocaleInformation_zh_Hant.java,
        gnu/java/locale/LocaleInformation_zh_MO_Hant.java,
        gnu/java/locale/LocaleInformation_zh_SG_Hans.java,
        Locales updated with re-ordered zone strings,
        new separator ('|' replaced with \u00A6) and updated
        data from the latest CLDR CVS (including 16 new
        locales).
        * java/util/Currency.java:
         (currencySymbol): Removed.
        (getCurrencyCode()): Rewritten to call
        getCurrencyCode(Locale.getDefault()).
        (getCurrencyCode(java.util.Locale)): Rewritten to
        lookup localized currency symbol from our locale data.
        * java/util/Locale.java:
        (getDisplayLanguage(java.util.Locale)): Now calls
        method in LocaleHelper.
        (getDisplayCountry(java.util.Locale)): Likewise.
        (getDisplayVariant(java.util.Locale)): Likewise.
        (getDisplayString()): Rewritten in LocaleHelper.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

No software patents in Europe -- http://nosoftwarepatents.com

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

"We've all been part of the biggest beta test the world has ever known --
Windows" 
-- Victor Wheatman, Gartner

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]