Added IT language support (#413)

This commit is contained in:
Marco Radocchia 2023-03-29 19:34:18 +02:00 committed by GitHub
parent 24e26b8c77
commit 9737d3b754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 0 deletions

View File

@ -284,6 +284,7 @@ impl LocalName for TableElem {
fn local_name(&self, lang: Lang) -> &'static str {
match lang {
Lang::GERMAN => "Tabelle",
Lang::ITALIAN => "Tabella",
Lang::ENGLISH | _ => "Table",
}
}

View File

@ -268,6 +268,7 @@ impl LocalName for EquationElem {
fn local_name(&self, lang: Lang) -> &'static str {
match lang {
Lang::GERMAN => "Gleichung",
Lang::ITALIAN => "Equazione",
Lang::ENGLISH | _ => "Equation",
}
}

View File

@ -183,6 +183,7 @@ impl LocalName for BibliographyElem {
fn local_name(&self, lang: Lang) -> &'static str {
match lang {
Lang::GERMAN => "Bibliographie",
Lang::ITALIAN => "Bibliografia",
Lang::ENGLISH | _ => "Bibliography",
}
}

View File

@ -87,6 +87,7 @@ impl LocalName for FigureElem {
fn local_name(&self, lang: Lang) -> &'static str {
match lang {
Lang::GERMAN => "Abbildung",
Lang::ITALIAN => "Figura",
Lang::ENGLISH | _ => "Figure",
}
}

View File

@ -141,6 +141,7 @@ impl LocalName for HeadingElem {
fn local_name(&self, lang: Lang) -> &'static str {
match lang {
Lang::GERMAN => "Abschnitt",
Lang::ITALIAN => "Sezione",
Lang::ENGLISH | _ => "Section",
}
}

View File

@ -180,6 +180,7 @@ impl LocalName for OutlineElem {
fn local_name(&self, lang: Lang) -> &'static str {
match lang {
Lang::GERMAN => "Inhaltsverzeichnis",
Lang::ITALIAN => "Indice",
Lang::ENGLISH | _ => "Contents",
}
}

View File

@ -517,6 +517,7 @@ pub struct Lang([u8; 3], u8);
impl Lang {
pub const ENGLISH: Self = Self(*b"en ", 2);
pub const GERMAN: Self = Self(*b"de ", 2);
pub const ITALIAN: Self = Self(*b"it ", 2);
/// Return the language code as an all lowercase string slice.
pub fn as_str(&self) -> &str {