Skip to content

Commit ea38318

Browse files
authored
Merge branch 'main' into translation-text/lorem
2 parents 093b03a + 739d975 commit ea38318

File tree

24 files changed

+292
-384
lines changed

24 files changed

+292
-384
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 貢献ガイドライン
22

33
> [!NOTE]
4-
> 当プロジェクトの[README](./README.md)や「[はじめに:Typst Japan Communityより](https://typst-jp.github.io/docs/)」、[Typst公式](https://typst.app/)[ライセンス](https://github.com/typst/typst/blob/main/LICENSE)[コントリビューション・ガイド](https://github.com/typst/typst/blob/main/CONTRIBUTING.md)も併せてご参照ください。
4+
> 当プロジェクトの[README](./README.md)や「[はじめに:Typst Japanese Communityより](https://typst-jp.github.io/docs/)」、[Typst公式](https://typst.app/)[ライセンス](https://github.com/typst/typst/blob/main/LICENSE)[コントリビューション・ガイド](https://github.com/typst/typst/blob/main/CONTRIBUTING.md)も併せてご参照ください。
55
66
Typst日本語ドキュメント翻訳プロジェクトにご興味をお持ちいただき、どうもありがとうございます。
77

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ use crate::engine::Engine;
66
use crate::foundations::{func, scope, Bytes, Value};
77
use crate::loading::{DataSource, Load};
88

9-
/// Reads structured data from a CBOR file.
9+
/// CBORファイルから構造化データを読み込む。
1010
///
11-
/// The file must contain a valid CBOR serialization. Mappings will be
12-
/// converted into Typst dictionaries, and sequences will be converted into
13-
/// Typst arrays. Strings and booleans will be converted into the Typst
14-
/// equivalents, null-values (`null`, `~` or empty ``) will be converted into
15-
/// `{none}`, and numbers will be converted to floats or integers depending on
16-
/// whether they are whole numbers.
11+
/// 読み込むファイルには有効なCBORによるシリアル化データが含まれていなければなりません。
12+
/// マッピングはTypstの辞書に変換され、シーケンスはTypstの配列に変換されます。
13+
/// 文字列やブール値はTypstの対応する型に変換され、
14+
/// ヌル値(`null``~`、または空の``)は`{none}`に、
15+
/// 数値は整数値であれば整数型に、
16+
/// そうでなければ浮動小数点数型に変換されます。
1717
///
18-
/// Be aware that integers larger than 2<sup>63</sup>-1 will be converted to
19-
/// floating point numbers, which may result in an approximative value.
18+
/// 2<sup>63</sup>-1より大きな整数は浮動小数点数に変換されるため、
19+
/// 近似値になる可能性があることに留意してください。
2020
#[func(scope, title = "CBOR")]
2121
pub fn cbor(
2222
engine: &mut Engine,
23-
/// A [path]($syntax/#paths) to a CBOR file or raw CBOR bytes.
23+
/// CBORファイルの[パス]($syntax/#paths)、または生のCBORバイト列。
2424
source: Spanned<DataSource>,
2525
) -> SourceResult<Value> {
2626
let data = source.load(engine.world)?;
@@ -31,21 +31,21 @@ pub fn cbor(
3131

3232
#[scope]
3333
impl cbor {
34-
/// Reads structured data from CBOR bytes.
34+
/// CBORバイト列から構造化データを読み込む。
3535
#[func(title = "Decode CBOR")]
36-
#[deprecated = "`cbor.decode` is deprecated, directly pass bytes to `cbor` instead"]
36+
#[deprecated = "`cbor.decode`は非推奨です。代わりにバイト列を直接`cbor`に渡してください。"]
3737
pub fn decode(
3838
engine: &mut Engine,
39-
/// CBOR data.
39+
/// CBORデータ。
4040
data: Spanned<Bytes>,
4141
) -> SourceResult<Value> {
4242
cbor(engine, data.map(DataSource::Bytes))
4343
}
4444

45-
/// Encode structured data into CBOR bytes.
45+
/// 構造化データをCBORバイト列にエンコードする。
4646
#[func(title = "Encode CBOR")]
4747
pub fn encode(
48-
/// Value to be encoded.
48+
/// エンコード対象の値。
4949
value: Spanned<Value>,
5050
) -> SourceResult<Bytes> {
5151
let Spanned { v: value, span } = value;

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/loading/toml.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ use crate::engine::Engine;
66
use crate::foundations::{func, scope, Str, Value};
77
use crate::loading::{DataSource, Load, Readable};
88

9-
/// Reads structured data from a TOML file.
9+
/// TOMLファイルから構造化データを読み込む。
1010
///
11-
/// The file must contain a valid TOML table. TOML tables will be converted into
12-
/// Typst dictionaries, and TOML arrays will be converted into Typst arrays.
13-
/// Strings, booleans and datetimes will be converted into the Typst equivalents
14-
/// and numbers will be converted to floats or integers depending on whether
15-
/// they are whole numbers.
11+
/// 読み込むファイルには有効なTOMLテーブルが含まれていなければなりません。
12+
/// TOMLテーブルはTypstの辞書に変換され、
13+
/// TOML配列はTypstの配列に変換されます。
14+
/// 文字列、ブール値、日時はTypstの対応する型に変換され、
15+
/// 数値は整数値であれば整数型に、そうでなければ浮動小数点数型に変換されます。
1616
///
17-
/// The TOML file in the example consists of a table with the keys `title`,
18-
/// `version`, and `authors`.
17+
/// この例におけるTOMLファイルは、
18+
/// `title`、`version`、および`authors`のキーを持つテーブルで構成されています。
1919
///
20-
/// # Example
20+
/// #
2121
/// ```example
2222
/// #let details = toml("details.toml")
2323
///
@@ -29,7 +29,7 @@ use crate::loading::{DataSource, Load, Readable};
2929
#[func(scope, title = "TOML")]
3030
pub fn toml(
3131
engine: &mut Engine,
32-
/// A [path]($syntax/#paths) to a TOML file or raw TOML bytes.
32+
/// TOMLファイルの[パス]($syntax/#paths)、または生のTOMLバイト列。
3333
source: Spanned<DataSource>,
3434
) -> SourceResult<Value> {
3535
let data = source.load(engine.world)?;
@@ -41,23 +41,23 @@ pub fn toml(
4141

4242
#[scope]
4343
impl toml {
44-
/// Reads structured data from a TOML string/bytes.
44+
/// TOMLの文字列やバイト列から構造化データを読み込む。
4545
#[func(title = "Decode TOML")]
46-
#[deprecated = "`toml.decode` is deprecated, directly pass bytes to `toml` instead"]
46+
#[deprecated = "`toml.decode`は非推奨です。代わりにバイト列を直接`toml`に渡してください。"]
4747
pub fn decode(
4848
engine: &mut Engine,
49-
/// TOML data.
49+
/// TOMLデータ。
5050
data: Spanned<Readable>,
5151
) -> SourceResult<Value> {
5252
toml(engine, data.map(Readable::into_source))
5353
}
5454

55-
/// Encodes structured data into a TOML string.
55+
/// 構造化データをTOML文字列にエンコードする。
5656
#[func(title = "Encode TOML")]
5757
pub fn encode(
58-
/// Value to be encoded.
58+
/// エンコード対象の値。
5959
value: Spanned<Value>,
60-
/// Whether to pretty-print the resulting TOML.
60+
/// TOMLを整形表示するかどうか。
6161
#[named]
6262
#[default(true)]
6363
pretty: bool,

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>,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ pub struct FracElem {
2828
pub denom: Content,
2929
}
3030

31-
/// A binomial expression.
31+
/// 二項係数。
3232
///
33-
/// # Example
33+
/// #
3434
/// ```example
3535
/// $ binom(n, k) $
3636
/// $ binom(n, k_1, k_2, k_3, ..., k_m) $
3737
/// ```
3838
#[elem(title = "Binomial", Mathy)]
3939
pub struct BinomElem {
40-
/// The binomial's upper index.
40+
/// 二項係数の上側の数。
4141
#[required]
4242
pub upper: Content,
4343

44-
/// The binomial's lower index.
44+
/// 二項係数の下側の数。
4545
#[required]
4646
#[variadic]
4747
#[parse(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::text::TextElem;
1616
/// 各項目の先頭にマーカーを付け、
1717
/// 一連の項目を縦に並べて表示します。
1818
///
19-
/// # Example
19+
/// #
2020
/// ```example
2121
/// Normal list.
2222
/// - Text

0 commit comments

Comments
 (0)