-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Show character count in password generator dialog #10940
Show character count in password generator dialog #10940
Conversation
Displays the number of characters in the password field in the password generator dialog. This fixes keepassxreboot#10858.
@@ -6888,6 +6888,14 @@ Do you want to overwrite it?</source> | |||
<source>Special Characters</source> | |||
<translation type="unfinished"></translation> | |||
</message> | |||
<message> | |||
<source>passwordLength</source> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a translatable string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yah that should be marked not translated
</size> | ||
</property> | ||
<property name="text"> | ||
<string>passwordLength</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. This should get overwritten at runtime with the slot function. Or is there a case where that doesn't happen? When I opened up the password generator there were already characters in the password field and the slot for the character count label fired and changed the text on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A string in the .ui
file will get automatically translated to passwordLength
. Someone just opened an issue to Transifex and asked what this text is. The default string should be something that can be translated, or maybe an empty string if it's going to be filled at runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually thought it was just the string that appeared in the editor. I was basing it off the other labels in that row and they didn't have translations either:
<widget class="QLabel" name="strengthLabel">
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="text">
<string comment="Password strength">strength</string> <----- here
</property>
<widget class="QLabel" name="entropyLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>entropy</string> <------- here
</property>
Do we need translations for these as well? And does the translation tool generate entries for these? Or would I need to add them manually? I haven't worked too much with translations before so this is kind of new for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No actions required
Displays the number of characters in the password field in the password generator dialog. This fixes keepassxreboot#10858.
Displays the number of characters in the password field in the password generator dialog. This fixes #10858.
* upstream/develop: (57 commits) Fix typos in tooltips from EditEntryWidgetBrowser.ui Refactor: separate GUI sources from core sources Database key settings: fix UI bug tests: gui: Fix NULL dereference in GUI tests Docs: explain how to generate passwords with the browser extension (keepassxreboot#9242) Fix a couple more Qt 5.15 deprecation warnings (keepassxreboot#10953) Update URLs to Chrome Web Store page for `KeePassXC-Browser` extension Update browser extension icon states in documentation (keepassxreboot#10875) Fix сentering icon and text on buttons Fix backup file path substitution Verify USB listener callback handle Refactor Database Settings (keepassxreboot#9485) Fix all Qt 5.15 deprecation warnings (keepassxreboot#7783) Passkey importer: fix file picker parent Require Qt >= 5.12 Passkeys: Fix showing correct username in the reports Show character count in password generator dialog (keepassxreboot#10940) Increase the time interval for window show workaround Snap: Remove $HOME access from keepassxc-proxy Correct libusb usage on FreeBSD (keepassxreboot#10736) ... # Conflicts: # src/CMakeLists.txt # src/core/Database.cpp # src/core/Database.h
This adds a new label called "Characters" to the password generator dialog that displays the number of characters in the password text field. This makes it easy to figure out how many characters are in the password if the user enters or deletes characters from the generated password.
This fixes #10858.
Screenshots
Testing strategy
I piggy-backed off the existing entropy tests and verified that the length in the new password label is the same as the expected length.
Type of change