Conversation
Choosing a language updated the setting and then asked for a restart: not one word on screen changed. It now relabels everything at once. The menus and the toolbar are built at startup, so they are rebuilt. Panels hold state -- diagnostics, test results -- so each relabels itself instead. Tab and dock titles are moved by looking the old text back up in the old dictionary, which leaves file and branch names alone. That lookup has to be told which keys to consider. In English "Editor" is a tab name, a dock title and an untranslated menu identifier all at once, and an unguided lookup lands on the untranslated one -- which reads as the language change simply not working. Rebuilding the toolbar waits for the outgoing one'"'"'s git scan first: that scan finishes by filling a combo box which is about to be deleted, and Qt aborts the process when it lands.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 62 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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.



Changing language without restarting
Choosing a language updated the setting and then asked for a restart: not one
word on screen changed. It now relabels everything at once.
rebuilding is both the simplest and the most complete way to relabel them.
state -- diagnostics, test results, a scan -- so each has a
retranslaterather than being torn down and rebuilt.
old dictionary and replaced with the new language's version of that key, which
leaves file and branch names untouched.
That lookup has to be told which keys to consider. In English "Editor" is a tab
name, a dock title and an untranslated menu identifier all at once, and an
unguided lookup lands on the untranslated one -- so the title comes back as
"Editor" and the change reads as simply not working. Only a named set of title
keys is considered, with a test that every one of them exists.
A thread outliving its widget, again
Rebuilding the toolbar has to wait for the outgoing one's git branch scan first:
that scan finishes by filling a combo box which is about to be deleted, and Qt
aborts the process when it lands. Naming the threads in an earlier change is
what made this a one-run diagnosis -- the abort message said
Toolbar_GitBranchWorkeroutright.Two test fixtures build a toolbar on a bare window, which never runs the real
window's close handler, so they wait for the scan themselves.
Quieting the embedded browser
QtWebEngine embeds a whole Chromium which writes its own messages to standard
error, such as
mf_video_encoder_util.cc: Set output type failedwhen it probesa hardware video encoder that will not take the settings. Chromium falls back on
its own and nothing is broken, but this editor pipes standard error into its
output pane, so it lands in front of the user. Chromium's log level is set to
fatal-only before QtWebEngine initialises, and a level the user set is left
alone.
Note that the flag is verified as being set correctly and not overriding an
existing choice; whether that particular line disappears has not been reproduced
here, since it needs a running browser tab.
Verification
ruff check .clean. 1798 tests pass on 3.11 and on 3.10.