Merge "Update language to comply with Android's inclusive language guidance" am: 9490b1b92f

Original change: https://android-review.googlesource.com/c/platform/packages/inputmethods/LatinIME/+/1382602

Change-Id: Ie77533b68469bf4018bffdecda72792fe89aba71
This commit is contained in:
Treehugger Robot 2020-07-31 17:21:34 +00:00 committed by Automerger Merge Worker
commit 892eabe4c5
21 changed files with 24 additions and 24 deletions

View file

@ -37,7 +37,7 @@
<!-- Chosen to be slightly less than the "aggressive" threshold. This is the threshold for
a mildly plausible suggestion given the input; if no "plausible" suggestion is present
for a language, it's a strong indicator the user is not typing in this language, so we
may be more forgiving of whitelist entries in another language. -->
may be more forgiving of allowlist entries in another language. -->
<string name="plausibility_threshold" translatable="false">0.065</string>
<!-- The index of the auto correction threshold values array. -->

View file

@ -22,7 +22,7 @@
There is another emoji code point list for JB-MR2 and KLP and later under
res/xml/values-v1[89].-->
<resources>
<!-- Dummy codeArrays for recents emoji keyboard.
<!-- Placeholder codeArrays for recents emoji keyboard.
Do not remove these keys, because they are used as a template. -->
<array
name="emoji_recents"

View file

@ -523,7 +523,7 @@ public final class BinaryDictionaryFileDumper {
}
// Read from metadata file in resources to get the baseline dictionary info.
// This ensures we start with a sane list of available dictionaries.
// This ensures we start with a valid list of available dictionaries.
final int metadataResourceId = context.getResources().getIdentifier("metadata",
"raw", DictionaryInfoUtils.RESOURCE_PACKAGE_NAME);
if (metadataResourceId == 0) {

View file

@ -190,7 +190,7 @@ public class RichInputMethodSubtype {
false /* isAuxiliary */, false /* overridesImplicitlyEnabledSubtype */,
SUBTYPE_ID_OF_PLACEHOLDER_NO_LANGUAGE_SUBTYPE));
// Caveat: We probably should remove this when we add an Emoji subtype in {@link R.xml.method}.
// Dummy Emoji subtype. See {@link R.xml.method}.
// Placeholder Emoji subtype. See {@link R.xml.method}.
private static final int SUBTYPE_ID_OF_PLACEHOLDER_EMOJI_SUBTYPE = 0xd78b2ed0;
private static final String EXTRA_VALUE_OF_PLACEHOLDER_EMOJI_SUBTYPE =
"KeyboardLayoutSet=" + SubtypeLocaleUtils.EMOJI

View file

