-
Notifications
You must be signed in to change notification settings - Fork 13
/docs/reference/layout/moveおよび/docs/reference/layout/rotateおよび/docs/reference/layout/scaleおよび/docs/reference/layout/skewの翻訳
#222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+48
−55
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fbef551
`/docs/reference/layout/move`の翻訳
ultimatile 1fe6112
`/docs/reference/layout/rotate`の翻訳
ultimatile 0b989d6
`/docs/reference/layout/scale`の翻訳
ultimatile 8d1ba30
`/docs/reference/layout/skew`の翻訳
ultimatile 1b7b261
Update crates/typst-library/src/layout/transform.rs
ultimatile fa98e7e
Update crates/typst-library/src/layout/transform.rs
ultimatile cdb88c5
Merge branch 'main' into translate-layout/transform
ultimatile cf774f1
Update website/translation-status.json
ultimatile File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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<Length>, | ||||||
|
|
||||||
| /// The vertical displacement of the content. | ||||||
| /// コンテンツの垂直方向の変位。 | ||||||
| pub dy: Rel<Length>, | ||||||
|
|
||||||
| /// The content to move. | ||||||
| /// 移動させたいコンテンツ。 | ||||||
| #[required] | ||||||
| pub body: Content, | ||||||
| } | ||||||
|
|
@@ -46,12 +45,12 @@ impl Show for Packed<MoveElem> { | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| /// 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, | ||||||
|
|
@@ -62,7 +61,7 @@ impl Show for Packed<MoveElem> { | |||||
| /// ``` | ||||||
| #[elem(Show)] | ||||||
| pub struct RotateElem { | ||||||
| /// The amount of rotation. | ||||||
| /// 回転させる量。 | ||||||
| /// | ||||||
| /// ```example | ||||||
| /// #rotate(-1.571rad)[Space!] | ||||||
|
|
@@ -71,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) | ||||||
|
|
@@ -90,19 +87,18 @@ 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]! | ||||||
| /// ``` | ||||||
| #[default(false)] | ||||||
| pub reflow: bool, | ||||||
|
|
||||||
| /// The content to rotate. | ||||||
| /// 回転させるコンテンツ。 | ||||||
| #[required] | ||||||
| pub body: Content, | ||||||
| } | ||||||
|
|
@@ -115,44 +111,43 @@ impl Show for Packed<RotateElem> { | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| /// 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.] | ||||||
| /// #scale(x: -100%, reflow: true)[This is mirrored.] | ||||||
| /// ``` | ||||||
| #[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`を同じ値で設定する単なる省略記法です。 | ||||||
ultimatile marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| #[external] | ||||||
| #[positional] | ||||||
| #[default(Smart::Custom(ScaleAmount::Ratio(Ratio::one())))] | ||||||
| pub factor: Smart<ScaleAmount>, | ||||||
|
|
||||||
| /// 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) | ||||||
| )] | ||||||
| #[default(Smart::Custom(ScaleAmount::Ratio(Ratio::one())))] | ||||||
| pub x: Smart<ScaleAmount>, | ||||||
|
|
||||||
| /// 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<ScaleAmount>, | ||||||
|
|
||||||
| /// The origin of the transformation. | ||||||
| /// 変換の原点。 | ||||||
| /// | ||||||
| /// ```example | ||||||
| /// A#box(scale(75%)[A])A \ | ||||||
|
|
@@ -162,19 +157,18 @@ 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]! | ||||||
| /// ``` | ||||||
| #[default(false)] | ||||||
| pub reflow: bool, | ||||||
|
|
||||||
| /// The content to scale. | ||||||
| /// 拡大縮小するコンテンツ。 | ||||||
| #[required] | ||||||
| pub body: Content, | ||||||
| } | ||||||
|
|
@@ -204,20 +198,20 @@ 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. | ||||||
| /// ] | ||||||
| /// ``` | ||||||
| #[elem(Show)] | ||||||
| pub struct SkewElem { | ||||||
| /// The horizontal skewing angle. | ||||||
| /// 水平方向のせん断角。 | ||||||
|
||||||
| /// 水平方向のせん断角。 | |
| /// 水平方向の傾斜角。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.