mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Remember the locale in the Suggest object (A1)
This will be necessary for uppercasing and titlecasing words correctly. Change-Id: I0f446a4c82bc482240ff730a2ad6586a61571d6b
This commit is contained in:
parent
a5cfeeb6ef
commit
8e17f6d93a
@ -91,16 +91,21 @@ public class Suggest {
|
||||
private boolean mIsAllUpperCase;
|
||||
private int mTrailingSingleQuotesCount;
|
||||
|
||||
// Locale used for upper- and title-casing words
|
||||
final private Locale mLocale;
|
||||
|
||||
private static final int MINIMUM_SAFETY_NET_CHAR_LENGTH = 4;
|
||||
|
||||
public Suggest(final Context context, final Locale locale) {
|
||||
initAsynchronously(context, locale);
|
||||
mLocale = locale;
|
||||
}
|
||||
|
||||
/* package for test */ Suggest(final Context context, final File dictionary,
|
||||
final long startOffset, final long length, final Locale locale) {
|
||||
final Dictionary mainDict = DictionaryFactory.createDictionaryForTest(context, dictionary,
|
||||
startOffset, length /* useFullEditDistance */, false, locale);
|
||||
mLocale = locale;
|
||||
mMainDictionary = mainDict;
|
||||
addOrReplaceDictionary(mDictionaries, DICT_KEY_MAIN, mainDict);
|
||||
initWhitelistAndAutocorrectAndPool(context, locale);
|
||||
|
Loading…
x
Reference in New Issue
Block a user