-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Use default flag name when flag is renamed to empty string #3826
base: main
Are you sure you want to change the base?
Conversation
Python Style Guide suggestion: anki/qt/aqt/browser/sidebar/tree.py Line 456 in 89b0748
Change the if new_name == "" to if not new_name
|
Thank you for contributing! This could be done in a simpler way. Instead of storing a translation, simply delete the entry for that key from the dictionary, so that the default translation is used instead. This would change less code, and ensure the text remains correct when the user switches interface language. |
I already do delete the dictionary entry from the Lines 67 to 74 in 8380131
When I tested it, the flag label did switch to the correct translation after I changed the language, which indicates to me that it is using the default value and not a stored value in the config. The reason why I also store the translations in I hope I correctly understood what you meant! If not please clarify further. |
Fixes #3818
Right click on a flag in the browser sidebar > Rename > Delete all of the text > Hit Enter to confirm.
After doing this, Anki will go back to using the default name of the flag, including using the correct translation if the user switches languages.