From 408cd128fc07d7f87c20ce75bedb1964ef4a8adb Mon Sep 17 00:00:00 2001 From: Craig Cornelius Date: Thu, 27 Aug 2020 17:46:23 +0000 Subject: [PATCH] ICU-21242 rephrase documentation using term master See #1255 --- docs/userguide/boundaryanalysis/index.md | 2 +- docs/userguide/dev/codingguidelines.md | 2 +- icu4c/source/Doxyfile.in | 2 +- icu4c/source/common/unicode/ucnv.h | 2 +- icu4c/source/common/unifiedcache.cpp | 14 +++++----- icu4c/source/common/unifiedcache.h | 14 +++++----- icu4c/source/data/cldr-icu-readme.txt | 2 +- icu4c/source/i18n/dtitvfmt.cpp | 6 ++-- icu4c/source/i18n/nfrs.cpp | 28 +++++++++---------- icu4c/source/i18n/nfrule.cpp | 10 +++---- icu4c/source/i18n/nfrule.h | 2 +- icu4c/source/i18n/nfsubs.cpp | 4 +-- icu4c/source/i18n/rbt_pars.cpp | 2 +- icu4c/source/i18n/region.cpp | 2 +- icu4c/source/i18n/unicode/rbnf.h | 14 +++++----- icu4c/source/test/testdata/rbbitst.txt | 2 +- .../com/ibm/icu/text/DateIntervalFormat.java | 2 +- .../core/src/com/ibm/icu/text/NFRule.java | 14 +++++----- .../core/src/com/ibm/icu/text/NFRuleSet.java | 24 ++++++++-------- .../src/com/ibm/icu/text/NFSubstitution.java | 4 +-- .../ibm/icu/text/RuleBasedNumberFormat.java | 18 ++++++------ .../core/src/com/ibm/icu/util/Region.java | 4 +-- .../ibm/icu/text/TransliteratorParser.java | 2 +- .../icu/dev/tool/translit/dumpICUrules.bat | 2 +- 24 files changed, 89 insertions(+), 89 deletions(-) diff --git a/docs/userguide/boundaryanalysis/index.md b/docs/userguide/boundaryanalysis/index.md index 697602ab4b4..2e8dd6e944a 100644 --- a/docs/userguide/boundaryanalysis/index.md +++ b/docs/userguide/boundaryanalysis/index.md @@ -193,7 +193,7 @@ that a single instance cannot operate in parallel on multiple texts. For concurrent break iteration, each thread must use its own break iterator. These can be obtained by creating separate break iterators of the desired type, -or by initially creating a master break iterator and then creating a clone for +or by initially creating a main break iterator and then creating a clone for each thread. ### Line Breaking Strictness, a CSS Property diff --git a/docs/userguide/dev/codingguidelines.md b/docs/userguide/dev/codingguidelines.md index c702dea9343..b76b5ab8b1b 100644 --- a/docs/userguide/dev/codingguidelines.md +++ b/docs/userguide/dev/codingguidelines.md @@ -1907,7 +1907,7 @@ stored in a format that is used directly during processing. Most of the data items are pre-built into binary files that are then installed on a user's machine. Some data can also be built at runtime but is not -persistent. In the latter case, a master object should be built once and then +persistent. In the latter case, a primary object should be built once and then cloned to avoid the multiple parsing, processing, and building of the same data. Binary data formats for ICU must be portable across platforms that share the diff --git a/icu4c/source/Doxyfile.in b/icu4c/source/Doxyfile.in index 25b535cc7ac..7ced104ce80 100644 --- a/icu4c/source/Doxyfile.in +++ b/icu4c/source/Doxyfile.in @@ -1310,7 +1310,7 @@ CHM_FILE = HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). +# (YES) or that it should be included in the primary .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. diff --git a/icu4c/source/common/unicode/ucnv.h b/icu4c/source/common/unicode/ucnv.h index ec7c5f350b4..614001cc433 100644 --- a/icu4c/source/common/unicode/ucnv.h +++ b/icu4c/source/common/unicode/ucnv.h @@ -476,7 +476,7 @@ ucnv_openCCSID(int32_t codepage, *

The name will NOT be looked up in the alias mechanism, nor will the converter be * stored in the converter cache or the alias table. The only way to open further converters * is call this function multiple times, or use the ucnv_safeClone() function to clone a - * 'master' converter.

+ * 'primary' converter.

* *

A future version of ICU may add alias table lookups and/or caching * to this function.

