Skip to content

Commit 977fd2c

Browse files
authored
/docs/reference/model/numberingの翻訳 (#241)
Signed-off-by: Shunsuke Kimura <[email protected]>
1 parent e1ba807 commit 977fd2c

File tree

4 files changed

+36
-48
lines changed

4 files changed

+36
-48
lines changed

crates/typst-library/src/model/enum.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use crate::model::{
4141
/// ```
4242
///
4343
/// setルールを用いることで、
44-
/// すべてのリストを異なるナンバリングスタイルに簡単に切り替えることができます
44+
/// すべてのリストを異なる番号付けスタイルに簡単に切り替えることができます
4545
/// ```example
4646
/// #set enum(numbering: "a)")
4747
///
@@ -64,7 +64,7 @@ use crate::model::{
6464
/// この関数には専用の構文もあります。
6565
///
6666
/// - 行の先頭にプラス記号をつけると、
67-
/// 自動的にナンバリングされたリスト項目が作成されます
67+
/// 自動的に番号付けされたリスト項目が作成されます
6868
/// - 行の先頭に数字とピリオドを付けると、
6969
/// 明示的に番号を指定したリスト項目が作成されます。
7070
///
@@ -97,10 +97,10 @@ pub struct EnumElem {
9797
#[default(true)]
9898
pub tight: bool,
9999

100-
/// リストをどのようにナンバリングするかを指定します
101-
/// [ナンバリングパターンまたは関数]($numbering)を受け付けます。
100+
/// リストをどのように番号付けするかを指定します
101+
/// [番号付けパターンまたは関数]($numbering)を受け付けます。
102102
///
103-
/// ナンバリングのパターンに複数のカウント記号が含まれている場合
103+
/// 番号付けのパターンに複数のカウント記号が含まれている場合
104104
/// それらはネストされたリストに適用されます。
105105
/// 関数が指定された場合、`full`が`{false}`の場合は1つの引数を受け取り、`{true}`の場合は複数の引数を受け取ります。
106106
///
@@ -132,7 +132,7 @@ pub struct EnumElem {
132132
pub start: Smart<usize>,
133133

134134
/// 親リストの番号も含めて、
135-
/// 完全なナンバリングを表示するかどうかを指定します
135+
/// 完全な番号付けを表示するかどうかを指定します
136136
///
137137
///
138138
/// ```example
@@ -145,7 +145,7 @@ pub struct EnumElem {
145145
#[default(false)]
146146
pub full: bool,
147147

148-
/// このリストのナンバリングを逆順にするかどうかを指定します
148+
/// このリストの番号付けを逆順にするかどうかを指定します
149149
///
150150
/// ```example
151151
/// #set enum(reversed: true)
@@ -160,7 +160,7 @@ pub struct EnumElem {
160160
#[resolve]
161161
pub indent: Length,
162162

163-
/// 各項目のナンバリングと本文の間隔を指定します
163+
/// 各項目の番号付けと本文の間隔を指定します
164164
#[resolve]
165165
#[default(Em::new(0.5).into())]
166166
pub body_indent: Length,

crates/typst-library/src/model/numbering.rs

Lines changed: 26 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,15 @@ use crate::engine::Engine;
1111
use crate::foundations::{cast, func, Context, Func, Str, Value};
1212
use crate::text::Case;
1313

14-
/// Applies a numbering to a sequence of numbers.
14+
/// 順序に応じた番号付け。
1515
///
16-
/// A numbering defines how a sequence of numbers should be displayed as
17-
/// content. It is defined either through a pattern string or an arbitrary
18-
/// function.
16+
/// 番号付けは、一連の数値をコンテンツとしてどのように表示するかを定義します。
17+
/// これはパターン文字列または任意の関数によって指定されます。
1918
///
20-
/// A numbering pattern consists of counting symbols, for which the actual
21-
/// number is substituted, their prefixes, and one suffix. The prefixes and the
22-
/// suffix are repeated as-is.
19+
/// 番号付けパターンは、数値を置き換えるためのカウント記号、それらに付けるプレフィックス、そして1つのサフィックスから構成されます。
20+
/// プレフィックスとサフィックスは、そのままの形で繰り返し使用されます。
2321
///
24-
/// # Example
22+
/// #
2523
/// ```example
2624
/// #numbering("1.1)", 1, 2, 3) \
2725
/// #numbering("1.a.i", 1, 2) \
@@ -35,15 +33,12 @@ use crate::text::Case;
3533
/// )
3634
/// ```
3735
///
38-
/// # Numbering patterns and numbering functions
39-
/// There are multiple instances where you can provide a numbering pattern or
40-
/// function in Typst. For example, when defining how to number
41-
/// [headings]($heading) or [figures]($figure). Every time, the expected format
42-
/// is the same as the one described below for the
43-
/// [`numbering`]($numbering.numbering) parameter.
36+
/// # 番号付けのパターン指定と関数指定
37+
/// Typstではパターン指定または関数指定で番号付けを定義できる場面がいくつかあります。
38+
/// たとえば、[見出し]($heading)や[図表]($figure)などに番号を付ける際に使用します。
39+
/// いずれの場合も、指定の形式は後述する[`numbering`]($numbering.numbering)パラメーターと同じです。
4440
///
45-
/// The following example illustrates that a numbering function is just a
46-
/// regular [function] that accepts numbers and returns [`content`].
41+
/// 次の例は、番号付け用の関数が、単に数値を受け取って[`content`]を返す通常の[function]であることを示しています。
4742
/// ```example
4843
/// #let unary(.., last) = "|" * last
4944
/// #set heading(numbering: unary)
@@ -55,35 +50,27 @@ use crate::text::Case;
5550
pub fn numbering(
5651
engine: &mut Engine,
5752
context: Tracked<Context>,
58-
/// Defines how the numbering works.
53+
/// 番号付けの表示形式を定義します。
5954
///
60-
/// **Counting symbols** are `1`, `a`, `A`, `i`, `I`, `α`, `Α`, `一`, `壹`,
61-
/// `あ`, `い`, `ア`, `イ`, `א`, `가`, `ㄱ`, `*`, `١`, `۱`, `१`, `১`, `ক`,
62-
/// `①`, and `⓵`. They are replaced by the number in the sequence,
63-
/// preserving the original case.
55+
/// **カウント記号** として使用できるパターン文字は `1`, `a`, `A`, `i`, `I`, `α`, `Α`, `一`, `壹`, `あ`, `い`, `ア`, `イ`, `א`, `가`, `ㄱ`, `*`, `١`, `۱`, `१`, `১`, `ক`, `①`, `⓵`があります。
56+
/// これらの文字は、大文字・小文字を維持したまま、対応する順序の番号文字に置き換えられます。
6457
///
65-
/// The `*` character means that symbols should be used to count, in the
66-
/// order of `*`, `†`, `‡`, `§`, `¶`, `‖`. If there are more than six
67-
/// items, the number is represented using repeated symbols.
58+
/// 記号`*`は `*`, `†`, `‡`, `§`, `¶`, `‖`の順序で番号付けすることを意味します。
59+
/// 項目が6つ以上ある場合は、記号を繰り返し使用して番号を表現します。
6860
///
69-
/// **Suffixes** are all characters after the last counting symbol. They are
70-
/// repeated as-is at the end of any rendered number.
61+
/// **サフィックス** とは、最後のカウント記号の後ろに置く文字列です。
62+
/// これらは、生成された番号文字の末尾に、そのままの形で繰り返し表示されます。
7163
///
72-
/// **Prefixes** are all characters that are neither counting symbols nor
73-
/// suffixes. They are repeated as-is at in front of their rendered
74-
/// equivalent of their counting symbol.
64+
/// **プレフィックス** は、カウント記号でもサフィックスでもない文字列です。
65+
/// それぞれのカウント記号の前に、そのままの形で繰り返し表示されます。
7566
///
76-
/// This parameter can also be an arbitrary function that gets each number
77-
/// as an individual argument. When given a function, the `numbering`
78-
/// function just forwards the arguments to that function. While this is not
79-
/// particularly useful in itself, it means that you can just give arbitrary
80-
/// numberings to the `numbering` function without caring whether they are
81-
/// defined as a pattern or function.
67+
/// このパラメータには、数値を個別の引数として受け取る任意の関数も指定できます。
68+
/// 関数が与えられた場合、`numbering`関数はその引数をそのまま関数に渡します。
69+
/// これ自体は特に便利というわけではありませんが、番号付けがパターン指定であっても関数指定であっても、番号付けの定義を`numbering`関数に適用できるという意味を持ちます。
8270
numbering: Numbering,
83-
/// The numbers to apply the numbering to. Must be positive.
84-
///
85-
/// If `numbering` is a pattern and more numbers than counting symbols are
86-
/// given, the last counting symbol with its prefix is repeated.
71+
/// 番号付けを適用する対象の数値。正の数で与えてください。
72+
///
73+
/// 番号付けがパターン指定であり、カウント記号よりも多くの数値が指定された場合、最後のカウント記号とそのプレフィックスが繰り返されます。
8774
#[variadic]
8875
numbers: Vec<usize>,
8976
) -> SourceResult<Value> {

docs/glossary.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ description: |
2323
| figure | 図表 | キャプション付きの図表、`image`ではない |
2424
| table || データや情報を整理して表示する要素 |
2525
| supplement | 補足語 | [参照]($ref)されるものの種類を指す文字列、「図1」の「図」など |
26+
| numbering | 番号付け | [見出し]($heading/#parameters-numbering)[図表]($figure/#parameters-numbering)[番号付きリスト]($enum/#parameters-numbering)などの番号の書式を定義する方法 |

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"/docs/reference/model/heading/": "translated",
5454
"/docs/reference/model/link/": "translated",
5555
"/docs/reference/model/enum/": "translated",
56-
"/docs/reference/model/numbering/": "untranslated",
56+
"/docs/reference/model/numbering/": "translated",
5757
"/docs/reference/model/outline/": "untranslated",
5858
"/docs/reference/model/par/": "translated",
5959
"/docs/reference/model/parbreak/": "translated",

0 commit comments

Comments
 (0)