summaryrefslogtreecommitdiff
path: root/library/src/math/mod.rs
diff options
context:
space:
mode:
authorpan93412 <pan93412@gmail.com>2023-04-27 19:16:27 +0800
committerGitHub <noreply@github.com>2023-04-27 13:16:27 +0200
commite0d59304055619f6834109168dfb02f9a895f333 (patch)
tree662b8aba6638b9650ad5890e23d934e66c282396 /library/src/math/mod.rs
parent86d7ac881b823990aea20dfabb2e04aa7c8141b2 (diff)
Add translation for Chinese (Traditional) (#1000)
Diffstat (limited to 'library/src/math/mod.rs')
-rw-r--r--library/src/math/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index 47c28d17..21e5d805 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -34,6 +34,7 @@ use ttf_parser::{GlyphId, Rect};
use typst::eval::{Module, Scope};
use typst::font::{Font, FontWeight};
use typst::model::Guard;
+use typst::util::option_eq;
use unicode_math_class::MathClass;
use self::ctx::*;
@@ -277,10 +278,11 @@ impl Count for EquationElem {
}
impl LocalName for EquationElem {
- fn local_name(&self, lang: Lang, _: Option<Region>) -> &'static str {
+ fn local_name(&self, lang: Lang, region: Option<Region>) -> &'static str {
match lang {
Lang::ARABIC => "معادلة",
Lang::BOKMÅL => "Ligning",
+ Lang::CHINESE if option_eq(region, "TW") => "方程式",
Lang::CHINESE => "等式",
Lang::CZECH => "Rovnice",
Lang::FRENCH => "Équation",