Skip to content
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

Simplifying messages / translations + small changes #488

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

tadeubas
Copy link
Contributor

@tadeubas tadeubas commented Dec 6, 2024

What is this PR for?

  • Simplified the below translations to just "Failed to load" :
"Failed to load PSBT",
"Failed to load address",
"Failed to load key",
"Failed to load message",
"Failed to load mnemonic",
"Failed to load output descriptor",
"Failed to load passphrase",
  • Removed translations for extreme rare error messages (some in firmware.py):
"Maximum length exceeded (%s)",
"invalid public key",
"Invalid bootloader" ,
"Firmware exceeds max size",
  • Reuse of function status_text on firmware.py
  • Added try / except block around function that could raise an exception without informing the user in firmware.py
  • Fixed very long key / passphrase not showing properly at the proceed screen on m5stickv
  • Fixed key / passphrase not checking for too long input using keypad
  • Usage of ValueError instead of flash_error when loading too long input for key / passphrase
  • Usage of flash_error instead of flash_message for error messages on bkp encrypted mnemonic
  • New poetry poe task alias for wonder-mv: simulator-mv

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Docs update
  • Other

Copy link
Collaborator

@jdlcdl jdlcdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've read all changes here and have done random testing of these in simulator and on amigo. All seems ok to me.


Just a thought for a future commit (or future pr as it might be out-of-scope for this pr).

  • multiple display.flash_text() calls in firmware.py are for errors rather than informative text, so perhaps display might appreciate a method like "display.flash_error()" as exists in pages.init so that it's obvious that firmware upgrade failed (before message disappears).

@tadeubas
Copy link
Contributor Author

tadeubas commented Dec 7, 2024

I agree, we should use the error color when an error appear in firmware.py. And sure, this can be done in another PR

Copy link
Member

@odudex odudex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great clean up and refactor! Congrats and thank you!

@odudex odudex merged commit 3b6f2d9 into selfcustody:develop Dec 9, 2024
5 checks passed
@tadeubas tadeubas deleted the translations-simplify branch December 12, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants