mirror of
https://github.com/penpot/penpot.git
synced 2026-11-07 02:20:36 +00:00
Most browsers return "ja" rather than "ja-JP" in navigator.language. Because parse-locale expands "ja-JP" to ["ja_jp" "ja"] but keeps "ja" as ["ja"], using "ja_jp" causes autodetection to fall back to English. Normalize the Japanese locale identifier to "ja" and map jpn_JP.po to translation.ja.js, matching other single-region locales like Ukrainian. AI-assisted-by: gemini-3.8-flash