Skip to content

Commit 3b53159

Browse files
gomazarashi3w36zj6
andauthored
/docs/reference/data-loading/csv/の翻訳 (#198)
Co-authored-by: 3w36zj6 <[email protected]>
1 parent 38c9037 commit 3b53159

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use crate::engine::Engine;
66
use crate::foundations::{cast, func, scope, Array, Dict, IntoValue, Type, Value};
77
use crate::loading::{DataSource, Load, Readable};
88

9-
/// Reads structured data from a CSV file.
9+
/// CSVファイルから構造化データを読み込む。
1010
///
11-
/// The CSV file will be read and parsed into a 2-dimensional array of strings:
12-
/// Each row in the CSV file will be represented as an array of strings, and all
13-
/// rows will be collected into a single array. Header rows will not be
14-
/// stripped.
11+
/// CSVファイルは読み込まれ、文字列からなる2次元配列にパースされます。
12+
/// 具体的には、CSVファイルの各行が文字列の配列として表現され、
13+
/// すべての行が単一の配列にまとめられます。
14+
/// ヘッダー行は削除されません。
1515
///
16-
/// # Example
16+
/// #
1717
/// ```example
1818
/// #let results = csv("example.csv")
1919
///
@@ -26,20 +26,20 @@ use crate::loading::{DataSource, Load, Readable};
2626
#[func(scope, title = "CSV")]
2727
pub fn csv(
2828
engine: &mut Engine,
29-
/// A [path]($syntax/#paths) to a CSV file or raw CSV bytes.
29+
/// CSVファイルへの[パス]($syntax/#paths)、または生のCSVバイト列。
3030
source: Spanned<DataSource>,
31-
/// The delimiter that separates columns in the CSV file.
32-
/// Must be a single ASCII character.
31+
/// CSVファイルの列を区切る区切り文字。
32+
/// 単一のASCII文字でなければなりません。
3333
#[named]
3434
#[default]
3535
delimiter: Delimiter,
36-
/// How to represent the file's rows.
36+
/// ファイルの各行の表現方法。
3737
///
38-
/// - If set to `array`, each row is represented as a plain array of
39-
/// strings.
40-
/// - If set to `dictionary`, each row is represented as a dictionary
41-
/// mapping from header keys to strings. This option only makes sense when
42-
/// a header row is present in the CSV file.
38+
/// - `array`に設定すると、
39+
/// 各行は単純な文字列の配列として表現されます。
40+
/// - `dictionary`に設定すると、
41+
/// 各行はヘッダーのキーと文字列を対応付けた辞書として表現されます。
42+
/// このオプションは、CSVファイルにヘッダー行が存在する場合にのみ意味があります。
4343
#[named]
4444
#[default(RowType::Array)]
4545
row_type: RowType,
@@ -93,25 +93,25 @@ pub fn csv(
9393

9494
#[scope]
9595
impl csv {
96-
/// Reads structured data from a CSV string/bytes.
96+
/// CSVの文字列やバイト列から構造化データを読み込む。
9797
#[func(title = "Decode CSV")]
98-
#[deprecated = "`csv.decode` is deprecated, directly pass bytes to `csv` instead"]
98+
#[deprecated = "`csv.decode`は非推奨です。代わりにバイト列を直接`csv`に渡してください。"]
9999
pub fn decode(
100100
engine: &mut Engine,
101-
/// CSV data.
101+
/// CSVデータ。
102102
data: Spanned<Readable>,
103-
/// The delimiter that separates columns in the CSV file.
104-
/// Must be a single ASCII character.
103+
/// CSVファイルの列を区切る区切り文字。
104+
/// 単一のASCII文字でなければなりません。
105105
#[named]
106106
#[default]
107107
delimiter: Delimiter,
108-
/// How to represent the file's rows.
108+
/// ファイルの各行の表現方法。
109109
///
110-
/// - If set to `array`, each row is represented as a plain array of
111-
/// strings.
112-
/// - If set to `dictionary`, each row is represented as a dictionary
113-
/// mapping from header keys to strings. This option only makes sense
114-
/// when a header row is present in the CSV file.
110+
/// - `array`に設定すると、
111+
/// 各行は単純な文字列の配列として表現されます。
112+
/// - `dictionary`に設定すると、
113+
/// 各行はヘッダーのキーと文字列を対応付けた辞書として表現されます。
114+
/// このオプションは、CSVファイルにヘッダー行が存在する場合にのみ意味があります。
115115
#[named]
116116
#[default(RowType::Array)]
117117
row_type: RowType,

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"/docs/reference/introspection/state/": "untranslated",
154154
"/docs/reference/data-loading/": "untranslated",
155155
"/docs/reference/data-loading/cbor/": "untranslated",
156-
"/docs/reference/data-loading/csv/": "untranslated",
156+
"/docs/reference/data-loading/csv/": "translated",
157157
"/docs/reference/data-loading/json/": "untranslated",
158158
"/docs/reference/data-loading/read/": "untranslated",
159159
"/docs/reference/data-loading/toml/": "untranslated",

0 commit comments

Comments
 (0)