Skip to content

Commit 3ef71ab

Browse files
authored
Merge branch 'main' into translate/toml
2 parents e19ad88 + cecaa0d commit 3ef71ab

File tree

9 files changed

+124
-173
lines changed

9 files changed

+124
-173
lines changed

crates/typst-library/src/loading/cbor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::loading::{DataSource, Load};
1010
///
1111
/// 読み込むファイルには有効なCBORによるシリアル化データが含まれていなければなりません。
1212
/// マッピングはTypstの辞書に変換され、シーケンスはTypstの配列に変換されます。
13-
/// 文字列やブール値はTypstの対応する値に変換され
13+
/// 文字列やブール値はTypstの対応する型に変換され
1414
/// ヌル値(`null`、`~`、または空の``)は`{none}`に、
1515
/// 数値は整数値であれば整数型に、
1616
/// そうでなければ浮動小数点数型に変換されます。
@@ -20,7 +20,7 @@ use crate::loading::{DataSource, Load};
2020
#[func(scope, title = "CBOR")]
2121
pub fn cbor(
2222
engine: &mut Engine,
23-
/// CBORファイルへの[パス]($syntax/#paths)、または生のCBORバイト列。
23+
/// CBORファイルの[パス]($syntax/#paths)、または生のCBORバイト列。
2424
source: Spanned<DataSource>,
2525
) -> SourceResult<Value> {
2626
let data = source.load(engine.world)?;

crates/typst-library/src/loading/csv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use crate::loading::{DataSource, Load, Readable};
2626
#[func(scope, title = "CSV")]
2727
pub fn csv(
2828
engine: &mut Engine,
29-
/// CSVファイルへの[パス]($syntax/#paths)、または生のCSVバイト列。
29+
/// CSVファイルの[パス]($syntax/#paths)、または生のCSVバイト列。
3030
source: Spanned<DataSource>,
3131
/// CSVファイルの列を区切る区切り文字。
3232
/// 単一のASCII文字でなければなりません。

crates/typst-library/src/loading/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::loading::{DataSource, Load, Readable};
1111
/// 読み込むファイルにはオブジェクトや配列などの有効なJSON値が含まれていなければなりません。
1212
/// JSONオブジェクトはTypstの辞書に変換され、
1313
/// JSON配列はTypstの配列に変換されます。
14-
/// 文字列やブール値はTypstの対応する値に変換され、`null`は`{none}`に、
14+
/// 文字列やブール値はTypstの対応する型に変換され、`null`は`{none}`に、
1515
/// 数値は整数値であれば整数型に、
1616
/// そうでなければ浮動小数点数型に変換されます。
1717
///
@@ -51,7 +51,7 @@ use crate::loading::{DataSource, Load, Readable};
5151
#[func(scope, title = "JSON")]
5252
pub fn json(
5353
engine: &mut Engine,
54-
/// JSONファイルへの[パス]($syntax/#paths)、または生のJSONバイト列。
54+
/// JSONファイルの[パス]($syntax/#paths)、または生のJSONバイト列。
5555
source: Spanned<DataSource>,
5656
) -> SourceResult<Value> {
5757
let data = source.load(engine.world)?;

crates/typst-library/src/loading/read.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ use crate::foundations::{func, Cast};
77
use crate::loading::Readable;
88
use crate::World;
99

10-
/// Reads plain text or data from a file.
10+
/// ファイルからプレーンテキストやデータを読み込む。
1111
///
12-
/// By default, the file will be read as UTF-8 and returned as a [string]($str).
12+
/// デフォルトでは、ファイルはUTF-8として読み込まれ、[文字列]($str)として返されます。
1313
///
14-
/// If you specify `{encoding: none}`, this returns raw [bytes] instead.
14+
/// `{encoding: none}`を指定した場合、この関数は代わりに生の[bytes]を返します。
1515
///
16-
/// # Example
16+
/// #
1717
/// ```example
1818
/// An example for a HTML file: \
1919
/// #let text = read("example.html")
@@ -25,13 +25,13 @@ use crate::World;
2525
#[func]
2626
pub fn read(
2727
engine: &mut Engine,
28-
/// Path to a file.
28+
/// ファイルのパス。
2929
///
30-
/// For more details, see the [Paths section]($syntax/#paths).
30+
/// 詳細については、[パスのセクション]($syntax/#paths)を参照してください。
3131
path: Spanned<EcoString>,
32-
/// The encoding to read the file with.
32+
/// ファイルを読み込む際に使用するエンコーディング。
3333
///
34-
/// If set to `{none}`, this function returns raw bytes.
34+
/// `{none}`に設定すると、この関数は生のバイトを返します。
3535
#[named]
3636
#[default(Some(Encoding::Utf8))]
3737
encoding: Option<Encoding>,
@@ -47,9 +47,9 @@ pub fn read(
4747
})
4848
}
4949

50-
/// An encoding of a file.
50+
/// ファイルのエンコーディング。
5151
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Cast)]
5252
pub enum Encoding {
53-
/// The Unicode UTF-8 encoding.
53+
/// Unicode UTF-8エンコーディング。
5454
Utf8,
5555
}

crates/typst-library/src/math/attach.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,12 @@ pub struct LimitsElem {
124124
pub inline: bool,
125125
}
126126

127-
/// Stretches a glyph.
127+
/// 字形を伸縮します。
128128
///
129-
/// This function can also be used to automatically stretch the base of an
130-
/// attachment, so that it fits the top and bottom attachments.
129+
/// この関数は、上部及び下部アタッチメントがフィットするように、自動的にアタッチメントのベースを伸縮させることにも使えます。
131130
///
132-
/// Note that only some glyphs can be stretched, and which ones can depend on
133-
/// the math font being used. However, most math fonts are the same in this
134-
/// regard.
131+
/// 伸縮可能な字形は限られており、どの字形が伸縮可能かは使用する数式フォントに依存することに注意してください。
132+
/// ただし、この点に関して多くの数式フォントで違いはありません。
135133
///
136134
/// ```example
137135
/// $ H stretch(=)^"define" U + p V $
@@ -141,12 +139,11 @@ pub struct LimitsElem {
141139
/// ```
142140
#[elem(Mathy)]
143141
pub struct StretchElem {
144-
/// The glyph to stretch.
142+
/// 伸縮させる字形。
145143
#[required]
146144
pub body: Content,
147145

148-
/// The size to stretch to, relative to the maximum size of the glyph and
149-
/// its attachments.
146+
/// 字形およびそのアタッチメントを基準とした伸縮の大きさ。
150147
#[resolve]
151148
#[default(Rel::one())]
152149
pub size: Rel<Length>,

0 commit comments

Comments
 (0)