diff --git a/crates/typst-library/src/layout/columns.rs b/crates/typst-library/src/layout/columns.rs index f2f3644172..d24c39000e 100644 --- a/crates/typst-library/src/layout/columns.rs +++ b/crates/typst-library/src/layout/columns.rs @@ -5,27 +5,21 @@ use crate::engine::Engine; use crate::foundations::{elem, Content, NativeElement, Packed, Show, StyleChain}; use crate::layout::{BlockElem, Length, Ratio, Rel}; -/// Separates a region into multiple equally sized columns. +/// 領域を等幅の複数段に分割。 /// -/// The `column` function lets you separate the interior of any container into -/// multiple columns. It will currently not balance the height of the columns. -/// Instead, the columns will take up the height of their container or the -/// remaining height on the page. Support for balanced columns is planned for -/// the future. +/// `column`関数を用いることで、あらゆるコンテナの内部を複数の段に分割することができます。 +/// 現在、段の高さのバランスは取れません。 +/// その代わり、段はコンテナの高さかページの残りの高さを占めます。 +/// バランスを取った段組は将来的にサポートされる予定です。 /// -/// # Page-level columns { #page-level } -/// If you need to insert columns across your whole document, use the `{page}` -/// function's [`columns` parameter]($page.columns) instead. This will create -/// the columns directly at the page-level rather than wrapping all of your -/// content in a layout container. As a result, things like -/// [pagebreaks]($pagebreak), [footnotes]($footnote), and [line -/// numbers]($par.line) will continue to work as expected. For more information, -/// also read the [relevant part of the page setup -/// guide]($guides/page-setup-guide/#columns). +/// # ページレベルの段組 { #page-level } +/// ドキュメント全体に渡る段組を挿入する必要がある場合は、代わりに`{page}`関数の[`columns`パラメーター]($page.columns)を使用してください。 +/// これは、レイアウトコンテナ内のコンテンツ全てをラップするのではなく、ページレベルの段組を直接作成します。 +/// 結果として[改ページ]($pagebreak)、[脚注]($footnote)および[行番号]($par.line)のようなものが期待通りの動作をし続けます。 +/// より詳しくは[ページのセットアップガイドの関連する項目]($guides/page-setup-guide/#columns)をご覧ください。 /// -/// # Breaking out of columns { #breaking-out } -/// To temporarily break out of columns (e.g. for a paper's title), use -/// parent-scoped floating placement: +/// # 段組の中断 { #breaking-out } +/// (例えば、論文のタイトルのように)段組を一時的に中断する場合は、親スコープでのフロート配置を使用してください。 /// /// ```example:single /// #set page(columns: 2, height: 150pt) @@ -43,17 +37,17 @@ use crate::layout::{BlockElem, Length, Ratio, Rel}; /// ``` #[elem(Show)] pub struct ColumnsElem { - /// The number of columns. + /// 段数。 #[positional] #[default(NonZeroUsize::new(2).unwrap())] pub count: NonZeroUsize, - /// The size of the gutter space between each column. + /// 段間。 #[resolve] #[default(Ratio::new(0.04).into())] pub gutter: Rel, - /// The content that should be layouted into the columns. + /// 段内にレイアウトされるべきコンテンツ。 #[required] pub body: Content, } @@ -66,13 +60,12 @@ impl Show for Packed { } } -/// Forces a column break. +/// 強制的な段の区切り。 /// -/// The function will behave like a [page break]($pagebreak) when used in a -/// single column layout or the last column on a page. Otherwise, content after -/// the column break will be placed in the next column. +/// この関数は、一段組やページ中の最後の段で使用されると、[改ページ]($pagebreak)と同じように振る舞います。 +/// それ以外の場合、段区切りの後のコンテンツは次の段に配置されます。 /// -/// # Example +/// # 例 /// ```example /// #set page(columns: 2) /// Preliminary findings from our @@ -91,8 +84,7 @@ impl Show for Packed { /// ``` #[elem(title = "Column Break")] pub struct ColbreakElem { - /// If `{true}`, the column break is skipped if the current column is - /// already empty. + /// `{true}`の場合、現在の段がすでに空のとき段区切りが実行されません。 #[default(false)] pub weak: bool, } diff --git a/website/translation-status.json b/website/translation-status.json index 63cd9215d7..c6d52f6742 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -106,8 +106,8 @@ "/docs/reference/layout/angle/": "translated", "/docs/reference/layout/block/": "translated", "/docs/reference/layout/box/": "translated", - "/docs/reference/layout/colbreak/": "untranslated", - "/docs/reference/layout/columns/": "untranslated", + "/docs/reference/layout/colbreak/": "translated", + "/docs/reference/layout/columns/": "translated", "/docs/reference/layout/direction/": "translated", "/docs/reference/layout/fraction/": "translated", "/docs/reference/layout/grid/": "untranslated",