Add Latin translation (#4609)

This commit is contained in:
ssotoen 2024-08-05 12:01:57 +02:00 committed by GitHub
parent 33f13d7881
commit d769b21356
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 2 deletions

View File

@ -14,7 +14,7 @@ macro_rules! translation {
};
}
const TRANSLATIONS: [(&str, &str); 33] = [
const TRANSLATIONS: [(&str, &str); 34] = [
translation!("ar"),
translation!("ca"),
translation!("cs"),
@ -30,6 +30,7 @@ const TRANSLATIONS: [(&str, &str); 33] = [
translation!("hu"),
translation!("it"),
translation!("ja"),
translation!("la"),
translation!("nb"),
translation!("nl"),
translation!("nn"),
@ -75,6 +76,7 @@ impl Lang {
pub const HUNGARIAN: Self = Self(*b"hu ", 2);
pub const ITALIAN: Self = Self(*b"it ", 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 NYNORSK: Self = Self(*b"nn ", 2);
pub const POLISH: Self = Self(*b"pl ", 2);

View File

@ -196,7 +196,7 @@ impl<'s> SmartQuotes<'s> {
/// region as an all-uppercase ISO 3166-alpha2 code.
///
/// 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,
/// Hungarian, Polish, Romanian, Japanese, Traditional Chinese, Russian, and
/// Norwegian.
@ -225,6 +225,9 @@ impl<'s> SmartQuotes<'s> {
"fr" => ("\u{00A0}", "\u{00A0}", "«\u{00A0}", "\u{00A0}»"),
"fi" | "sv" if alternative => ("", "", "»", "»"),
"bs" | "fi" | "sv" => ("", "", "", ""),
"it" if alternative => default,
"la" if alternative => ("", "", "«\u{202F}", "\u{202F}»"),
"it" | "la" => ("", "", "«", "»"),
"es" if matches!(region, Some("ES") | None) => ("", "", "«", "»"),
"hu" | "pl" | "ro" => ("", "", "", ""),
"no" | "nb" | "nn" if alternative => low_high,

View 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

View File

@ -36,6 +36,14 @@
#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 ---
// Test single pair of quotes.
""