The Chinese want a translated version of <https://...
# compose-web
s
The Chinese want a translated version of https://stefan-oltmann.de/oni-seed-browser/ I worked on that, even included a font (Noto Sans UI) that contains the chars, but it still shows up a a broken character (this rectangle). (Only the world traits are translated yet.) Is a Chinese i18n supposed to work or is this known as currently broken?
1
If I copy these values to deepl the translation looks correct. So nothing broken there. https://github.com/StefanOltmann/oni-seed-browser/blob/main/app/src/commonMain/composeResources/values-zh-rTW/strings.xml
o
I tried to find Noto Sans UI font, but I don't see it here https://fonts.google.com/noto/ I think it should work if you try to add https://fonts.google.com/noto/specimen/Noto+Sans+SC as a fallback font. Also, there is a "Type tester" to check if the glyphs are available in the font https://fonts.google.com/noto/specimen/Noto+Sans/tester
🙏 1
s
Thank you. Looks like Noto Sans UI indeed does not include that chars as Noto Sans SC (whooping 11 MB per TTF) work.
s
also try adding lang="zh-CN" (or whatever the language code for Chinese (Simplified) is) to the translated pages. That'll help make sure the kanji is rendered the "Chinese" way, not the Japanese/Taiwanese/Korean way (the differences are subtle but can be noticed by nativesあ)
To the root of the HTML page or to the elements in Chinese.
s
I use "zh-CN" (simplified chinese) as "zh", so it falls back to that if the user has some of the other chinese flavors (expect TW)
For Korean there seems to be a separate Noto Sans Korean TTF (6 mb)
These files are pretty huge, so I'm just looking into subsetting/stripping/trimming them. Not a lot of options to do that. https://github.com/zachleat/glyphhanger looks promising. I'm thinking of putting this into a GitHub Action run.
s
I mean, you're not supposed to ship the whole thing in web scenarios. E.g. if you use Google Fonts API, it'll only download characters that are needed when needed. Or is it a Compose app?
Oh shoot it's a Compose app, I forgot that we're in #C01F2HV7868 😅 🤦‍♂️
😁 1
The
glyphhanger
one looks great, it can even make julienne fries
s
I’ll report how it works. 😄