Skip to content

i18n: Turkish section titles and in-sentence labels keep İ and ı - #3114

Merged
echelon merged 1 commit into
storytold:mainfrom
ogzhnklvz:fix/turkish-letter-case
Oct 18, 2026
Merged

echelon merged 1 commit into
storytold:mainfrom
ogzhnklvz:fix/turkish-letter-case

Conversation

@ogzhnklvz

Copy link
Copy Markdown
Contributor

What this changes

Section titles are drawn upper case with to_uppercase(), and tool names inside sentences are lowercased with to_lowercase() (in_sentence). Rust's case mapping knows no language, and Turkish has a dotted and a dotless i (i ↔ İ, ı ↔ I), so with the Turkish catalog:

  • "Gelişmiş" (Advanced) was shown as GELIŞMIŞ instead of GELİŞMİŞ, and "İmzalar" as İMZALAR only by luck
  • "İmza" inside a sentence became "i̇mza" (an i plus a combining dot above), and "Işık" became "işık"

i18n::upper_label translates a title and upper-cases it with the Turkish rule when the label has a Turkish row. A label without one is still English and keeps the English rule, so it never reads "LİNKS". in_sentence lowercases with the Turkish rule in Turkish. widgets::section_title and the print dialog's Advanced header use upper_label. Other languages are unchanged.

How you verified it

  • cargo fmt --check
  • clippy with -D warnings on the crates I changed (cargo clippy -p pdfcraft-ui-egui --all-targets -- -D warnings)
  • tests pass on the crates I changed (cargo test -p pdfcraft-ui-egui --lib i18n: 118 passed)
  • cargo xtask layers and cargo xtask assets: not applicable, no crate boundary or asset touched

Tests. turkish_keeps_its_dotted_and_dotless_i_when_changing_case covers titles, an untranslated title and in-sentence labels in Turkish and English. It failed before the fix (left: "GELIŞMIŞ", right: "GELİŞMİŞ").

Never-crash

  • No new unwrap/expect/panic!/unreachable!/todo! outside tests
  • No indexing or slicing; the mapping works char by char
  • No unsafe
  • Any crash this fixes has a small synthetic regression test: not applicable, display-only

Provenance

  • No asset from an Adobe product
  • No font files committed
  • No GPL/AGPL code copied in
  • Behaviour comes from Turkish orthography (Unicode SpecialCasing, tr conditions), not from another implementation's source
  • No new asset

Security

  • No path, MCP, control-channel or network change

Parity and reach

  • parity/acrobat-features.toml: not applicable, no feature status changes
  • Docs: no documented behaviour changes

Anything a reviewer should look at first

upper_label deliberately falls back to the English rule for a label with no Turkish row, so a not-yet-translated English title isn't misspelled with a dotted İ.

Section titles are drawn upper case through to_uppercase(), and tool names
inside sentences lowercased through to_lowercase(). Rust's case mapping knows
no language, so in Turkish "Gelişmiş" became "GELIŞMIŞ" and "İmza" became
"i̇mza" (i plus a combining dot). Turkish maps i ↔ İ and ı ↔ I.

upper_label() translates and upper-cases a title with the Turkish rule when
the label has a Turkish row (an untranslated label is still English and keeps
the English rule); in_sentence() lowercases with it. Other languages are
unchanged. The test failed before the fix ("GELIŞMIŞ").
@echelon
echelon merged commit 13c86b4 into storytold:main Oct 18, 2026
@echelon

echelon commented Oct 18, 2026

Copy link
Copy Markdown
Member

Thank you @ogzhnklvz! Proper İ/ı casing for Turkish section titles and labels, with the English fallback, is a nice polish fix. Landed. If you're not already there, come join us on Discord: https://discord.gg/artcraft

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.

2 participants