Conversation
was blocked by #19426 and #19458 Summary of the issue: #19458 introduced Cambodian, but we need to document it's support in NVDA Additionally, unit tests are temporarily broken by #19458 causing an issue, with python/cpython#123853 as the root cause Description of user facing changes: Document cambodian support Description of developer facing changes: None Description of development approach: Introduced _LCIDS_TO_TRANSLATED_LOCALES_OVERRIDES in languageHandler.py to correctly map the Windows LCID for Khmer (Cambodian), addressing upstream issues in Python's locale mapping. [1] [2] Refactored type annotations throughout languageHandler.py to use modern Python syntax (e.g., str | None instead of Optional[str], list[str] instead of List[str]). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
There was a problem hiding this comment.
Pull request overview
This pull request merges changes from the beta branch to master, primarily adding support for the Cambodian language translation to NVDA. The language count has been updated from 55 to 56 languages, and the implementation includes both documentation updates and code changes to handle the Cambodian locale correctly.
Changes:
- Added Cambodian language translation support with proper LCID mapping
- Updated documentation to reflect 56 supported languages
- Modernized type hints from
typingmodule to built-in Python 3.10+ syntax
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| user_docs/en/userGuide.md | Updated language count from 55 to 56 and added Cambodian to the list of supported languages |
| user_docs/en/changes.md | Added release notes documenting the new Cambodian translation |
| source/languageHandler.py | Added LCID override for Cambodian (km_KH), updated copyright year to 2026, and modernized type hints to use built-in types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
|
|
||
| def getLanguageDescription(language: str) -> Optional[str]: | ||
| def getLanguageDescription(language: str) -> weakref.ReferenceType | None: |
There was a problem hiding this comment.
The return type annotation is incorrect. This function returns strings (e.g., at line 157 it returns _("User default") which is a string, and at line 179 it returns desc which is also a string). The type hint should be str | None, not weakref.ReferenceType | None. This appears to be an accidental error when updating the type hints from Optional[str] to modern syntax.
| def getLanguageDescription(language: str) -> weakref.ReferenceType | None: | |
| def getLanguageDescription(language: str) -> str | None: |
No description provided.