syt0r / Kanji-Dojo

Multiplatform application to memorize Japanese
GNU General Public License v3.0
156 stars 4 forks source link

Set text locale properly #91

Closed ghost closed 2 months ago

ghost commented 4 months ago

Some text is displayed in the wrong font if Japanese is not included in system languages. Unihan sucks. It's always you.

Related page: https://heistak.github.io/your-code-displays-japanese-wrong/

Workaround Add Japanese to system languages (must be above other CJK languages) or: Run shell commands from adb, Shizuku's rish, App Manager's terminal or elsewhere: ``` adb shell settings delete global settings_app_locale_opt_in_enabled ``` ``` adb shell settings put global settings_app_locale_opt_in_enabled false ``` Then set Kanji Dojo's language to Japanese in the app info or per-app language settings.

png

syt0r commented 3 months ago

Interesting, I have Japanese language as the 3rd language on my device and it shows Japanese version of kanji, but when I removed Japanese language from system settings app switched to Chinese versions

martinetd commented 3 months ago

Thanks for that commit, it fixes most of these!

I was about to confirm this fixes the issue on a stock android but tt looks like some text boxes (adding custom set) is still in chinese; most of the other places I checked (reviews etc) are correct now when they weren't though so as far as I'm concerned most of what I see all the time is now correct.

before: font

after: font_new

syt0r commented 3 months ago

@martinetd Oh, that's right, somehow this textfield was using wrong text style, thanks for letting me know