Repository navigation
fix(sidebar): Japanese/Korean font fallbacks and better ja translations - #1197
Merged
Merged
Conversation
The sidebar font stack only lists Chinese fonts (PingFang SC, Microsoft YaHei) before the generic fallback, so on Windows/Linux systems without a matching UI font, Japanese and Korean text is rendered with Chinese glyph shapes (e.g. Microsoft YaHei for Japanese). Add dedicated stacks for ja and ko that prefer the platform's native fonts (Hiragino / Yu Gothic / Meiryo / Noto Sans JP, Apple SD Gothic Neo / Malgun Gothic / Noto Sans KR) and apply them with :lang(). setLocale() now sets <html lang> so the selectors (and assistive tech) know the current language. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Several strings were literal translations that read awkwardly or were misleading, e.g. "Mine" in the message center was "私の" (a bare possessive); it now reads "自分のコメント" (my comments). Also align the admin panel name between the widget and the sidebar, and use the wording commonly seen in Japanese UIs (ログイン, メールアドレス, 再試行, ...). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
qwqcode
approved these changes
Oct 11, 2026
Member
|
Thanks for recreating this and for your patience! I've reviewed the changes, including locale switching and the Japanese/Korean font stacks. Tests and builds passed, and I've squash-merged the PR with your authorship preserved. Thanks again for improving Artalk's Japanese translations and font support. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recreated from #1183, which could not be reopened because I had deleted my fork. Same two commits, unchanged; they still merge cleanly into current
master.Problem
Fonts. The sidebar (message center / dashboard iframe) uses a font stack that lists only Chinese fonts before the generic fallback:
Latin fonts such as Segoe UI and Helvetica have no CJK glyphs, so on Windows/Linux Japanese text is rendered with Microsoft YaHei (Simplified Chinese). Japanese users see Chinese glyph shapes for kanji and kana that look "off". Korean has the same issue. (The comment widget itself is fine because it uses
font-family: inherit.)Translations. Some
jastrings are literal translations that read awkwardly or are misleading. For example the message center tab "Mine" was私の(a bare possessive, "my …"); a Japanese reader can't tell what it refers to.Changes
ui/artalk-sidebar/src/style/_variables.scss,style.scss: add$font-family-ja/$font-family-kostacks that prefer the platform's native fonts (Hiragino Sans / Yu Gothic / Meiryo / Noto Sans JP, Apple SD Gothic Neo / Malgun Gothic / Noto Sans KR) and apply them with:lang(ja)/:lang(ko). Other locales are untouched.ui/artalk-sidebar/src/i18n.ts:setLocale()now setsdocument.documentElement.lang, so the:lang()selectors (and assistive technology) know the current language.index.htmlhas nolangattribute today.ui/artalk-sidebar/src/i18n/ja.ts,ui/artalk/src/i18n/ja.ts: wording fixes, e.g.mine: 私の → 自分のコメントctrlCenter(sidebar): コントロールセンター → 管理画面 (matches the widget's "ダッシュボード" intent; en is "Admin")noContent: コンテンツなし → データがありませんsignIn/signUp: サインイン / サインアップ → ログイン / アカウント登録email: Eメール → メールアドレスlistRetry: 再試行するにはクリック → 再試行pendingMsg,waitSeconds,forgetPassword,cacheWarm,payload, … (see diff)Verified with
prettier --checkusing the repo config. No behavior change other than thelangattribute and the language-scoped font stacks.🤖 Generated with Claude Code
https://claude.ai/code/session_01EfBin5pdPhVGNJy5B2NkK2