-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add Beta Localization Support for HDZERO Goggles Firmware #439
base: main
Are you sure you want to change the base?
Conversation
The language of a text "Source" in the "Source" tab changes when repowering the goggle. Yet some work to do.
I like the idea of putting the language options in the firmware menu instead of creating a new menu. |
Was able to find a person with actual hardware - firmware works and the sim issues are the same on there. |
|
Asian languages are really hard. I am from China and I plan to add only Chinese fonts. This means that every time I add a string, I need to update the fonts. |
Not exactly. One font in the four (4 different font sizes are used in the ui) sizes is sufficient. I haven’t experimented yet with the font loading, only used backup fonts. After adding a new string you just have to type one lv_i18n command to compile the .yml, and re-build the firmware. |
I did some Deepl translation and it kinda works. I as of now I solely rely on font-backups, but its not a rigid approach in any way shape or form. Issues to target are:
As for the first one, if it's fine with you i can add an additional command to parse all of the used symbols in translations and generate the fonts only with the needed values. So adding a new string would look like this: create a key - extract the key - write the key pair in english - write a value in any desired language - run a font-compile command. This way we won't have to store hundreds of megs of .c fonts in a repo, the output fonts will be quire small, and we will have to only store one font file to generate all the sizes. This could also be done during ./setup.sh. As for the font loader, if we do the compilation approach we won't require the loader since all of the symbols would be in one font. My goggles are being shipped, so when they arrive I'll test if including large font influences load time significantly. @ligenxxxx I'm pending your opinion! |
I plan to create PRs myself to implement multiple languages. #452 |
so should I continue working on this pr or from now on internalization is your job? |
You can wait for a while, let me try it first. |
This PR introduces beta localisation features to HDZERO goggles firmware.
Some added things include:
.yml
localization files.What works:
.yml
file, compiling the languages, and rebuilding the firmware.After compiling the code with new languages, changing the firmware language is as easy as adjusting any other setting and rebooting
Current issues that make this PR a beta: