Do not ignore locale CLDR file when locale symbol file is missing #14433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Found while investigating #14417; it does not fix it but it is related.
Summary of the issue:
In NVDA some languages do not have a
symbol.dic
file but have acldr.dic
file. Today, these are the following languages: 'af_ZA', 'am', 'as', 'gu', 'id', 'kok', 'ml', 'mni', 'ne', 'te', 'th', 'ur'.For these languages the symbols belonging to CLDR file (e.g. "☺") are reported in English rather than in the locale language.
This is because we detect if a language has no symbol file and in this case, we store it in
_noSymbolLocalesCache
and raise aLookupError
in the future, even if the language has a CLDR file.Description of user facing changes
Languages with no symbol file will be able to report CLDR in the locale language if available.
Description of development approach
Use two caches, one for languages with no symbol file and one for languages with no CLDR file.
Testing strategy:
test_processSpeechSymbol_withoutSymbolFile
fails.test_processSpeechSymbol_withoutSymbolFile
report the CLDR in English by modifying locally line 157 toself.assertEqual(
and running successfully the unit tests
cldr.dic
sound the same with eSpeak.Known issues with pull request:
CLDR symbols are still reported in English with eSpeak for Afrikaans and Portuguese (Portugal). This is because:
Since the solution to this issue is not trivial, I prefer discuss it in a separate issue and have the issue already fixed for the other languages. I guess that the issue would also be fixed for OneCore since I think that these voices are country-aware.
I have opened #14434 to track this specific issue with eSpeak Portuguese (Portugal) and Afrikaans.
Change log entries:
Bug fixes
Emojis should now be reported in more languages. (#14433)
Code Review Checklist: