Skip to content

Fix language variant display in settings and compose toolbar - #1559

Open
rschiang wants to merge 2 commits into
mastodon:developfrom
rschiang:patch-language-display
Open

Fix language variant display in settings and compose toolbar#1559
rschiang wants to merge 2 commits into
mastodon:developfrom
rschiang:patch-language-display

Conversation

@rschiang

Copy link
Copy Markdown
Contributor

This pull request fixes “Default Post Language” previews and improves the compose toolbar language indicator for language variants.

The first commit 69c364f addresses a trivial comparison error that resulted in language variants losing their preview in Settings.

The second commit f689a09 improves the language indicator in the compose toolbar so longer variant codes fit more cleanly using compact uppercase abbreviations, tighter leading, and small vertical padding.

OriginalImproved

Note: I didn’t opt for improving the multi-line legibility due to .lineSpacing being available only on iOS 26+ and there are only limited ways for me to tweak this without introducing too much complexity to code. I believe this PR strikes a good balance.

Please let me know if there’s comments or requests for improvements!

rschiang added 2 commits June 27, 2026 00:56
This commit fixes the preview of Default Post Language in
Mastodon iOS’ General Settings. Currently, the code matches
against `localeId` instead of `id`, which results in mismatches
for specific language variants (e.g., `ms-Arab` or `zh-TW`).

Changing the matching field fixes the issue.

Signed-off-by: Poren Chiang <poren@poren.tw>
This commit improves the presentation of language indicator
on the composing toolbar. Currently, language variants will be
forced to wrap into two lines (and in `ms-Arab`, three lines).
As we don’t have access to `lineHeight` before iOS 26 and
hence weren’t able to reduce that line gap, this commit improves
the situation by adding a slight vertical padding, tighter leading,
and packing language variants into 4-character abbriveation.

Signed-off-by: Poren Chiang <poren@poren.tw>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant