From 24ae446e34fbf8753bf6547023d74678c9c56569 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Fri, 25 Jul 2025 09:00:56 +0900 Subject: [PATCH 1/3] =?UTF-8?q?`/docs/reference/math/cases`=E3=81=AE?= =?UTF-8?q?=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/math/matrix.rs | 19 +++++++++---------- website/translation-status.json | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/crates/typst-library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs index b6c4654ed7..ee77af2add 100644 --- a/crates/typst-library/src/math/matrix.rs +++ b/crates/typst-library/src/math/matrix.rs @@ -216,11 +216,11 @@ pub struct MatElem { pub rows: Vec>, } -/// A case distinction. +/// 場合分け。 /// -/// Content across different branches can be aligned with the `&` symbol. +/// `&`記号を用いると異なる分岐に属するコンテンツを整列できます。 /// -/// # Example +/// # 例 /// ```example /// $ f(x, y) := cases( /// 1 "if" (x dot y)/2 <= 0, @@ -231,11 +231,10 @@ pub struct MatElem { /// ``` #[elem(Mathy)] pub struct CasesElem { - /// The delimiter to use. + /// 使用する区切り文字。 /// - /// Can be a single character specifying the left delimiter, in which case - /// the right delimiter is inferred. Otherwise, can be an array containing a - /// left and a right delimiter. + /// 一文字の場合は、右区切り文字を推論可能な左区切り文字を指定できます。 + /// それ以外の場合は、左右の区切り文字を有する配列が指定可能です。 /// /// ```example /// #set math.cases(delim: "[") @@ -244,7 +243,7 @@ pub struct CasesElem { #[default(DelimiterPair::BRACE)] pub delim: DelimiterPair, - /// Whether the direction of cases should be reversed. + /// 場合分けの向きを反転させるかどうか。 /// /// ```example /// #set math.cases(reverse: true) @@ -253,7 +252,7 @@ pub struct CasesElem { #[default(false)] pub reverse: bool, - /// The gap between branches. + /// 分岐間の間隔。 /// /// ```example /// #set math.cases(gap: 1em) @@ -263,7 +262,7 @@ pub struct CasesElem { #[default(DEFAULT_ROW_GAP.into())] pub gap: Rel, - /// The branches of the case distinction. + /// 場合分けで分岐させる子要素。 #[variadic] pub children: Vec, } diff --git a/website/translation-status.json b/website/translation-status.json index 81e95d57ce..36838c3eb5 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -82,7 +82,7 @@ "/docs/reference/math/attach/": "untranslated", "/docs/reference/math/binom/": "untranslated", "/docs/reference/math/cancel/": "untranslated", - "/docs/reference/math/cases/": "untranslated", + "/docs/reference/math/cases/": "translated", "/docs/reference/math/class/": "untranslated", "/docs/reference/math/equation/": "translated", "/docs/reference/math/frac/": "translated", From 01fd8282cc937b8fd047a40a41ab0bdd1a3b96fd Mon Sep 17 00:00:00 2001 From: ultimatile Date: Mon, 28 Jul 2025 10:05:26 +0900 Subject: [PATCH 2/3] Update crates/typst-library/src/math/matrix.rs Co-authored-by: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> --- crates/typst-library/src/math/matrix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs index ee77af2add..e8dc2455e7 100644 --- a/crates/typst-library/src/math/matrix.rs +++ b/crates/typst-library/src/math/matrix.rs @@ -262,7 +262,7 @@ pub struct CasesElem { #[default(DEFAULT_ROW_GAP.into())] pub gap: Rel, - /// 場合分けで分岐させる子要素。 + /// 場合分けの各分岐を表す子要素。 #[variadic] pub children: Vec, } From 0f85613b7556dfc9a4be3670cea13d838126cf14 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Tue, 29 Jul 2025 11:03:57 +0900 Subject: [PATCH 3/3] Update crates/typst-library/src/math/matrix.rs Co-authored-by: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> --- crates/typst-library/src/math/matrix.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typst-library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs index e8dc2455e7..69a706233f 100644 --- a/crates/typst-library/src/math/matrix.rs +++ b/crates/typst-library/src/math/matrix.rs @@ -233,8 +233,8 @@ pub struct MatElem { pub struct CasesElem { /// 使用する区切り文字。 /// - /// 一文字の場合は、右区切り文字を推論可能な左区切り文字を指定できます。 - /// それ以外の場合は、左右の区切り文字を有する配列が指定可能です。 + /// 単一の文字で左区切り文字を指定する場合、右区切り文字は自動的に推論されます。 + /// それ以外の場合は、左区切り文字と右区切り文字を含む配列を指定します。 /// /// ```example /// #set math.cases(delim: "[")