Conversation
### Reverts PR Reverts #18354 Reverts #18490 Reverts #18402 ### Issues fixed <!-- Issues that will be closed by reverting, i.e. the issues introduced via the PR getting reverted --> Fixes #18519 ### Issues reopened <!-- Issues that will be re-opened by reverting, i.e. the issues that were fixed via the PR getting reverted --> Reopens #15905 ### Reason for revert The current implementation breaks NVDA remote and breaks add-on APIs ### Can this PR be reimplemented? If so, what is required for the next attempt - use truststore.SSLContext directly rather than source code wide injections. It is [unclear](https://truststore.readthedocs.io/en/latest/#using-truststore-with-requests) how to do that with requests. [this SO answer suggestions an option](https://stackoverflow.com/a/78265028). - perform the changes in an API breaking release, encourage authors to use `inject_into_ssl, extract_from_ssl` where required
Fixup of #18503 and #18270 Summary of the issue: The regex to check for unnamed string interpolations doesn't support the %% symbol, which escapes %. This leads to certain usages of it raising incorrect interpolation errors. File source/locale/tr/LC_MESSAGES/nvda.po: 1 error Message starting on line 10286 Original: "%s%%" Translated: "%%%s" Error: unnamed percent interpolations differ Expected: unnamed percent interpolations in this order: ['%s'] The regex for missing names for brace interpolations is not working. i.e. "{}" should raise an error without a name like "{name}". This causes issues where the order of the arguments change in the string. e.g. "Character: {}\nReplacement: {}" being translated to "Replacement: {}\nCharacter: {}" will result in the expected interpolation being in the wrong place. These should be fixed in the source .po files to add names to instances of "{}". Description of user facing changes: Adds a more rigourous check for interpolations using brace formats, which will reduce string errors in the UI.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR merges changes from the beta branch to master, which includes a major refactoring of SSL/TLS certificate handling, localization improvements, and various code quality enhancements. The key changes include removing the truststore dependency in favor of direct Windows certificate API usage, enhancing string interpolation validation in localization files, and improving translation string formatting throughout the codebase.
- Replaced
truststorelibrary with direct Windows certificate API calls for SSL/TLS certificate validation - Enhanced string interpolation checking in the l10nUtil module with improved regex patterns and error handling
- Updated string formatting throughout the codebase to use named parameters instead of positional ones
- Added new Bosnian locale files and comprehensive unit tests for localization utilities
Reviewed Changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| user_docs/en/changes.md | Removed changelog entries for SSL certificate and deprecated API changes |
| tests/unit/test_l10nUtil.py | Added comprehensive unit tests for string interpolation validation |
| source/utils/networking.py | Removed entire networking utilities module |
| source/updateCheck.py | Replaced networking utilities with inline certificate handling and urllib |
| source/locale/bs/symbols.dic | Added complete Bosnian symbols dictionary |
| source/locale/bs/characterDescriptions.dic | Added Bosnian character descriptions |
| source/l10nUtil.py | Enhanced regex patterns and error handling for string interpolation |
| source/gui/nvdaControls.py | Updated string formatting to use named parameters |
| source/gui/configProfiles.py | Updated string formatting to use named parameters |
| source/gui/addonStoreGui/controls/storeDialog.py | Refactored message formatting into static methods |
| source/gui/addonStoreGui/controls/messageDialogs.py | Updated to use refactored message formatting methods |
| source/gui/addonGui.py | Updated string formatting to use named parameters |
| source/globalCommands.py | Updated string formatting to use named parameters |
| source/core.py | Removed truststore initialization and updated string formatting |
| source/addonStore/network.py | Removed SSL certificate verification handling |
| source/addonStore/dataManager.py | Replaced networking utilities with direct requests calls |
| source/_remoteClient/transport.py | Simplified SSL context configuration |
| source/_remoteClient/server.py | Minor formatting cleanup |
| source/NVDAObjects/UIA/init.py | Updated string formatting to use named parameters |
| pyproject.toml | Removed truststore dependency |
Comments suppressed due to low confidence (4)
source/l10nUtil.py:87
- Missing space before 'most'. Should be '} desna vitičasta zagrada most'
def preprocessXliff(xliffPath: str, outputPath: str):
source/l10nUtil.py:119
- Missing space before 'char'. Should be ' oznaka za desno na lijevo char'
continue
source/l10nUtil.py:127
- Missing space before 'some'. Should be '➔ strelica koja pokazuje desno some'
elif targetText in (
source/l10nUtil.py:135
- Missing space before 'most'. Should be '« francuski lijevi navodnik most always'
segment.set("state", "initial")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.