-
-
Couldn't load subscription status.
- Fork 7.3k
Description
Steps to reproduce the problem
- Post a toot from Mastodon on iOS with language set to a specific zh locale code, e.g.
zh-Hant. - Observe the post on Web.
Mastodon instance
mastodon.social
Mastodon version
v4.3.0-alpha.0+pr-28693-384ec56
Mastodon for iOS v2023.16 (6043)
Browser name and version
Safari Version 16.6 (18615.3.12.11.2)
Operating system
macOS 13.5.2 (22G91)
Technical details
Inspecting the generated HTML I can see
<div class="status__content__text status__content__text--visible translate" lang="zh"><p>文字</p></div>with lang="zh" being the problem there. The lang attribute should be marked with zh-tw to allow browsers to pick the right font.
Background
See #27081 for explainer on Han Unification.
Expected behaviour
The post is rendered in a font for zh-Hant
Actual behaviour
The post is rendered in a font for zh
Detailed description
(See technical details below)
Mastodon instance
mastodon.social
Mastodon version
v4.3.0-alpha.0+pr-28693-384ec56, Mastodon for iOS v2023.16 (6043)
Browser name and version
Safari Version 17.1.2 (19616.2.9.11.12)
Operating system
macOS 14.1.2
Technical details
This the same issue as #27081 but here the metadata of the example toot comes with lang=zh-Hant, instead of zh-TW. Given that zh-TW isn't a "valid locale", the fix in #27099 didn't fix it.
(Background: zh-TW is a "language + region" locale code, while zh-Hant is a "language + script" locale code.)