diff --git a/icu4c/source/common/unifiedcache.cpp b/icu4c/source/common/unifiedcache.cpp index f2dd9165595..493ab79f6d9 100644 --- a/icu4c/source/common/unifiedcache.cpp +++ b/icu4c/source/common/unifiedcache.cpp @@ -311,7 +311,7 @@ void UnifiedCache::_putNew( } keyToAdopt->fCreationStatus = creationStatus; if (value->softRefCount == 0) { - _registerMaster(keyToAdopt, value); + _registerPrimary(keyToAdopt, value); } void *oldValue = uhash_put(fHashtable, keyToAdopt, (void *) value, &status); U_ASSERT(oldValue == nullptr); @@ -338,7 +338,7 @@ void UnifiedCache::_putIfAbsentAndGet( } else { _put(element, value, status); } - // Run an eviction slice. This will run even if we added a master entry + // Run an eviction slice. This will run even if we added a primary entry // which doesn't increase the unused count, but that is still o.k _runEvictionSlice(); } @@ -403,9 +403,9 @@ void UnifiedCache::_get( } } -void UnifiedCache::_registerMaster( +void UnifiedCache::_registerPrimary( const CacheKeyBase *theKey, const SharedObject *value) const { - theKey->fIsMaster = true; + theKey->fIsPrimary = true; value->cachePtr = this; ++fNumValuesTotal; ++fNumValuesInUse; @@ -420,7 +420,7 @@ void UnifiedCache::_put( const SharedObject *oldValue = (const SharedObject *) element->value.pointer; theKey->fCreationStatus = status; if (value->softRefCount == 0) { - _registerMaster(theKey, value); + _registerPrimary(theKey, value); } value->softRefCount++; UHashElement *ptr = const_cast(element); @@ -474,9 +474,9 @@ UBool UnifiedCache::_isEvictable(const UHashElement *element) const return FALSE; } - // We can evict entries that are either not a master or have just + // We can evict entries that are either not a primary or have just // one reference (The one reference being from the cache itself). - return (!theKey->fIsMaster || (theValue->softRefCount == 1 && theValue->noHardReferences())); + return (!theKey->fIsPrimary || (theValue->softRefCount == 1 && theValue->noHardReferences())); } void UnifiedCache::removeSoftRef(const SharedObject *value) const { diff --git a/icu4c/source/common/unifiedcache.h b/icu4c/source/common/unifiedcache.h index d6c9945126c..6bb46a597fc 100644 --- a/icu4c/source/common/unifiedcache.h +++ b/icu4c/source/common/unifiedcache.h @@ -34,13 +34,13 @@ class UnifiedCache; */ class U_COMMON_API CacheKeyBase : public UObject { public: - CacheKeyBase() : fCreationStatus(U_ZERO_ERROR), fIsMaster(FALSE) {} + CacheKeyBase() : fCreationStatus(U_ZERO_ERROR), fIsPrimary(FALSE) {} /** * Copy constructor. Needed to support cloning. */ CacheKeyBase(const CacheKeyBase &other) - : UObject(other), fCreationStatus(other.fCreationStatus), fIsMaster(FALSE) { } + : UObject(other), fCreationStatus(other.fCreationStatus), fIsPrimary(FALSE) { } virtual ~CacheKeyBase(); /** @@ -88,7 +88,7 @@ class U_COMMON_API CacheKeyBase : public UObject { } private: mutable UErrorCode fCreationStatus; - mutable UBool fIsMaster; + mutable UBool fIsPrimary; friend class UnifiedCache; }; @@ -463,17 +463,17 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase { void _runEvictionSlice() const; /** - * Register a master cache entry. A master key is the first key to create + * Register a primary cache entry. A primary key is the first key to create * a given SharedObject value. Subsequent keys whose create function - * produce referneces to an already existing SharedObject are not masters - + * produce referneces to an already existing SharedObject are not primary - * they can be evicted and subsequently recreated. * * On entry, gCacheMutex must be held. - * On exit, items in use count incremented, entry is marked as a master + * On exit, items in use count incremented, entry is marked as a primary * entry, and value registered with cache so that subsequent calls to * addRef() and removeRef() on it correctly interact with the cache. */ - void _registerMaster(const CacheKeyBase *theKey, const SharedObject *value) const; + void _registerPrimary(const CacheKeyBase *theKey, const SharedObject *value) const; /** * Store a value and creation error status in given hash entry. diff --git a/icu4c/source/data/cldr-icu-readme.txt b/icu4c/source/data/cldr-icu-readme.txt index 09ece4c7c0b..dc967295662 100644 --- a/icu4c/source/data/cldr-icu-readme.txt +++ b/icu4c/source/data/cldr-icu-readme.txt @@ -233,7 +233,7 @@ make check 2>&1 | tee /tmp/icu4c-newData-makeCheck.txt # Repeat steps 4-7 until there are no errors. # 9. You can also run the make check tests in exhaustive mode (these will also -# be run automatically on the master branch after the merge resulting from this +# be run automatically on the default branch after the merge resulting from this # integration): cd $ICU4C_DIR/source diff --git a/icu4c/source/i18n/dtitvfmt.cpp b/icu4c/source/i18n/dtitvfmt.cpp index b71a571d1c4..9b9e11d4dcc 100644 --- a/icu4c/source/i18n/dtitvfmt.cpp +++ b/icu4c/source/i18n/dtitvfmt.cpp @@ -239,7 +239,7 @@ DateIntervalFormat::operator==(const Format& other) const { if (fDateFormat && fmt->fDateFormat && (*fDateFormat != *fmt->fDateFormat)) {return FALSE;} } // note: fFromCalendar and fToCalendar hold no persistent state, and therefore do not participate in operator ==. - // fDateFormat has the master calendar for the DateIntervalFormat. + // fDateFormat has the primary calendar for the DateIntervalFormat. if (fSkeleton != fmt->fSkeleton) {return FALSE;} if (fDatePattern != fmt->fDatePattern && (fDatePattern == nullptr || fmt->fDatePattern == nullptr)) {return FALSE;} if (fDatePattern && fmt->fDatePattern && (*fDatePattern != *fmt->fDatePattern)) {return FALSE;} @@ -583,7 +583,7 @@ DateIntervalFormat::adoptTimeZone(TimeZone* zone) if (fDateFormat != nullptr) { fDateFormat->adoptTimeZone(zone); } - // The fDateFormat has the master calendar for the DateIntervalFormat and has + // The fDateFormat has the primary calendar for the DateIntervalFormat and has // ownership of any adopted TimeZone; fFromCalendar and fToCalendar are internal // work clones of that calendar (and should not also be given ownership of the // adopted TimeZone). @@ -601,7 +601,7 @@ DateIntervalFormat::setTimeZone(const TimeZone& zone) if (fDateFormat != nullptr) { fDateFormat->setTimeZone(zone); } - // The fDateFormat has the master calendar for the DateIntervalFormat; + // The fDateFormat has the primary calendar for the DateIntervalFormat; // fFromCalendar and fToCalendar are internal work clones of that calendar. if (fFromCalendar) { fFromCalendar->setTimeZone(zone); diff --git a/icu4c/source/i18n/nfrs.cpp b/icu4c/source/i18n/nfrs.cpp index e7b17b46c3a..1510d885094 100644 --- a/icu4c/source/i18n/nfrs.cpp +++ b/icu4c/source/i18n/nfrs.cpp @@ -37,7 +37,7 @@ enum { /** 0.x */ PROPER_FRACTION_RULE_INDEX = 2, /** x.0 */ - MASTER_RULE_INDEX = 3, + DEFAULT_RULE_INDEX = 3, /** Inf */ INFINITY_RULE_INDEX = 4, /** NaN */ @@ -278,8 +278,8 @@ void NFRuleSet::setNonNumericalRule(NFRule *rule) { else if (baseValue == NFRule::kProperFractionRule) { setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, TRUE); } - else if (baseValue == NFRule::kMasterRule) { - setBestFractionRule(MASTER_RULE_INDEX, rule, TRUE); + else if (baseValue == NFRule::kDefaultRule) { + setBestFractionRule(DEFAULT_RULE_INDEX, rule, TRUE); } else if (baseValue == NFRule::kInfinityRule) { delete nonNumericalRules[INFINITY_RULE_INDEX]; @@ -323,7 +323,7 @@ NFRuleSet::~NFRuleSet() for (int i = 0; i < NON_NUMERICAL_RULE_LENGTH; i++) { if (i != IMPROPER_FRACTION_RULE_INDEX && i != PROPER_FRACTION_RULE_INDEX - && i != MASTER_RULE_INDEX) + && i != DEFAULT_RULE_INDEX) { delete nonNumericalRules[i]; } @@ -375,7 +375,7 @@ NFRuleSet::setDecimalFormatSymbols(const DecimalFormatSymbols &newSymbols, UErro rules[i]->setDecimalFormatSymbols(newSymbols, status); } // Switch the fraction rules to mirror the DecimalFormatSymbols. - for (int32_t nonNumericalIdx = IMPROPER_FRACTION_RULE_INDEX; nonNumericalIdx <= MASTER_RULE_INDEX; nonNumericalIdx++) { + for (int32_t nonNumericalIdx = IMPROPER_FRACTION_RULE_INDEX; nonNumericalIdx <= DEFAULT_RULE_INDEX; nonNumericalIdx++) { if (nonNumericalRules[nonNumericalIdx]) { for (uint32_t fIdx = 0; fIdx < fractionRules.size(); fIdx++) { NFRule *fractionRule = fractionRules[fIdx]; @@ -472,9 +472,9 @@ NFRuleSet::findDoubleRule(double number) const } } - // if there's a master rule, use it to format the number - if (nonNumericalRules[MASTER_RULE_INDEX]) { - return nonNumericalRules[MASTER_RULE_INDEX]; + // if there's a default rule, use it to format the number + if (nonNumericalRules[DEFAULT_RULE_INDEX]) { + return nonNumericalRules[DEFAULT_RULE_INDEX]; } // and if we haven't yet returned a rule, use findNormalRule() @@ -507,13 +507,13 @@ NFRuleSet::findNormalRule(int64_t number) const // do them in findRule(), because the version of format() that // takes a long bypasses findRule() and goes straight to this // function. This function does skip the fraction rules since - // we know the value is an integer (it also skips the master + // we know the value is an integer (it also skips the default // rule, since it's considered a fraction rule. Skipping the - // master rule in this function is also how we avoid infinite + // default rule in this function is also how we avoid infinite // recursion) // {dlf} unfortunately this fails if there are no rules except - // special rules. If there are no rules, use the master rule. + // special rules. If there are no rules, use the default rule. // binary-search the rule list for the applicable rule // (a rule is used for all values from its base value to @@ -553,8 +553,8 @@ NFRuleSet::findNormalRule(int64_t number) const } return result; } - // else use the master rule - return nonNumericalRules[MASTER_RULE_INDEX]; + // else use the default rule + return nonNumericalRules[DEFAULT_RULE_INDEX]; } /** @@ -792,7 +792,7 @@ NFRuleSet::appendRules(UnicodeString& result) const if (nonNumericalRules[i]) { if (rule->getBaseValue() == NFRule::kImproperFractionRule || rule->getBaseValue() == NFRule::kProperFractionRule - || rule->getBaseValue() == NFRule::kMasterRule) + || rule->getBaseValue() == NFRule::kDefaultRule) { for (uint32_t fIdx = 0; fIdx < fractionRules.size(); fIdx++) { NFRule *fractionRule = fractionRules[fIdx]; diff --git a/icu4c/source/i18n/nfrule.cpp b/icu4c/source/i18n/nfrule.cpp index 4f809f9c803..a9b84eda182 100644 --- a/icu4c/source/i18n/nfrule.cpp +++ b/icu4c/source/i18n/nfrule.cpp @@ -153,7 +153,7 @@ NFRule::makeRules(UnicodeString& description, if ((rule1->baseValue > 0 && (rule1->baseValue % util64_pow(rule1->radix, rule1->exponent)) == 0) || rule1->getType() == kImproperFractionRule - || rule1->getType() == kMasterRule) { + || rule1->getType() == kDefaultRule) { // if it passes that test, new up the second rule. If the // rule set both rules will belong to is a fraction rule @@ -181,9 +181,9 @@ NFRule::makeRules(UnicodeString& description, } // if the description began with "x.0" and contains bracketed - // text, it describes both the master rule and the + // text, it describes both the default rule and the // improper fraction rule - else if (rule1->getType() == kMasterRule) { + else if (rule1->getType() == kDefaultRule) { rule2->baseValue = rule1->baseValue; rule1->setType(kImproperFractionRule); } @@ -376,7 +376,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status) decimalPoint = descriptor.charAt(1); } else if (firstChar == gX && lastChar == gZero) { - setBaseValue(kMasterRule, status); + setBaseValue(kDefaultRule, status); decimalPoint = descriptor.charAt(1); } else if (descriptor.compare(gNaN, 3) == 0) { @@ -663,7 +663,7 @@ NFRule::_appendRuleText(UnicodeString& result) const case kNegativeNumberRule: result.append(gMinusX, 2); break; case kImproperFractionRule: result.append(gX).append(decimalPoint == 0 ? gDot : decimalPoint).append(gX); break; case kProperFractionRule: result.append(gZero).append(decimalPoint == 0 ? gDot : decimalPoint).append(gX); break; - case kMasterRule: result.append(gX).append(decimalPoint == 0 ? gDot : decimalPoint).append(gZero); break; + case kDefaultRule: result.append(gX).append(decimalPoint == 0 ? gDot : decimalPoint).append(gZero); break; case kInfinityRule: result.append(gInf, 3); break; case kNaNRule: result.append(gNaN, 3); break; default: diff --git a/icu4c/source/i18n/nfrule.h b/icu4c/source/i18n/nfrule.h index ed33eaa5af7..989fbaa8f9b 100644 --- a/icu4c/source/i18n/nfrule.h +++ b/icu4c/source/i18n/nfrule.h @@ -38,7 +38,7 @@ public: kNegativeNumberRule = -1, kImproperFractionRule = -2, kProperFractionRule = -3, - kMasterRule = -4, + kDefaultRule = -4, kInfinityRule = -5, kNaNRule = -6, kOtherRule = -7 diff --git a/icu4c/source/i18n/nfsubs.cpp b/icu4c/source/i18n/nfsubs.cpp index 208543d1acd..e3d1fc144fa 100644 --- a/icu4c/source/i18n/nfsubs.cpp +++ b/icu4c/source/i18n/nfsubs.cpp @@ -342,7 +342,7 @@ NFSubstitution::makeSubstitution(int32_t pos, // IntegralPartSubstitution else if (rule->getBaseValue() == NFRule::kImproperFractionRule || rule->getBaseValue() == NFRule::kProperFractionRule - || rule->getBaseValue() == NFRule::kMasterRule) { + || rule->getBaseValue() == NFRule::kDefaultRule) { return new IntegralPartSubstitution(pos, ruleSet, description, status); } @@ -371,7 +371,7 @@ NFSubstitution::makeSubstitution(int32_t pos, // FractionalPartSubstitution else if (rule->getBaseValue() == NFRule::kImproperFractionRule || rule->getBaseValue() == NFRule::kProperFractionRule - || rule->getBaseValue() == NFRule::kMasterRule) { + || rule->getBaseValue() == NFRule::kDefaultRule) { return new FractionalPartSubstitution(pos, ruleSet, description, status); } diff --git a/icu4c/source/i18n/rbt_pars.cpp b/icu4c/source/i18n/rbt_pars.cpp index 1ae5b81f034..89d426813ce 100644 --- a/icu4c/source/i18n/rbt_pars.cpp +++ b/icu4c/source/i18n/rbt_pars.cpp @@ -1557,7 +1557,7 @@ UChar TransliteratorParser::getSegmentStandin(int32_t seg, UErrorCode& status) { return 0; } c = variableNext++; - // Set a placeholder in the master variables vector that will be + // Set a placeholder in the primary variables vector that will be // filled in later by setSegmentObject(). We know that we will get // called first because setSegmentObject() will call us. variablesVector.addElement((void*) NULL, status); diff --git a/icu4c/source/i18n/region.cpp b/icu4c/source/i18n/region.cpp index 76445aef328..d8a5ffddc37 100644 --- a/icu4c/source/i18n/region.cpp +++ b/icu4c/source/i18n/region.cpp @@ -217,7 +217,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { if ( aliasToRegion != NULL && aliasFromRegion == NULL ) { // This is just an alias from some string to a region uhash_put(newRegionAliases.getAlias(),(void *)aliasFromStr.orphan(), (void *)aliasToRegion,&status); } else { - if ( aliasFromRegion == NULL ) { // Deprecated region code not in the master codes list - so need to create a deprecated region for it. + if ( aliasFromRegion == NULL ) { // Deprecated region code not in the primary codes list - so need to create a deprecated region for it. LocalPointer newRgn(new Region, status); if ( U_SUCCESS(status) ) { aliasFromRegion = newRgn.orphan(); diff --git a/icu4c/source/i18n/unicode/rbnf.h b/icu4c/source/i18n/unicode/rbnf.h index 62b02324b14..283e9696fb9 100644 --- a/icu4c/source/i18n/unicode/rbnf.h +++ b/icu4c/source/i18n/unicode/rbnf.h @@ -297,7 +297,7 @@ enum URBNFRuleSetTag { * * * x.0: - * The rule is a master rule. If the full stop in + * The rule is a default rule. If the full stop in * the middle of the rule name is replaced with the decimal point * that is used in the language or DecimalFormatSymbols, then that rule will * have precedence when formatting and parsing this rule. For example, some @@ -332,9 +332,9 @@ enum URBNFRuleSetTag { * algorithms: If the rule set is a regular rule set, do the following: * *
    - *
  • If the rule set includes a master rule (and the number was passed in as a double), - * use the master rule.  (If the number being formatted was passed in as a long, - * the master rule is ignored.)
  • + *
  • If the rule set includes a default rule (and the number was passed in as a double), + * use the default rule.  (If the number being formatted was passed in as a long, + * the default rule is ignored.)
  • *
  • If the number is negative, use the negative-number rule.
  • *
  • If the number has a fractional part and is greater than 1, use the improper fraction * rule.
  • @@ -393,7 +393,7 @@ enum URBNFRuleSetTag { * * * - * in fraction or master rule + * in fraction or default rule * Isolate the number's fractional part and format it. * * @@ -425,7 +425,7 @@ enum URBNFRuleSetTag { * * * - * in fraction or master rule + * in fraction or default rule * Isolate the number's integral part and format it. * * @@ -456,7 +456,7 @@ enum URBNFRuleSetTag { * * * - * in master rule + * in default rule * Omit the optional text if the number is an integer (same as specifying both an x.x * rule and an x.0 rule) * diff --git a/icu4c/source/test/testdata/rbbitst.txt b/icu4c/source/test/testdata/rbbitst.txt index 98cf6883d72..3fae72cba95 100644 --- a/icu4c/source/test/testdata/rbbitst.txt +++ b/icu4c/source/test/testdata/rbbitst.txt @@ -32,7 +32,7 @@ # [ICU4C] source/test/testdata/rbbitst.txt # [ICU4J] main/tests/core/src/com/ibm/icu/dev/test/rbbi/rbbitst.txt # -# ICU4C's copy is the master. If any changes are made to ICU4J's copy, make sure they +# ICU4C's copy is the primary one. If any changes are made to ICU4J's copy, make sure they # are merged back into ICU4C's copy of the file, lest they get overwritten later. # TODO: figure out how to have a single copy of the file for use by both C and Java. diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java index 62bccc4af33..3ba5517e529 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java @@ -1234,7 +1234,7 @@ public class DateIntervalFormat extends UFormat { if (fDateFormat != null) { fDateFormat.setTimeZone(zoneToSet); } - // fDateFormat has the master calendar for the DateIntervalFormat; + // fDateFormat has the primary calendar for the DateIntervalFormat; // fFromCalendar and fToCalendar are internal work clones of that calendar. if (fFromCalendar != null) { fFromCalendar.setTimeZone(zoneToSet); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/NFRule.java b/icu4j/main/classes/core/src/com/ibm/icu/text/NFRule.java index 4a0c4a88cc4..2155f2a4ae3 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/NFRule.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/NFRule.java @@ -41,9 +41,9 @@ final class NFRule { static final int PROPER_FRACTION_RULE = -3; /** - * Special base value used to identify a master rule + * Special base value used to identify a default rule */ - static final int MASTER_RULE = -4; + static final int DEFAULT_RULE = -4; /** * Special base value used to identify an infinity rule @@ -169,7 +169,7 @@ final class NFRule { if ((rule1.baseValue > 0 && rule1.baseValue % (power(rule1.radix, rule1.exponent)) == 0) || rule1.baseValue == IMPROPER_FRACTION_RULE - || rule1.baseValue == MASTER_RULE) + || rule1.baseValue == DEFAULT_RULE) { // if it passes that test, new up the second rule. If the @@ -190,9 +190,9 @@ final class NFRule { // the proper fraction rule rule2.baseValue = PROPER_FRACTION_RULE; } - else if (rule1.baseValue == MASTER_RULE) { + else if (rule1.baseValue == DEFAULT_RULE) { // if the description began with "x.0" and contains bracketed - // text, it describes both the master rule and the + // text, it describes both the default rule and the // improper fraction rule rule2.baseValue = rule1.baseValue; rule1.baseValue = IMPROPER_FRACTION_RULE; @@ -378,7 +378,7 @@ final class NFRule { decimalPoint = descriptor.charAt(1); } else if (firstChar == 'x' && lastChar == '0') { - setBaseValue(MASTER_RULE); + setBaseValue(DEFAULT_RULE); decimalPoint = descriptor.charAt(1); } else if (descriptor.equals("NaN")) { @@ -651,7 +651,7 @@ final class NFRule { else if (baseValue == PROPER_FRACTION_RULE) { result.append('0').append(decimalPoint == 0 ? '.' : decimalPoint).append("x: "); } - else if (baseValue == MASTER_RULE) { + else if (baseValue == DEFAULT_RULE) { result.append('x').append(decimalPoint == 0 ? '.' : decimalPoint).append("0: "); } else if (baseValue == INFINITY_RULE) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/NFRuleSet.java b/icu4j/main/classes/core/src/com/ibm/icu/text/NFRuleSet.java index 2a70ec52d0a..889f62e2de1 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/NFRuleSet.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/NFRuleSet.java @@ -57,7 +57,7 @@ final class NFRuleSet { /** 0.x */ static final int PROPER_FRACTION_RULE_INDEX = 2; /** x.0 */ - static final int MASTER_RULE_INDEX = 3; + static final int DEFAULT_RULE_INDEX = 3; /** Inf */ static final int INFINITY_RULE_INDEX = 4; /** NaN */ @@ -243,8 +243,8 @@ final class NFRuleSet { else if (baseValue == NFRule.PROPER_FRACTION_RULE) { setBestFractionRule(NFRuleSet.PROPER_FRACTION_RULE_INDEX, rule, true); } - else if (baseValue == NFRule.MASTER_RULE) { - setBestFractionRule(NFRuleSet.MASTER_RULE_INDEX, rule, true); + else if (baseValue == NFRule.DEFAULT_RULE) { + setBestFractionRule(NFRuleSet.DEFAULT_RULE_INDEX, rule, true); } else if (baseValue == NFRule.INFINITY_RULE) { nonNumericalRules[NFRuleSet.INFINITY_RULE_INDEX] = rule; @@ -368,7 +368,7 @@ final class NFRuleSet { if (rule != null) { if (rule.getBaseValue() == NFRule.IMPROPER_FRACTION_RULE || rule.getBaseValue() == NFRule.PROPER_FRACTION_RULE - || rule.getBaseValue() == NFRule.MASTER_RULE) + || rule.getBaseValue() == NFRule.DEFAULT_RULE) { for (NFRule fractionRule : fractionRules) { if (fractionRule.getBaseValue() == rule.getBaseValue()) { @@ -508,9 +508,9 @@ final class NFRuleSet { } } - // if there's a master rule, use it to format the number - if (nonNumericalRules[MASTER_RULE_INDEX] != null) { - return nonNumericalRules[MASTER_RULE_INDEX]; + // if there's a default rule, use it to format the number + if (nonNumericalRules[DEFAULT_RULE_INDEX] != null) { + return nonNumericalRules[DEFAULT_RULE_INDEX]; } else { // and if we haven't yet returned a rule, use findNormalRule() @@ -557,9 +557,9 @@ final class NFRuleSet { // do them in findRule(), because the version of format() that // takes a long bypasses findRule() and goes straight to this // function. This function does skip the fraction rules since - // we know the value is an integer (it also skips the master + // we know the value is an integer (it also skips the default // rule, since it's considered a fraction rule. Skipping the - // master rule in this function is also how we avoid infinite + // default rule in this function is also how we avoid infinite // recursion) // binary-search the rule list for the applicable rule @@ -600,8 +600,8 @@ final class NFRuleSet { } return result; } - // else use the master rule - return nonNumericalRules[MASTER_RULE_INDEX]; + // else use the default rule + return nonNumericalRules[DEFAULT_RULE_INDEX]; } /** @@ -829,7 +829,7 @@ final class NFRuleSet { } // Switch the fraction rules to mirror the DecimalFormatSymbols. if (fractionRules != null) { - for (int nonNumericalIdx = IMPROPER_FRACTION_RULE_INDEX; nonNumericalIdx <= MASTER_RULE_INDEX; nonNumericalIdx++) { + for (int nonNumericalIdx = IMPROPER_FRACTION_RULE_INDEX; nonNumericalIdx <= DEFAULT_RULE_INDEX; nonNumericalIdx++) { if (nonNumericalRules[nonNumericalIdx] != null) { for (NFRule rule : fractionRules) { if (nonNumericalRules[nonNumericalIdx].getBaseValue() == rule.getBaseValue()) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/NFSubstitution.java b/icu4j/main/classes/core/src/com/ibm/icu/text/NFSubstitution.java index e2a992bc45d..65db0c28274 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/NFSubstitution.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/NFSubstitution.java @@ -90,7 +90,7 @@ abstract class NFSubstitution { } else if (rule.getBaseValue() == NFRule.IMPROPER_FRACTION_RULE || rule.getBaseValue() == NFRule.PROPER_FRACTION_RULE - || rule.getBaseValue() == NFRule.MASTER_RULE) + || rule.getBaseValue() == NFRule.DEFAULT_RULE) { // if the rule is a fraction rule, return an IntegralPartSubstitution return new IntegralPartSubstitution(pos, ruleSet, description); @@ -115,7 +115,7 @@ abstract class NFSubstitution { } else if (rule.getBaseValue() == NFRule.IMPROPER_FRACTION_RULE || rule.getBaseValue() == NFRule.PROPER_FRACTION_RULE - || rule.getBaseValue() == NFRule.MASTER_RULE) + || rule.getBaseValue() == NFRule.DEFAULT_RULE) { // if the rule is a fraction rule, return a // FractionalPartSubstitution diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/RuleBasedNumberFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/RuleBasedNumberFormat.java index dbab3142162..0e69dac4c32 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/RuleBasedNumberFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/RuleBasedNumberFormat.java @@ -275,7 +275,7 @@ import com.ibm.icu.util.UResourceBundleIterator; * * * x.0: - * The rule is a master rule. If the full stop in + * The rule is a default rule. If the full stop in * the middle of the rule name is replaced with the decimal point * that is used in the language or DecimalFormatSymbols, then that rule will * have precedence when formatting and parsing this rule. For example, some @@ -313,9 +313,9 @@ import com.ibm.icu.util.UResourceBundleIterator; * algorithms: If the rule set is a regular rule set, do the following: * *
      - *
    • If the rule set includes a master rule (and the number was passed in as a double), - * use the master rule.  (If the number being formatted was passed in as a long, - * the master rule is ignored.)
    • + *
    • If the rule set includes a default rule (and the number was passed in as a double), + * use the default rule.  (If the number being formatted was passed in as a long, + * the default rule is ignored.)
    • *
    • If the number is negative, use the negative-number rule.
    • *
    • If the number has a fractional part and is greater than 1, use the improper fraction * rule.
    • @@ -377,7 +377,7 @@ import com.ibm.icu.util.UResourceBundleIterator; * * * - * in fraction or master rule + * in fraction or default rule * Isolate the number's fractional part and format it. * * @@ -415,7 +415,7 @@ import com.ibm.icu.util.UResourceBundleIterator; * * * - * in fraction or master rule + * in fraction or default rule * Isolate the number's integral part and format it. * * @@ -452,7 +452,7 @@ import com.ibm.icu.util.UResourceBundleIterator; * * * - * in master rule + * in default rule * Omit the optional text if the number is an integer (same as specifying both an x.x * rule and an x.0 rule) * @@ -1153,7 +1153,7 @@ public class RuleBasedNumberFormat extends NumberFormat { /** * Formats the specified number according to the specified rule set. - * (If the specified rule set specifies a master ["x.0"] rule, this function + * (If the specified rule set specifies a default ["x.0"] rule, this function * ignores it. Convert the number to a double first if you ned it.) This * function preserves all the precision in the long-- it doesn't convert it * to a double. @@ -1199,7 +1199,7 @@ public class RuleBasedNumberFormat extends NumberFormat { /** * Formats the specified number using the formatter's default rule set. * (The default rule set is the last public rule set defined in the description.) - * (If the specified rule set specifies a master ["x.0"] rule, this function + * (If the specified rule set specifies a default ["x.0"] rule, this function * ignores it. Convert the number to a double first if you ned it.) This * function preserves all the precision in the long-- it doesn't convert it * to a double. diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/Region.java b/icu4j/main/classes/core/src/com/ibm/icu/util/Region.java index 2fabbb0c4ce..b158af355eb 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/Region.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/Region.java @@ -215,7 +215,7 @@ public class Region implements Comparable { regions = new ArrayList(regionCodes.size()); - // First process the region codes and create the master array of regions. + // First process the region codes and create the primary array of regions. for ( String id : regionCodes) { Region r = new Region(); r.id = id; @@ -244,7 +244,7 @@ public class Region implements Comparable { Region r; if ( regionIDMap.containsKey(aliasFrom) ) { // This is a deprecated region r = regionIDMap.get(aliasFrom); - } else { // Deprecated region code not in the master codes list - so need to create a deprecated region for it. + } else { // Deprecated region code not in the primary codes list - so need to create a deprecated region for it. r = new Region(); r.id = aliasFrom; regionIDMap.put(aliasFrom, r); diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorParser.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorParser.java index 5398021bf56..d578e2f90ad 100644 --- a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorParser.java +++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorParser.java @@ -1493,7 +1493,7 @@ class TransliteratorParser { throw new RuntimeException("Variable range exhausted"); } c = variableNext++; - // Set a placeholder in the master variables vector that will be + // Set a placeholder in the primary variables vector that will be // filled in later by setSegmentObject(). We know that we will get // called first because setSegmentObject() will call us. variablesVector.add(null); diff --git a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/translit/dumpICUrules.bat b/icu4j/tools/misc/src/com/ibm/icu/dev/tool/translit/dumpICUrules.bat index 01e7c396ddc..a6081db65a2 100755 --- a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/translit/dumpICUrules.bat +++ b/icu4j/tools/misc/src/com/ibm/icu/dev/tool/translit/dumpICUrules.bat @@ -253,7 +253,7 @@ sub convertIndex { print C_INDEX <