Provide support for portuguese language (#525)
This commit is contained in:
parent
37eededc9d
commit
2dbbeaeb60
@ -283,10 +283,11 @@ impl<T: Into<Value>> From<Celled<T>> for Value {
|
||||
impl LocalName for TableElem {
|
||||
fn local_name(&self, lang: Lang) -> &'static str {
|
||||
match lang {
|
||||
Lang::FRENCH => "Tableau",
|
||||
Lang::CHINESE => "表",
|
||||
Lang::FRENCH => "Tableau",
|
||||
Lang::GERMAN => "Tabelle",
|
||||
Lang::ITALIAN => "Tabella",
|
||||
Lang::PORTUGUESE => "Tabela",
|
||||
Lang::RUSSIAN => "Таблица",
|
||||
Lang::ENGLISH | _ => "Table",
|
||||
}
|
||||
|
@ -267,10 +267,11 @@ impl Count for EquationElem {
|
||||
impl LocalName for EquationElem {
|
||||
fn local_name(&self, lang: Lang) -> &'static str {
|
||||
match lang {
|
||||
Lang::FRENCH => "Équation",
|
||||
Lang::CHINESE => "等式",
|
||||
Lang::FRENCH => "Équation",
|
||||
Lang::GERMAN => "Gleichung",
|
||||
Lang::ITALIAN => "Equazione",
|
||||
Lang::PORTUGUESE => "Equação",
|
||||
Lang::RUSSIAN => "Уравнение",
|
||||
Lang::ENGLISH | _ => "Equation",
|
||||
}
|
||||
|
@ -203,6 +203,7 @@ impl LocalName for BibliographyElem {
|
||||
Lang::GERMAN | Lang::FRENCH => "Bibliographie",
|
||||
Lang::CHINESE => "参考文献",
|
||||
Lang::ITALIAN => "Bibliografia",
|
||||
Lang::PORTUGUESE => "Bibliografia",
|
||||
Lang::RUSSIAN => "Библиография",
|
||||
Lang::ENGLISH | _ => "Bibliography",
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ impl LocalName for FigureElem {
|
||||
Lang::CHINESE => "图",
|
||||
Lang::GERMAN => "Abbildung",
|
||||
Lang::ITALIAN => "Figura",
|
||||
Lang::PORTUGUESE => "Figura",
|
||||
Lang::RUSSIAN => "Рисунок",
|
||||
Lang::ENGLISH | Lang::FRENCH | _ => "Figure",
|
||||
}
|
||||
|
@ -140,10 +140,11 @@ cast_from_value! {
|
||||
impl LocalName for HeadingElem {
|
||||
fn local_name(&self, lang: Lang) -> &'static str {
|
||||
match lang {
|
||||
Lang::FRENCH => "Chapitre",
|
||||
Lang::CHINESE => "小节",
|
||||
Lang::FRENCH => "Chapitre",
|
||||
Lang::GERMAN => "Abschnitt",
|
||||
Lang::ITALIAN => "Sezione",
|
||||
Lang::PORTUGUESE => "Seção",
|
||||
Lang::RUSSIAN => "Раздел",
|
||||
Lang::ENGLISH | _ => "Section",
|
||||
}
|
||||
|
@ -179,10 +179,11 @@ impl Show for OutlineElem {
|
||||
impl LocalName for OutlineElem {
|
||||
fn local_name(&self, lang: Lang) -> &'static str {
|
||||
match lang {
|
||||
Lang::FRENCH => "Table des matières",
|
||||
Lang::CHINESE => "目录",
|
||||
Lang::FRENCH => "Table des matières",
|
||||
Lang::GERMAN => "Inhaltsverzeichnis",
|
||||
Lang::ITALIAN => "Indice",
|
||||
Lang::PORTUGUESE => "Sumário",
|
||||
Lang::RUSSIAN => "Содержание",
|
||||
Lang::ENGLISH | _ => "Contents",
|
||||
}
|
||||
|
@ -517,10 +517,11 @@ pub struct Lang([u8; 3], u8);
|
||||
impl Lang {
|
||||
pub const CHINESE: Self = Self(*b"zh ", 2);
|
||||
pub const ENGLISH: Self = Self(*b"en ", 2);
|
||||
pub const GERMAN: Self = Self(*b"de ", 2);
|
||||
pub const RUSSIAN: Self = Self(*b"ru ", 2);
|
||||
pub const ITALIAN: Self = Self(*b"it ", 2);
|
||||
pub const FRENCH: Self = Self(*b"fr ", 2);
|
||||
pub const GERMAN: Self = Self(*b"de ", 2);
|
||||
pub const ITALIAN: Self = Self(*b"it ", 2);
|
||||
pub const PORTUGUESE: Self = Self(*b"pt ", 2);
|
||||
pub const RUSSIAN: Self = Self(*b"ru ", 2);
|
||||
|
||||
/// Return the language code as an all lowercase string slice.
|
||||
pub fn as_str(&self) -> &str {
|
||||
|
Loading…
x
Reference in New Issue
Block a user