Check system locale when picking up an initial SpellChecker.
Since Ia25e7b4f308778891929e31b8cbd741f6848cce4, the TSMS has picked up the first found spell checker no matter regardless of the system locale. The primary goal of this CL is to introduce a low-risk fix for the situation where two or more spell checker services are pre-installed but they are well different from each other in terms of supported languages. Solving the problem in more ambiguous and complicated situation is beyond the goal of this CL. With this CL, we still pick up the first found spell checker but also require the spell checker supports a certain locale. We will try several locales starting with the system locale to some fallback locales until we find one appropriate spell checker. If no spell checker is picked up in this process, we simply pick up the first one as we have done. Examples about what locales will be checked are: A. System locale: en_US 1. en_US 2. en_GB 3. en B. System locale: en 1. en 2. en_US 3. en_GB C. System locale: en_IN 1. en_IN 2. en_US 3. en_GB 4. en D. System locale: ja_JP 1. ja_JP 2. ja 3. en_US 4. en_GB 5. en E. System locale: fil_PH 1. fil_PH 2. fil 3. en_US 4. en_GB 5. en F. System locale: th_TH_TH 1. th_TH_TH 2. th_TH 3. th 4. en_US 5. en_GB 6. en Bug: 22042994 Change-Id: I094f1c33430f7904a1dac6167431d6df64a07212
Loading
Please register or sign in to comment