summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/typst-library/src/text/lang.rs8
-rw-r--r--crates/typst-library/src/text/smartquote.rs4
-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
-rw-r--r--tests/ref/figure-localization-el.png (renamed from tests/ref/figure-localization-gr.png)bin966 -> 966 bytes
-rw-r--r--tests/ref/smartquote-el.png (renamed from tests/ref/smartquote-gr.png)bin2008 -> 2008 bytes
-rw-r--r--tests/suite/model/figure.typ4
-rw-r--r--tests/suite/text/smartquote.typ4
8 files changed, 10 insertions, 10 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
diff --git a/tests/ref/figure-localization-gr.png b/tests/ref/figure-localization-el.png
index 51597968..51597968 100644
--- a/tests/ref/figure-localization-gr.png
+++ b/tests/ref/figure-localization-el.png
Binary files differ
diff --git a/tests/ref/smartquote-gr.png b/tests/ref/smartquote-el.png
index 56770fc5..56770fc5 100644
--- a/tests/ref/smartquote-gr.png
+++ b/tests/ref/smartquote-el.png
Binary files differ
diff --git a/tests/suite/model/figure.typ b/tests/suite/model/figure.typ
index 19e81116..58ba2b2a 100644
--- a/tests/suite/model/figure.typ
+++ b/tests/suite/model/figure.typ
@@ -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: [Ένας κύκλος.],
diff --git a/tests/suite/text/smartquote.typ b/tests/suite/text/smartquote.typ
index fe398b7a..4940d11b 100644
--- a/tests/suite/text/smartquote.typ
+++ b/tests/suite/text/smartquote.typ
@@ -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 ---