-
Notifications
You must be signed in to change notification settings - Fork 192
translations: Add Simplified Chinese language support #215
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
base: dev
Are you sure you want to change the base?
Conversation
35ca41d
to
832b20d
Compare
Right now retro-go doesn't have the fonts to cover Chinese so it cannot work... Do you know what UTF-8 ranges are needed by your translations? I can probably update our fonts with them included. |
I used the font "fusion-pixel-font-12px-monospaced-ttf-v2025.08.11.zip" to generate "FusionPixel12.c" based on "font_converter.py". After compiling the firmware, I tested it on the device and encountered no issues. |
The game file names appear as garbled characters. If all Chinese characters are included, the compiled firmware would be too large. I think we should add the basic Level 1 Chinese character list of commonly used characters, totaling 3,755. |
Sorry, I accidentally closed the PR... But I’ve now updated the code to the latest version and changed [RG_LANG_CHS] = "中文" to [RG_LANG_CHS] = "简体中文". Using just "中文" was too vague and might have caused confusion, as someone might want to submit a PR related to Traditional Chinese. |
+1 |
Thanks for testing, I confirm that it works and it doesn't increase binary size so I've added it to all targets. So that's one problem solved. Because of the translations.h format, it would be a bit difficult to make Chinese support optional there. We'd have to add an So what needs to be conditional at compile time is only the inclusion of Chinese glyphs in fonts. |
Can you add the font to the PR? Both .c and .ttf in case we ever need to regenerate it. |
Added the fusion-pixel-12px-monospaced-zh_hans font and the converted font, which includes the first-level Chinese characters of the Chinese National Standard and the characters used in the Chinese translation.
The font and the converted font files have been committed. |
Modify [RG_LANG_DE] = "German" to [RG_LANG_DE] = "Deutsch" to resolve the merge conflict.
Sorry for the long delay! I've tested the changes and it seems to work fine, though my ability to test is very limited. The big glyph table certainly slows down text drawing, glyph lookup will need to be optimized eventually, but for now it seems to still be perfectly usable. I'd like to add flags to selectively enable Chinese support before merging the PR, may I commit to your branch? I'd likely add a flag that can be defined in the target's config.h to enable Chinese support, and maybe a flag for rg_tool.py like |
Thank you for taking the time to test. You are welcome to commit to my branch anytime. Additionally, I tested it on the esp32-p4, and the performance is much smoother. |
2b5f9ac
to
c545943
Compare
Add Simplified Chinese language support