diff options
| author | Kevin K. <xkeviota@gmail.com> | 2024-10-28 15:42:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-28 14:42:25 +0000 |
| commit | 33a035ee0d9f12bc858e9a0cd37942eda1693798 (patch) | |
| tree | baffeef4332dc0492d588fcdae04cc276998ddd9 /crates | |
| parent | 45377f25ecbd33b56ec5fcd1335f20b13488a93d (diff) | |
Fix wrong Greek and Ukrainian language codes (#5261)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-library/src/text/lang.rs | 8 | ||||
| -rw-r--r-- | crates/typst-library/src/text/smartquote.rs | 4 | ||||
| -rw-r--r-- | crates/typst-library/translations/el.txt (renamed from crates/typst-library/translations/gr.txt) | 0 | ||||
| -rw-r--r-- | crates/typst-library/translations/uk.txt (renamed from crates/typst-library/translations/ua.txt) | 0 |
4 files changed, 6 insertions, 6 deletions
diff --git a/crates/typst-library/src/text/lang.rs b/crates/typst-library/src/text/lang.rs index 64ab1a7c..d63dddb7 100644 --- a/crates/typst-library/src/text/lang.rs +++ b/crates/typst-library/src/text/lang.rs @@ -26,7 +26,7 @@ const TRANSLATIONS: [(&str, &str); 36] = [ translation!("fi"), translation!("fr"), translation!("gl"), - translation!("gr"), + translation!("el"), translation!("he"), translation!("hu"), translation!("is"), @@ -47,7 +47,7 @@ const TRANSLATIONS: [(&str, &str); 36] = [ translation!("sv"), translation!("tl"), translation!("tr"), - translation!("ua"), + translation!("uk"), translation!("vi"), translation!("zh-TW"), translation!("zh"), @@ -74,7 +74,7 @@ impl Lang { pub const FRENCH: Self = Self(*b"fr ", 2); pub const GALICIAN: Self = Self(*b"gl ", 2); pub const GERMAN: Self = Self(*b"de ", 2); - pub const GREEK: Self = Self(*b"gr ", 2); + pub const GREEK: Self = Self(*b"el ", 2); pub const HEBREW: Self = Self(*b"he ", 2); pub const HUNGARIAN: Self = Self(*b"hu ", 2); pub const ICELANDIC: Self = Self(*b"is ", 2); @@ -93,7 +93,7 @@ impl Lang { pub const SPANISH: Self = Self(*b"es ", 2); pub const SWEDISH: Self = Self(*b"sv ", 2); pub const TURKISH: Self = Self(*b"tr ", 2); - pub const UKRAINIAN: Self = Self(*b"ua ", 2); + pub const UKRAINIAN: Self = Self(*b"uk ", 2); pub const VIETNAMESE: Self = Self(*b"vi ", 2); /// Return the language code as an all lowercase string slice. diff --git a/crates/typst-library/src/text/smartquote.rs b/crates/typst-library/src/text/smartquote.rs index 5917550d..925e86d6 100644 --- a/crates/typst-library/src/text/smartquote.rs +++ b/crates/typst-library/src/text/smartquote.rs @@ -247,8 +247,8 @@ impl<'s> SmartQuotes<'s> { "es" if matches!(region, Some("ES") | None) => ("“", "”", "«", "»"), "hu" | "pl" | "ro" => ("’", "’", "„", "”"), "no" | "nb" | "nn" if alternative => low_high, - "ru" | "no" | "nb" | "nn" | "ua" => ("’", "’", "«", "»"), - "gr" => ("‘", "’", "«", "»"), + "ru" | "no" | "nb" | "nn" | "uk" => ("’", "’", "«", "»"), + "el" => ("‘", "’", "«", "»"), "he" => ("’", "’", "”", "”"), _ if lang.dir() == Dir::RTL => ("’", "‘", "”", "“"), _ => default, diff --git a/crates/typst-library/translations/gr.txt b/crates/typst-library/translations/el.txt index 34aa3c44..34aa3c44 100644 --- a/crates/typst-library/translations/gr.txt +++ b/crates/typst-library/translations/el.txt diff --git a/crates/typst-library/translations/ua.txt b/crates/typst-library/translations/uk.txt index 30b409a6..30b409a6 100644 --- a/crates/typst-library/translations/ua.txt +++ b/crates/typst-library/translations/uk.txt |
