From fbef55155edcdee9c8d5a91b45c812f44d067d82 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 12 Jun 2025 14:34:11 +0900 Subject: [PATCH 1/7] =?UTF-8?q?`/docs/reference/layout/move`=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/layout/transform.rs | 15 +++++++-------- website/translation-status.json | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/crates/typst-library/src/layout/transform.rs b/crates/typst-library/src/layout/transform.rs index 183df6098f..bc93a3bac8 100644 --- a/crates/typst-library/src/layout/transform.rs +++ b/crates/typst-library/src/layout/transform.rs @@ -7,13 +7,12 @@ use crate::layout::{ Abs, Alignment, Angle, BlockElem, HAlignment, Length, Ratio, Rel, VAlignment, }; -/// Moves content without affecting layout. +/// レイアウトに影響を与えないコンテンツの移動。 /// -/// The `move` function allows you to move content while the layout still 'sees' -/// it at the original positions. Containers will still be sized as if the -/// content was not moved. +/// `move`関数を用いると、コンテンツの元々の位置をレイアウトに「認識」させながら、そのコンテンツを移動させることができます。 +/// コンテナの大きさは、コンテンツが移動されていないかのように決定されます。 /// -/// # Example +/// # 例 /// ```example /// #rect(inset: 0pt, move( /// dx: 6pt, dy: 6pt, @@ -27,13 +26,13 @@ use crate::layout::{ /// ``` #[elem(Show)] pub struct MoveElem { - /// The horizontal displacement of the content. + /// コンテンツの水平方向の変位。 pub dx: Rel, - /// The vertical displacement of the content. + /// コンテンツの垂直方向の変位。 pub dy: Rel, - /// The content to move. + /// 移動させたいコンテンツ。 #[required] pub body: Content, } diff --git a/website/translation-status.json b/website/translation-status.json index 389cbd8b2c..6f7e2e2ba7 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -115,7 +115,7 @@ "/docs/reference/layout/layout/": "translated", "/docs/reference/layout/length/": "translated", "/docs/reference/layout/measure/": "untranslated", - "/docs/reference/layout/move/": "untranslated", + "/docs/reference/layout/move/": "translated", "/docs/reference/layout/pad/": "translated", "/docs/reference/layout/page/": "untranslated", "/docs/reference/layout/pagebreak/": "untranslated", From 1fe61129568443dcda7647cfc30663829afcb53c Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 12 Jun 2025 16:00:05 +0900 Subject: [PATCH 2/7] =?UTF-8?q?`/docs/reference/layout/rotate`=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/layout/transform.rs | 25 +++++++++----------- website/translation-status.json | 2 +- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/crates/typst-library/src/layout/transform.rs b/crates/typst-library/src/layout/transform.rs index bc93a3bac8..e9c1825860 100644 --- a/crates/typst-library/src/layout/transform.rs +++ b/crates/typst-library/src/layout/transform.rs @@ -45,12 +45,12 @@ impl Show for Packed { } } -/// Rotates content without affecting layout. +/// レイアウトに影響を与えないコンテンツの回転。 /// -/// Rotates an element by a given angle. The layout will act as if the element -/// was not rotated unless you specify `{reflow: true}`. +/// 要素を指定された角度だけ回転させます。 +/// `{reflow: true}`を指定しない限り、レイアウトは、その要素が回転していないかのように振る舞います。 /// -/// # Example +/// # 例 /// ```example /// #stack( /// dir: ltr, @@ -61,7 +61,7 @@ impl Show for Packed { /// ``` #[elem(Show)] pub struct RotateElem { - /// The amount of rotation. + /// 回転させる量。 /// /// ```example /// #rotate(-1.571rad)[Space!] @@ -70,11 +70,9 @@ pub struct RotateElem { #[positional] pub angle: Angle, - /// The origin of the rotation. + /// 回転の中心点。 /// - /// If, for instance, you wanted the bottom left corner of the rotated - /// element to stay aligned with the baseline, you would set it to `bottom + - /// left` instead. + /// 例えば、回転した要素の左下隅をベースラインに揃えたままにしたい場合、代わりに`bottom + left`を指定します。 /// /// ```example /// #set text(spacing: 8pt) @@ -89,11 +87,10 @@ pub struct RotateElem { #[default(HAlignment::Center + VAlignment::Horizon)] pub origin: Alignment, - /// Whether the rotation impacts the layout. + /// 回転がレイアウトに影響を与えるかどうか。 /// - /// If set to `{false}`, the rotated content will retain the bounding box of - /// the original content. If set to `{true}`, the bounding box will take the - /// rotation of the content into account and adjust the layout accordingly. + /// `{false}`に設定された場合、回転したコンテンツは元々のコンテンツのバウンディングボックスに留まります。 + /// `{true}`に設定された場合、バウンディングボックスはコンテンツの回転を考慮してレイアウトを調整します。 /// /// ```example /// Hello #rotate(90deg, reflow: true)[World]! @@ -101,7 +98,7 @@ pub struct RotateElem { #[default(false)] pub reflow: bool, - /// The content to rotate. + /// 回転させるコンテンツ。 #[required] pub body: Content, } diff --git a/website/translation-status.json b/website/translation-status.json index 6f7e2e2ba7..5c590d35f5 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -123,7 +123,7 @@ "/docs/reference/layout/ratio/": "translated", "/docs/reference/layout/relative/": "translated", "/docs/reference/layout/repeat/": "translated", - "/docs/reference/layout/rotate/": "untranslated", + "/docs/reference/layout/rotate/": "translated", "/docs/reference/layout/scale/": "untranslated", "/docs/reference/layout/skew/": "untranslated", "/docs/reference/layout/h/": "translated", From 0b989d680f2b73aeff0fc59f139f2c0a5102db5c Mon Sep 17 00:00:00 2001 From: ultimatile Date: Wed, 23 Jul 2025 09:17:24 +0900 Subject: [PATCH 3/7] =?UTF-8?q?`/docs/reference/layout/scale`=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/layout/transform.rs | 30 +++++++++----------- website/translation-status.json | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/crates/typst-library/src/layout/transform.rs b/crates/typst-library/src/layout/transform.rs index e9c1825860..78a8a92c67 100644 --- a/crates/typst-library/src/layout/transform.rs +++ b/crates/typst-library/src/layout/transform.rs @@ -111,11 +111,11 @@ impl Show for Packed { } } -/// Scales content without affecting layout. +/// レイアウトに影響を与えないコンテンツの拡大縮小。 /// -/// Lets you mirror content by specifying a negative scale on a single axis. +/// 単一の軸で負のスケールを指定することで、コンテンツを反転表示できます。 /// -/// # Example +/// # 例 /// ```example /// #set align(center) /// #scale(x: -100%)[This is mirrored.] @@ -123,17 +123,16 @@ impl Show for Packed { /// ``` #[elem(Show)] pub struct ScaleElem { - /// The scaling factor for both axes, as a positional argument. This is just - /// an optional shorthand notation for setting `x` and `y` to the same - /// value. + /// 位置引数として両方の軸の拡大縮小率を設定します。 + /// これは`x`と`y`を同じ値で設定する単なる省略記法です。 #[external] #[positional] #[default(Smart::Custom(ScaleAmount::Ratio(Ratio::one())))] pub factor: Smart, - /// The horizontal scaling factor. + /// 水平方向の拡大縮小率。 /// - /// The body will be mirrored horizontally if the parameter is negative. + /// 負の値が指定された場合は本文が水平方向に反転します。 #[parse( let all = args.find()?; args.named("x")?.or(all) @@ -141,14 +140,14 @@ pub struct ScaleElem { #[default(Smart::Custom(ScaleAmount::Ratio(Ratio::one())))] pub x: Smart, - /// The vertical scaling factor. + /// 垂直方向の拡大縮小率。 /// - /// The body will be mirrored vertically if the parameter is negative. + /// 負の値が指定された場合は本文が垂直方向に反転します。 #[parse(args.named("y")?.or(all))] #[default(Smart::Custom(ScaleAmount::Ratio(Ratio::one())))] pub y: Smart, - /// The origin of the transformation. + /// 変換の原点。 /// /// ```example /// A#box(scale(75%)[A])A \ @@ -158,11 +157,10 @@ pub struct ScaleElem { #[default(HAlignment::Center + VAlignment::Horizon)] pub origin: Alignment, - /// Whether the scaling impacts the layout. + /// 拡大縮小がレイアウトに影響を与えるかどうか。 /// - /// If set to `{false}`, the scaled content will be allowed to overlap - /// other content. If set to `{true}`, it will compute the new size of - /// the scaled content and adjust the layout accordingly. + /// `{false}`の場合、拡大縮小したコンテンツが他のコンテンツと重なることを許可します。 + /// `{true}`の場合、拡大縮小したコンテンツの新しい大きさを計算し、それに応じてレイアウトを調整します。 /// /// ```example /// Hello #scale(x: 20%, y: 40%, reflow: true)[World]! @@ -170,7 +168,7 @@ pub struct ScaleElem { #[default(false)] pub reflow: bool, - /// The content to scale. + /// 拡大縮小するコンテンツ。 #[required] pub body: Content, } diff --git a/website/translation-status.json b/website/translation-status.json index 5c590d35f5..2cd2c03964 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -124,7 +124,7 @@ "/docs/reference/layout/relative/": "translated", "/docs/reference/layout/repeat/": "translated", "/docs/reference/layout/rotate/": "translated", - "/docs/reference/layout/scale/": "untranslated", + "/docs/reference/layout/scale/": "translated", "/docs/reference/layout/skew/": "untranslated", "/docs/reference/layout/h/": "translated", "/docs/reference/layout/v/": "translated", From 8d1ba30a909d7877d89fb763d0e3ebd12d6b3d04 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Wed, 23 Jul 2025 09:44:46 +0900 Subject: [PATCH 4/7] =?UTF-8?q?`/docs/reference/layout/skew`=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/layout/transform.rs | 25 ++++++++++---------- website/translation-status.json | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/crates/typst-library/src/layout/transform.rs b/crates/typst-library/src/layout/transform.rs index 78a8a92c67..07789f0b0f 100644 --- a/crates/typst-library/src/layout/transform.rs +++ b/crates/typst-library/src/layout/transform.rs @@ -198,12 +198,12 @@ cast! { length: Length => ScaleAmount::Length(length), } -/// Skews content. +/// コンテンツのせん断変形。 /// -/// Skews an element in horizontal and/or vertical direction. The layout will -/// act as if the element was not skewed unless you specify `{reflow: true}`. +/// 水平方向または垂直方向、あるいは両方向に要素をせん断変形します。 +/// `{reflow: true}`を指定しない限り、レイアウトは要素がせん断変形を受けていないかのように振る舞います。 /// -/// # Example +/// # 例 /// ```example /// #skew(ax: -12deg)[ /// This is some fake italic text. @@ -211,7 +211,7 @@ cast! { /// ``` #[elem(Show)] pub struct SkewElem { - /// The horizontal skewing angle. + /// 水平方向のせん断角。 /// /// ```example /// #skew(ax: 30deg)[Skewed] @@ -220,7 +220,7 @@ pub struct SkewElem { #[default(Angle::zero())] pub ax: Angle, - /// The vertical skewing angle. + /// 垂直方向のせん断角。 /// /// ```example /// #skew(ay: 30deg)[Skewed] @@ -229,9 +229,9 @@ pub struct SkewElem { #[default(Angle::zero())] pub ay: Angle, - /// The origin of the skew transformation. + /// せん断変形の原点。 /// - /// The origin will stay fixed during the operation. + /// 操作中は原点が固定されます。 /// /// ```example /// X #box(skew(ax: -30deg, origin: center + horizon)[X]) X \ @@ -242,11 +242,10 @@ pub struct SkewElem { #[default(HAlignment::Center + VAlignment::Horizon)] pub origin: Alignment, - /// Whether the skew transformation impacts the layout. + /// せん断変形がレイアウトに影響を与えるかどうか。 /// - /// If set to `{false}`, the skewed content will retain the bounding box of - /// the original content. If set to `{true}`, the bounding box will take the - /// transformation of the content into account and adjust the layout accordingly. + /// `{false}`の場合、せん断変形されたコンテンツは元々のコンテンツのバウンディングボックスに留まります。 + /// `{true}`の場合、バウンディングボックスはコンテンツの変形を考慮してレイアウトを調整します。 /// /// ```example /// Hello #skew(ay: 30deg, reflow: true, "World")! @@ -254,7 +253,7 @@ pub struct SkewElem { #[default(false)] pub reflow: bool, - /// The content to skew. + /// せん断変形するコンテンツ。 #[required] pub body: Content, } diff --git a/website/translation-status.json b/website/translation-status.json index 2cd2c03964..541481cc04 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -125,7 +125,7 @@ "/docs/reference/layout/repeat/": "translated", "/docs/reference/layout/rotate/": "translated", "/docs/reference/layout/scale/": "translated", - "/docs/reference/layout/skew/": "untranslated", + "/docs/reference/layout/skew/": "translated", "/docs/reference/layout/h/": "translated", "/docs/reference/layout/v/": "translated", "/docs/reference/layout/stack/": "translated", From 1b7b26161521b8a51f817dfadbd61d87ab32329b Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 24 Jul 2025 07:51:13 +0900 Subject: [PATCH 5/7] Update crates/typst-library/src/layout/transform.rs Co-authored-by: Shunsuke KIMURA --- crates/typst-library/src/layout/transform.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/layout/transform.rs b/crates/typst-library/src/layout/transform.rs index 07789f0b0f..8bfa0bd1f6 100644 --- a/crates/typst-library/src/layout/transform.rs +++ b/crates/typst-library/src/layout/transform.rs @@ -124,7 +124,7 @@ impl Show for Packed { #[elem(Show)] pub struct ScaleElem { /// 位置引数として両方の軸の拡大縮小率を設定します。 - /// これは`x`と`y`を同じ値で設定する単なる省略記法です。 + /// これは`x`と`y`を同じ値で設定する省略記法です。 #[external] #[positional] #[default(Smart::Custom(ScaleAmount::Ratio(Ratio::one())))] From fa98e7e1823e2e3755f45c05f0ac96c5d974f34f Mon Sep 17 00:00:00 2001 From: ultimatile Date: Tue, 5 Aug 2025 21:51:59 +0900 Subject: [PATCH 6/7] Update crates/typst-library/src/layout/transform.rs --- crates/typst-library/src/layout/transform.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/typst-library/src/layout/transform.rs b/crates/typst-library/src/layout/transform.rs index 8bfa0bd1f6..b1a600084a 100644 --- a/crates/typst-library/src/layout/transform.rs +++ b/crates/typst-library/src/layout/transform.rs @@ -198,10 +198,10 @@ cast! { length: Length => ScaleAmount::Length(length), } -/// コンテンツのせん断変形。 +/// コンテンツのスキュー変形。 /// -/// 水平方向または垂直方向、あるいは両方向に要素をせん断変形します。 -/// `{reflow: true}`を指定しない限り、レイアウトは要素がせん断変形を受けていないかのように振る舞います。 +/// 水平方向または垂直方向、あるいは両方向に要素をスキュー(シアー)変形します。 +/// `{reflow: true}`を指定しない限り、レイアウトは要素がスキュー変形を受けていないかのように振る舞います。 /// /// # 例 /// ```example @@ -211,7 +211,7 @@ cast! { /// ``` #[elem(Show)] pub struct SkewElem { - /// 水平方向のせん断角。 + /// 水平方向のスキュー角。 /// /// ```example /// #skew(ax: 30deg)[Skewed] @@ -220,7 +220,7 @@ pub struct SkewElem { #[default(Angle::zero())] pub ax: Angle, - /// 垂直方向のせん断角。 + /// 垂直方向のスキュー角。 /// /// ```example /// #skew(ay: 30deg)[Skewed] @@ -229,7 +229,7 @@ pub struct SkewElem { #[default(Angle::zero())] pub ay: Angle, - /// せん断変形の原点。 + /// スキュー変形の原点。 /// /// 操作中は原点が固定されます。 /// @@ -242,9 +242,9 @@ pub struct SkewElem { #[default(HAlignment::Center + VAlignment::Horizon)] pub origin: Alignment, - /// せん断変形がレイアウトに影響を与えるかどうか。 + /// スキュー変形がレイアウトに影響を与えるかどうか。 /// - /// `{false}`の場合、せん断変形されたコンテンツは元々のコンテンツのバウンディングボックスに留まります。 + /// `{false}`の場合、スキュー変形されたコンテンツは元々のコンテンツのバウンディングボックスに留まります。 /// `{true}`の場合、バウンディングボックスはコンテンツの変形を考慮してレイアウトを調整します。 /// /// ```example @@ -253,7 +253,7 @@ pub struct SkewElem { #[default(false)] pub reflow: bool, - /// せん断変形するコンテンツ。 + /// スキュー変形するコンテンツ。 #[required] pub body: Content, } From cf774f1f7191fb7fec69af485be11fdbea4fe8d3 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Wed, 6 Aug 2025 14:26:27 +0900 Subject: [PATCH 7/7] Update website/translation-status.json --- website/translation-status.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/translation-status.json b/website/translation-status.json index 020284cfa7..431ee4faf3 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -115,7 +115,7 @@ "/docs/reference/layout/layout/": "translated", "/docs/reference/layout/length/": "translated", "/docs/reference/layout/measure/": "translated", - "/docs/reference/layout/move/": "translated", + "/docs/reference/layout/move/": "translated", "/docs/reference/layout/pad/": "translated", "/docs/reference/layout/page/": "translated", "/docs/reference/layout/pagebreak/": "translated",