mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Fix wrong Greek and Ukrainian language codes (#5261)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
parent
45377f25ec
commit
33a035ee0d
@ -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.
|
||||
|
@ -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,
|
||||
|
Before Width: | Height: | Size: 966 B After Width: | Height: | Size: 966 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@ -244,9 +244,9 @@ We can clearly see that @fig-cylinder and
|
||||
caption: [Пятиугольник],
|
||||
)
|
||||
|
||||
--- figure-localization-gr ---
|
||||
--- figure-localization-el ---
|
||||
// Test Greek
|
||||
#set text(lang: "gr")
|
||||
#set text(lang: "el")
|
||||
#figure(
|
||||
circle(),
|
||||
caption: [Ένας κύκλος.],
|
||||
|
@ -30,8 +30,8 @@
|
||||
#set text(lang: "fi")
|
||||
"Hevonen ei syö kurkkusalaattia" oli ensimmäinen koskaan 'puhelimessa' lausuttu lause.
|
||||
|
||||
--- smartquote-gr ---
|
||||
#set text(lang: "gr")
|
||||
--- smartquote-el ---
|
||||
#set text(lang: "el")
|
||||
"Το άλογο δεν τρώει αγγουροσαλάτα" ήταν η πρώτη πρόταση που ειπώθηκε στο 'τηλέφωνο'.
|
||||
|
||||
--- smartquote-he ---
|
||||
|
Loading…
x
Reference in New Issue
Block a user