From 335af0d393ec4e86da3c24b5cd9cae546c995f7b Mon Sep 17 00:00:00 2001 From: Doug Felt Date: Fri, 15 Jan 2010 02:52:35 +0000 Subject: [PATCH] ICU-7082 Revise display handling constant names per Markus's suggestions and to align with ICU4C X-SVN-Rev: 27268 --- .../core/src/com/ibm/icu/impl/LocaleDisplayNamesImpl.java | 4 ++-- .../core/src/com/ibm/icu/text/LocaleDisplayNames.java | 8 ++++---- icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/LocaleDisplayNamesImpl.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/LocaleDisplayNamesImpl.java index 5d00c4201d..fbba55ddd0 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/LocaleDisplayNamesImpl.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/LocaleDisplayNamesImpl.java @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 2009, International Business Machines Corporation and * + * Copyright (C) 2009-2010, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -111,7 +111,7 @@ public class LocaleDisplayNamesImpl extends LocaleDisplayNames { boolean hasVariant = variant.length() > 0; if (hasLang) { - if (dialectHandling == DialectHandling.USE_DIALECT_NAMES) { + if (dialectHandling == DialectHandling.DIALECT_NAMES) { do { // loop construct is so we can break early out of search if (hasScript && hasCountry) { String langScriptCountry = lang + '_' + script + '_' + country; diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java b/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java index 9664a77cb9..f86362e44f 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java @@ -28,13 +28,13 @@ public abstract class LocaleDisplayNames { * e.g. en_GB displays as 'English (United Kingdom)'. * @draft ICU 4.4 */ - STANDARD, + STANDARD_NAMES, /** - * Use dialect names, when generating a locale name, + * Use dialect names when generating a locale name, * e.g. en_GB displays as 'British English'. * @draft ICU 4.4 */ - USE_DIALECT_NAMES + DIALECT_NAMES } // factory methods @@ -46,7 +46,7 @@ public abstract class LocaleDisplayNames { * @draft ICU 4.4 */ public static LocaleDisplayNames getInstance(ULocale locale) { - return getInstance(locale, DialectHandling.STANDARD); + return getInstance(locale, DialectHandling.STANDARD_NAMES); }; /** diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java b/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java index 82031bcd10..1eb397a75e 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java @@ -1,6 +1,6 @@ /* ****************************************************************************** -* Copyright (C) 2003-2009, International Business Machines Corporation and * +* Copyright (C) 2003-2010, International Business Machines Corporation and * * others. All Rights Reserved. * ****************************************************************************** */ @@ -1491,7 +1491,7 @@ public final class ULocale implements Serializable { } private static String getDisplayNameWithDialectInternal(ULocale locale, ULocale displayLocale) { - return LocaleDisplayNames.getInstance(displayLocale, DialectHandling.USE_DIALECT_NAMES) + return LocaleDisplayNames.getInstance(displayLocale, DialectHandling.DIALECT_NAMES) .localeDisplayName(locale); }