-
-
Notifications
You must be signed in to change notification settings - Fork 670
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
Firmware translations #3206
Firmware translations #3206
Conversation
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.
Good work! Left some suggestions mainly for the C part.
I'd prefer if |
Thanks for the feedback, I noted this down. |
aa44046
to
28d37bc
Compare
Recent changes include:
SIze considerations:
The biggest question currently:
|
eeb9b3c
to
4c2db33
Compare
4c2db33
to
90ec318
Compare
52632ba
to
ff7f8b5
Compare
4f91a14
to
f46e7e6
Compare
Transforming into regular PR, so it is ready for review. There is still quite some work, but I think it makes sense to stop now and analyze the status and create clear requirements for what should be done. Current high-level status:
Some things/considerations/questions that are missing and should be prioritized:
|
e2f2c5c
to
c9e8dad
Compare
dd9ff7c
to
ff2aa20
Compare
d51e07f
to
a774a0b
Compare
Translation consideration with |
the previous spelling of "aliases" created completely new enum entries per Enum documentation: > However, an enum member can have other names associated with it. > Given two entries A and B with the same value (and A defined first), > B is an alias for the member A. By-value lookup of the value of A will > return the member A. By-name lookup of A will return the member A. > By-name lookup of B will also return the member A.
we've had multiple copies of this function all over the codebase, it's time to move it where it belongs
56695ea
to
6218bed
Compare
@prusnak can you please check the requested changes? We want to merge it today or tomorrow and it is blocked by them |
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.
rust side ACK
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.
changes from my earlier review were done
QA OK tested on TT and S3
|
Creates a proof of concept of translating firmware into various languages.
Currently includes
english
andczech
translations (done byChatGPT)
, mainly formodel R
.Build process
TREZOR_LANG=cs
will set the language for Czech both inmicropython
andRust
Translations infrastructure:
cs.json
, in individual sections connected to their contextcs.{py,rs}.mako
takes data fromJSON
and creates a {py,rs} file with all the translation symbols as constant strings variables/attributes (so we have a static check that all strings are defined)TODO:
micropython::const
andrust::trait
approaches)micropython
vsRust
division - there should be only one place of defining the translations mappingsTT
andTR
C
as well (there are certainly some strings, like error messages)bootloader
?Rust
side already)Fixes #991