mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Hebrew Translation + Smart Quotes (#4842)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
parent
95740ac2ab
commit
a2628ac970
@ -14,7 +14,7 @@ macro_rules! translation {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const TRANSLATIONS: [(&str, &str); 35] = [
|
const TRANSLATIONS: [(&str, &str); 36] = [
|
||||||
translation!("ar"),
|
translation!("ar"),
|
||||||
translation!("ca"),
|
translation!("ca"),
|
||||||
translation!("cs"),
|
translation!("cs"),
|
||||||
@ -27,6 +27,7 @@ const TRANSLATIONS: [(&str, &str); 35] = [
|
|||||||
translation!("fr"),
|
translation!("fr"),
|
||||||
translation!("gl"),
|
translation!("gl"),
|
||||||
translation!("gr"),
|
translation!("gr"),
|
||||||
|
translation!("he"),
|
||||||
translation!("hu"),
|
translation!("hu"),
|
||||||
translation!("is"),
|
translation!("is"),
|
||||||
translation!("it"),
|
translation!("it"),
|
||||||
@ -74,6 +75,7 @@ impl Lang {
|
|||||||
pub const GALICIAN: Self = Self(*b"gl ", 2);
|
pub const GALICIAN: Self = Self(*b"gl ", 2);
|
||||||
pub const GERMAN: Self = Self(*b"de ", 2);
|
pub const GERMAN: Self = Self(*b"de ", 2);
|
||||||
pub const GREEK: Self = Self(*b"gr ", 2);
|
pub const GREEK: Self = Self(*b"gr ", 2);
|
||||||
|
pub const HEBREW: Self = Self(*b"he ", 2);
|
||||||
pub const HUNGARIAN: Self = Self(*b"hu ", 2);
|
pub const HUNGARIAN: Self = Self(*b"hu ", 2);
|
||||||
pub const ICELANDIC: Self = Self(*b"is ", 2);
|
pub const ICELANDIC: Self = Self(*b"is ", 2);
|
||||||
pub const ITALIAN: Self = Self(*b"it ", 2);
|
pub const ITALIAN: Self = Self(*b"it ", 2);
|
||||||
|
@ -208,7 +208,7 @@ impl<'s> SmartQuotes<'s> {
|
|||||||
/// Swiss / Liechtensteinian German, Estonian, Icelandic, Italian, Latin,
|
/// Swiss / Liechtensteinian German, Estonian, Icelandic, Italian, Latin,
|
||||||
/// Lithuanian, Latvian, Slovak, Slovenian, Spanish, Bosnian, Finnish,
|
/// Lithuanian, Latvian, Slovak, Slovenian, Spanish, Bosnian, Finnish,
|
||||||
/// Swedish, French, Hungarian, Polish, Romanian, Japanese, Traditional
|
/// Swedish, French, Hungarian, Polish, Romanian, Japanese, Traditional
|
||||||
/// Chinese, Russian, and Norwegian.
|
/// Chinese, Russian, Norwegian, and Hebrew.
|
||||||
///
|
///
|
||||||
/// For unknown languages, the English quotes are used as fallback.
|
/// For unknown languages, the English quotes are used as fallback.
|
||||||
pub fn get(
|
pub fn get(
|
||||||
@ -242,6 +242,7 @@ impl<'s> SmartQuotes<'s> {
|
|||||||
"no" | "nb" | "nn" if alternative => low_high,
|
"no" | "nb" | "nn" if alternative => low_high,
|
||||||
"ru" | "no" | "nb" | "nn" | "ua" => ("’", "’", "«", "»"),
|
"ru" | "no" | "nb" | "nn" | "ua" => ("’", "’", "«", "»"),
|
||||||
"gr" => ("‘", "’", "«", "»"),
|
"gr" => ("‘", "’", "«", "»"),
|
||||||
|
"he" => ("’", "’", "”", "”"),
|
||||||
_ if lang.dir() == Dir::RTL => ("’", "‘", "”", "“"),
|
_ if lang.dir() == Dir::RTL => ("’", "‘", "”", "“"),
|
||||||
_ => default,
|
_ => default,
|
||||||
};
|
};
|
||||||
|
7
crates/typst/translations/he.txt
Normal file
7
crates/typst/translations/he.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
figure = איור
|
||||||
|
table = טבלה
|
||||||
|
equation = משוואה
|
||||||
|
bibliography = רשימת מקורות
|
||||||
|
heading = חלק
|
||||||
|
outline = תוכן עניינים
|
||||||
|
raw = קטע מקור
|
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Loading…
x
Reference in New Issue
Block a user