-
-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: better align access keys with the guidelines #843
base: main
Are you sure you want to change the base?
Conversation
While looking into adding mnemonics to the search bar in the main window, I have discovered that adding them to a We might consider adding a shortcut key to focus on the text box (Ctrl + F, for instance) and signal this in the placeholder text (‘Search Entries ({shortcut})’), but that is out of scope for this PR. Alternatively, we could add a buddied |
I apologise; I realised I have made this PR too soon, as there are still more commits I wish to make. I will reopen this when I am done. |
I have made all the modifications I wanted and updated the PR to reflect that. It is now ready for review. |
I apologize for the inconvenience - a large refactor was recently merged (#844) that has moved several files throughout the codebase. This was done in order to correct some deep issues with the project's layout and was performed now as it seemed to be the best opportunity (as of 3/6/25) to disrupt as few open PRs as possible. Unfortunately this PR is one that's been disrupted by this change. A rebase targeting I also noticed that the Ruff workflow was failing beforehand, please let me know if you'd like any help with that. |
This is the first time I have dealt with this issue, so apologies if it doesn't work the first time. Here goes. |
Kept: - `generic.apply_alt`: <ins>A</ins>pply (renamed to `generic.apply`) - `generic.cancel`: Cancel - `generic.done`: Done - `generic.delete`: Delete - `generic.edit_alt`: <ins>E</ins>dit (renamed to `generic.edit`) - `generic.overwrite`: Overwrite - `generic.rename_alt`: <ins>R</ins>ename (renamed to `generic.rename`) - `generic.skip_alt`: <ins>S</ins>kip (renamed to `generic.skip`) Removed: - `generic.apply`: Apply – **Reason:** Unused, and this should always have the mnemonic <ins>A</ins>pply by convention. - `generic.cancel_alt`: <ins>C</ins>ancel – **Reason:** The access key for Cancel is Esc which already works in TagStudio. - `generic.done_alt`: <ins>D</ins>one – **Reason:** Likewise to Cancel, the access key for Apply is Esc. - `generic.delete_alt`: <ins>D</ins>elete – **Reason:** Destructive actions should not have mnemonics, so as to avoid accidental activation. - `generic.edit`: Edit – **Reason:** Again, this should have mnemonics. - `generic.overwrite_alt`: <ins>O</ins>verwrite – **Reason:** Destructive action. - `generic.rename`: Rename – **Reason:** Unused. - `generic.skip`: Skip – **Reason:** Unused.
I have decided to also address the question of the Kept:
Removed:
|
Sorry, is this PR still on the way to getting merged? I totally understand if you're just busy with other things in the project, I'm just not sure how to interpret this silence. As far as I can tell, the failing check is due to the string changes I've made producing key mismatches across the different language .JSONs. I assume this can be fixed automatically? If not, I could go over all the language files and make the necessary changes manually. |
Yes, sorry about the delay! When I initially pulled this to review I noticed the new mnemonic underlines across the interface of the program, which led me to research what the default behavior of other programs is and how this might be able to be avoided. This led me to create #856 since macOS doesn't support keyboard mnemonics at all and that would at least prevent the UI from being cluttered on that system, but unfortunately I couldn't find anything useful to suggest regarding Qt's handling of mnemonics. It just feels a bit odd to have underlines across most of the UI text when other programs on Windows don't have to deal with this because the underlines only appear (outside of a menubar) when the ALT key is pressed. If there was a straightforward way to do that here then I wouldn't have any complaints, but so far I haven't been able to find any way to do that with Qt. One option I was considering was the ability to make mnemonic underlines a toggle in the settings, which would then use a similar "filtering" method to #856. But since the new settings menu in #859 hasn't been merged yet I also didn't want to tell you to add a setting that would immediately conflict with that PR.
I would appreciate if you could do that, I'm not sure if Weblate would handle doing it automatically very well and it would mean that the workflow checks would be failing on main in the meantime. |
Being able to always see mnemonics even when not holding Alt is a system setting in Windows. I wonder if it would be possible to make TagStudio only show them as long as Alt it held down while this is disabled? It would go around having to add a manual override on an app level.
Alright, I will do that. |
Now that I'm looking through the other language files, several of them are already missing lots of strings. I wonder why they weren't triggering a fail before…? |
The check validates that the format strings are correct (they use all the keys the english one uses and no others than those) not that all keys have translations. After all, we wouldn't want the checks to fail because a language isn't fully translated yet |
Added placeholders for new strings and removed now-unnecessary ones.
That should be it, then.
Ah, I see. That makes sense. |
Summary
Resolves #678.
Based on Microsoft's guidelines, I have…
_alt
strings, as some of them should always have mnemonics and others should never have themUnresolved issues:
Tasks Completed