Skip to content

Commit

Permalink
Added RU language support (typst#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
frungl authored Mar 31, 2023
1 parent 9414d56 commit 00f11ae
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/src/layout/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ impl LocalName for TableElem {
match lang {
Lang::GERMAN => "Tabelle",
Lang::ITALIAN => "Tabella",
Lang::RUSSIAN => "Таблица",
Lang::ENGLISH | _ => "Table",
}
}
Expand Down
1 change: 1 addition & 0 deletions library/src/math/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ impl LocalName for EquationElem {
match lang {
Lang::GERMAN => "Gleichung",
Lang::ITALIAN => "Equazione",
Lang::RUSSIAN => "Уравнение",
Lang::ENGLISH | _ => "Equation",
}
}
Expand Down
1 change: 1 addition & 0 deletions library/src/meta/bibliography.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ impl LocalName for BibliographyElem {
match lang {
Lang::GERMAN => "Bibliographie",
Lang::ITALIAN => "Bibliografia",
Lang::RUSSIAN => "Библиография",
Lang::ENGLISH | _ => "Bibliography",
}
}
Expand Down
1 change: 1 addition & 0 deletions library/src/meta/figure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl LocalName for FigureElem {
match lang {
Lang::GERMAN => "Abbildung",
Lang::ITALIAN => "Figura",
Lang::RUSSIAN => "Рисунок",
Lang::ENGLISH | _ => "Figure",
}
}
Expand Down
1 change: 1 addition & 0 deletions library/src/meta/heading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ impl LocalName for HeadingElem {
match lang {
Lang::GERMAN => "Abschnitt",
Lang::ITALIAN => "Sezione",
Lang::RUSSIAN => "Раздел",
Lang::ENGLISH | _ => "Section",
}
}
Expand Down
1 change: 1 addition & 0 deletions library/src/meta/outline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ impl LocalName for OutlineElem {
match lang {
Lang::GERMAN => "Inhaltsverzeichnis",
Lang::ITALIAN => "Indice",
Lang::RUSSIAN => "Содержание",
Lang::ENGLISH | _ => "Contents",
}
}
Expand Down
1 change: 1 addition & 0 deletions src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 RUSSIAN: Self = Self(*b"ru ", 2);
pub const ITALIAN: Self = Self(*b"it ", 2);

/// Return the language code as an all lowercase string slice.
Expand Down

0 comments on commit 00f11ae

Please sign in to comment.