@ -225,7 +225,7 @@ public final class Suggest {
// TODO: now that we have personalization, we may want to re-evaluate this decision
|| !mDictionaryFacilitator.hasAtLeastOneInitializedMainDictionary()
// If the first suggestion is a shortcut we never auto-correct to it, regardless
// of how strong it is (whitelist entries are not KIND_SHORTCUT but KIND_WHITELIST).
// of how strong it is (allowlist entries are not KIND_SHORTCUT but KIND_WHITELIST).
// TODO: we may want to have shortcut-only entries auto-correct in the future.
|| suggestionResults.first().isKindOf(SuggestedWordInfo.KIND_SHORTCUT)) {
hasAutoCorrection = false;

View file

@ -105,7 +105,7 @@ bool HeaderPolicy::fillInAndWriteHeaderToBuffer(const bool updatesLastDecayedTim
&writingPos)) {
return false;
}
// Temporarily writes a dummy header size.
// Temporarily writes a placeholder header size.
int headerSizeFieldPos = writingPos;
if (!HeaderReadWriteUtils::writeDictionaryHeaderSize(outBuffer, 0 /* size */,
&writingPos)) {

View file

@ -97,7 +97,7 @@ class HeaderPolicy : public DictionaryHeaderStructurePolicy {
headerPolicy->mForgettingCurveProbabilityValuesTableId),
mCodePointTable(headerPolicy->mCodePointTable) {}
// Temporary dummy header.
// Temporary placeholder header.
HeaderPolicy()
: mDictFormatVersion(FormatUtils::UNKNOWN_VERSION), mDictionaryFlags(0), mSize(0),
mAttributeMap(), mLocale(CharUtils::EMPTY_STRING), mMultiWordCostMultiplier(0.0f),

View file

@ -69,7 +69,7 @@ bool ProbabilityDictContent::setProbabilityEntry(const int terminalId,
// Write new entry.
int writingPos = getBuffer()->getTailPosition();
while (writingPos <= entryPos) {
// Fulfilling with dummy entries until writingPos.
// Fulfilling with placeholder entries until writingPos.
if (!writeEntry(&dummyEntry, writingPos)) {
AKLOGE("Cannot write dummy entry. pos: %d, mSize: %d", writingPos, mSize);
return false;

View file

@ -38,7 +38,7 @@ class ProbabilityEntry {
: mFlags(probabilityEntry.mFlags), mProbability(probabilityEntry.mProbability),
mHistoricalInfo(probabilityEntry.mHistoricalInfo) {}
// Dummy entry
// Placeholder entry
ProbabilityEntry()
: mFlags(0), mProbability(NOT_A_PROBABILITY), mHistoricalInfo() {}

View file

@ -339,7 +339,7 @@ bool Ver4PatriciaTrieNodeWriter::writePtNodeAndGetTerminalIdAndAdvancePosition(
const PtNodeParams *const ptNodeParams, int *const outTerminalId,
int *const ptNodeWritingPos) {
const int nodePos = *ptNodeWritingPos;
// Write dummy flags. The Node flags are updated with appropriate flags at the last step of the
// Write placeholder flags. The Node flags are updated with appropriate flags at the last step of the
// PtNode writing.
if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer,
0 /* nodeFlags */, ptNodeWritingPos)) {

View file

@ -76,14 +76,14 @@ bool DynamicPtGcEventListeners::TraversePolicyToUpdateBigramProbability
return true;
}
// Writes dummy PtNode array size when the head of PtNode array is read.
// Writes placeholder PtNode array size when the head of PtNode array is read.
bool DynamicPtGcEventListeners::TraversePolicyToPlaceAndWriteValidPtNodesToBuffer
::onDescend(const int ptNodeArrayPos) {
mValidPtNodeCount = 0;
int writingPos = mBufferToWrite->getTailPosition();
mDictPositionRelocationMap->mPtNodeArrayPositionRelocationMap.insert(
PtNodeWriter::PtNodeArrayPositionRelocationMap::value_type(ptNodeArrayPos, writingPos));
// Writes dummy PtNode array size because arrays can have a forward link or needles PtNodes.
// Writes placeholder PtNode array size because arrays can have a forward link or needles PtNodes.
// This field will be updated later in onReadingPtNodeArrayTail() with actual PtNode count.
mPtNodeArraySizeFieldPos = writingPos;
return DynamicPtWritingUtils::writePtNodeArraySizeAndAdvancePosition(

View file

@ -27,7 +27,7 @@ const ShortcutListReadingUtils::ShortcutFlags
const ShortcutListReadingUtils::ShortcutFlags
ShortcutListReadingUtils::MASK_ATTRIBUTE_PROBABILITY = 0x0F;
const int ShortcutListReadingUtils::SHORTCUT_LIST_SIZE_FIELD_SIZE = 2;
// The numeric value of the shortcut probability that means 'whitelist'.
// The numeric value of the shortcut probability that means 'allowlist'.
const int ShortcutListReadingUtils::WHITELIST_SHORTCUT_PROBABILITY = 15;
/* static */ ShortcutListReadingUtils::ShortcutFlags

View file

@ -34,7 +34,7 @@ class ProbabilityEntry {
: mFlags(probabilityEntry.mFlags), mProbability(probabilityEntry.mProbability),
mHistoricalInfo(probabilityEntry.mHistoricalInfo) {}
// Dummy entry
// Placeholder entry
ProbabilityEntry()
: mFlags(Ver4DictConstants::FLAG_NOT_A_VALID_ENTRY), mProbability(NOT_A_PROBABILITY),
mHistoricalInfo() {}

View file

@ -286,7 +286,7 @@ bool Ver4PatriciaTrieNodeWriter::writePtNodeAndGetTerminalIdAndAdvancePosition(
const PtNodeParams *const ptNodeParams, int *const outTerminalId,
int *const ptNodeWritingPos) {
const int nodePos = *ptNodeWritingPos;
// Write dummy flags. The Node flags are updated with appropriate flags at the last step of the
// Write placeholder flags. The Node flags are updated with appropriate flags at the last step of the
// PtNode writing.
if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer,
0 /* nodeFlags */, ptNodeWritingPos)) {

View file

@ -41,7 +41,7 @@ class BinaryDictionaryShortcutIterator {
}
// Gets the shortcut target itself as an int string and put it to outTarget, put its length
// to outTargetLength, put whether it is whitelist to outIsWhitelist.
// to outTargetLength, put whether it is allowlist to outIsWhitelist.
AK_FORCE_INLINE void nextShortcutTarget(
const int maxDepth, int *const outTarget, int *const outTargetLength,
bool *const outIsWhitelist) {

View file

@ -1,3 +1,3 @@
/* This dummy raw resource is needed to be able to load string resources from a test APK
/* This placeholder raw resource is needed to be able to load string resources from a test APK
* successfully. (See {@link KeySpecParserSplitTests#setUp()}.
*/

View file

@ -51,7 +51,7 @@ public class SuggestionSpanUtilsTest {
}
/**
* Helper method to create a dummy {@link SuggestedWordInfo}.
* Helper method to create a placeholder {@link SuggestedWordInfo}.
*
* @param kindAndFlags the kind and flags to be used to create {@link SuggestedWordInfo}.
* @param word the word to be used to create {@link SuggestedWordInfo}.

View file

@ -36,7 +36,7 @@ import java.util.Locale;
public class SuggestedWordsTests {
/**
* Helper method to create a dummy {@link SuggestedWordInfo} with specifying
* Helper method to create a placeholder {@link SuggestedWordInfo} with specifying
* {@link SuggestedWordInfo#KIND_TYPED}.
*
* @param word the word to be used to create {@link SuggestedWordInfo}.
@ -53,7 +53,7 @@ public class SuggestedWordsTests {
}
/**
* Helper method to create a dummy {@link SuggestedWordInfo} with specifying
* Helper method to create a placeholder {@link SuggestedWordInfo} with specifying
* {@link SuggestedWordInfo#KIND_CORRECTION}.
*
* @param word the word to be used to create {@link SuggestedWordInfo}.

View file

@ -446,7 +446,7 @@ public class BinaryDictEncoderUtils {
}
/**
* Sanity-checking method.
* Validity-checking method.
*
* This method checks a list of PtNode arrays for juxtaposition, that is, it will do
* nothing if each node array's cached address is actually the previous node array's address
@ -664,7 +664,7 @@ public class BinaryDictEncoderUtils {
+ "of the node : " + dictEncoder.getPosition() + " <> "
+ ptNode.mCachedAddressAfterUpdate);
}
// Sanity checks.
// Validity checks.
if (DBG && ptNode.getProbability() > FormatSpec.MAX_TERMINAL_FREQUENCY) {
throw new RuntimeException("A node has a frequency > "
+ FormatSpec.MAX_TERMINAL_FREQUENCY

View file

@ -277,7 +277,7 @@ public final class FusionDictionary implements Iterable<WordProperty> {
}
/**
* Sanity check for a PtNode array.
* Validity check for a PtNode array.
*
* This method checks that all PtNodes in a node array are ordered as expected.
* If they are, nothing happens. If they aren't, an exception is thrown.

View file

@ -37,7 +37,7 @@ import java.util.Random;
public class UserHistoryDictionaryTestsHelper {
/**
* Locale prefix for generating dummy locales for tests.
* Locale prefix for generating placeholder locales for tests.
*/
public static final String TEST_LOCALE_PREFIX = "test-";