Repository navigation
i18n: Turkish section titles and in-sentence labels keep İ and ı - #3114
Merged
Merged
Conversation
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Ş").
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 |
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.
What this changes
Section titles are drawn upper case with
to_uppercase(), and tool names inside sentences are lowercased withto_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:iplus a combining dot above), and "Işık" became "işık"i18n::upper_labeltranslates 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_sentencelowercases with the Turkish rule in Turkish.widgets::section_titleand the print dialog's Advanced header useupper_label. Other languages are unchanged.How you verified it
cargo fmt --check-D warningson the crates I changed (cargo clippy -p pdfcraft-ui-egui --all-targets -- -D warnings)cargo test -p pdfcraft-ui-egui --lib i18n: 118 passed)cargo xtask layersandcargo xtask assets: not applicable, no crate boundary or asset touchedTests.
turkish_keeps_its_dotted_and_dotless_i_when_changing_casecovers 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
unwrap/expect/panic!/unreachable!/todo!outside testsunsafeProvenance
trconditions), not from another implementation's sourceSecurity
Parity and reach
parity/acrobat-features.toml: not applicable, no feature status changesAnything a reviewer should look at first
upper_labeldeliberately 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 İ.