mirror of
https://github.com/typst/typst
synced 2025-05-15 01:25:28 +08:00
Add Latin translation (#4609)
This commit is contained in:
parent
33f13d7881
commit
d769b21356
@ -14,7 +14,7 @@ macro_rules! translation {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const TRANSLATIONS: [(&str, &str); 33] = [
|
const TRANSLATIONS: [(&str, &str); 34] = [
|
||||||
translation!("ar"),
|
translation!("ar"),
|
||||||
translation!("ca"),
|
translation!("ca"),
|
||||||
translation!("cs"),
|
translation!("cs"),
|
||||||
@ -30,6 +30,7 @@ const TRANSLATIONS: [(&str, &str); 33] = [
|
|||||||
translation!("hu"),
|
translation!("hu"),
|
||||||
translation!("it"),
|
translation!("it"),
|
||||||
translation!("ja"),
|
translation!("ja"),
|
||||||
|
translation!("la"),
|
||||||
translation!("nb"),
|
translation!("nb"),
|
||||||
translation!("nl"),
|
translation!("nl"),
|
||||||
translation!("nn"),
|
translation!("nn"),
|
||||||
@ -75,6 +76,7 @@ impl Lang {
|
|||||||
pub const HUNGARIAN: Self = Self(*b"hu ", 2);
|
pub const HUNGARIAN: Self = Self(*b"hu ", 2);
|
||||||
pub const ITALIAN: Self = Self(*b"it ", 2);
|
pub const ITALIAN: Self = Self(*b"it ", 2);
|
||||||
pub const JAPANESE: Self = Self(*b"ja ", 2);
|
pub const JAPANESE: Self = Self(*b"ja ", 2);
|
||||||
|
pub const LATIN: Self = Self(*b"la ", 2);
|
||||||
pub const LOWER_SORBIAN: Self = Self(*b"dsb", 3);
|
pub const LOWER_SORBIAN: Self = Self(*b"dsb", 3);
|
||||||
pub const NYNORSK: Self = Self(*b"nn ", 2);
|
pub const NYNORSK: Self = Self(*b"nn ", 2);
|
||||||
pub const POLISH: Self = Self(*b"pl ", 2);
|
pub const POLISH: Self = Self(*b"pl ", 2);
|
||||||
|
@ -196,7 +196,7 @@ impl<'s> SmartQuotes<'s> {
|
|||||||
/// region as an all-uppercase ISO 3166-alpha2 code.
|
/// region as an all-uppercase ISO 3166-alpha2 code.
|
||||||
///
|
///
|
||||||
/// Currently, the supported languages are: English, Czech, Danish, German,
|
/// Currently, the supported languages are: English, Czech, Danish, German,
|
||||||
/// Swiss / Liechtensteinian German, Estonian, Icelandic, Lithuanian,
|
/// Swiss / Liechtensteinian German, Estonian, Icelandic, Italian, Latin, Lithuanian,
|
||||||
/// Latvian, Slovak, Slovenian, Spanish, Bosnian, Finnish, Swedish, French,
|
/// Latvian, Slovak, Slovenian, Spanish, Bosnian, Finnish, Swedish, French,
|
||||||
/// Hungarian, Polish, Romanian, Japanese, Traditional Chinese, Russian, and
|
/// Hungarian, Polish, Romanian, Japanese, Traditional Chinese, Russian, and
|
||||||
/// Norwegian.
|
/// Norwegian.
|
||||||
@ -225,6 +225,9 @@ impl<'s> SmartQuotes<'s> {
|
|||||||
"fr" => ("‹\u{00A0}", "\u{00A0}›", "«\u{00A0}", "\u{00A0}»"),
|
"fr" => ("‹\u{00A0}", "\u{00A0}›", "«\u{00A0}", "\u{00A0}»"),
|
||||||
"fi" | "sv" if alternative => ("’", "’", "»", "»"),
|
"fi" | "sv" if alternative => ("’", "’", "»", "»"),
|
||||||
"bs" | "fi" | "sv" => ("’", "’", "”", "”"),
|
"bs" | "fi" | "sv" => ("’", "’", "”", "”"),
|
||||||
|
"it" if alternative => default,
|
||||||
|
"la" if alternative => ("“", "”", "«\u{202F}", "\u{202F}»"),
|
||||||
|
"it" | "la" => ("“", "”", "«", "»"),
|
||||||
"es" if matches!(region, Some("ES") | None) => ("“", "”", "«", "»"),
|
"es" if matches!(region, Some("ES") | None) => ("“", "”", "«", "»"),
|
||||||
"hu" | "pl" | "ro" => ("’", "’", "„", "”"),
|
"hu" | "pl" | "ro" => ("’", "’", "„", "”"),
|
||||||
"no" | "nb" | "nn" if alternative => low_high,
|
"no" | "nb" | "nn" if alternative => low_high,
|
||||||
|
7
crates/typst/translations/la.txt
Normal file
7
crates/typst/translations/la.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
figure = Descriptio
|
||||||
|
table = Tabula
|
||||||
|
equation = Equatio
|
||||||
|
bibliography = Conspectus librorum
|
||||||
|
heading = Caput
|
||||||
|
outline = Index capitum
|
||||||
|
raw = Exemplum
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 23 KiB |
@ -36,6 +36,14 @@
|
|||||||
#set text(lang: "ru")
|
#set text(lang: "ru")
|
||||||
"Лошадь не ест салат из огурцов" - это была первая фраза, сказанная по 'телефону'.
|
"Лошадь не ест салат из огурцов" - это была первая фраза, сказанная по 'телефону'.
|
||||||
|
|
||||||
|
#set text(lang: "it")
|
||||||
|
"Il cavallo non mangia insalata di cetrioli" è stata la prima frase pronunciata al 'telefono'.
|
||||||
|
|
||||||
|
#set text(lang: "la")
|
||||||
|
#set smartquote(alternative: true)
|
||||||
|
"Equus cucumeris sem non edit" prima sententia in 'telephono' prolata fuit.
|
||||||
|
#set smartquote(alternative: false)
|
||||||
|
|
||||||
--- smartquote-empty ---
|
--- smartquote-empty ---
|
||||||
// Test single pair of quotes.
|
// Test single pair of quotes.
|
||||||
""
|
""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user