Skip to content

Commit 8b03a1c

Browse files
gomazarashi3w36zj6
andauthored
/docs/reference/data-loading/xml/の翻訳 (#280)
Co-authored-by: 3w36zj6 <[email protected]>
1 parent 96ebb00 commit 8b03a1c

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ use crate::engine::Engine;
77
use crate::foundations::{dict, func, scope, Array, Dict, IntoValue, Str, Value};
88
use crate::loading::{DataSource, Load, Readable};
99

10-
/// Reads structured data from an XML file.
10+
/// XMLファイルから構造化データを読み込む。
1111
///
12-
/// The XML file is parsed into an array of dictionaries and strings. XML nodes
13-
/// can be elements or strings. Elements are represented as dictionaries with
14-
/// the following keys:
12+
/// XMLファイルは辞書と文字列からなる配列にパースされます。
13+
/// XMLノードは要素または文字列になり得ます。
14+
/// 要素は以下のキーを持つ辞書として表現されます。
1515
///
16-
/// - `tag`: The name of the element as a string.
17-
/// - `attrs`: A dictionary of the element's attributes as strings.
18-
/// - `children`: An array of the element's child nodes.
16+
/// - `tag`: 要素の名称を表す文字列。
17+
/// - `attrs`: 要素の属性を表す文字列からなる辞書。
18+
/// - `children`: 要素の子ノードからなる配列。
1919
///
20-
/// The XML file in the example contains a root `news` tag with multiple
21-
/// `article` tags. Each article has a `title`, `author`, and `content` tag. The
22-
/// `content` tag contains one or more paragraphs, which are represented as `p`
23-
/// tags.
20+
/// この例におけるXMLファイルは、ルート要素である`news`タグと複数の`article`タグを含んでいます。
21+
/// それぞれのarticleは`title``author`、および`content`タグを持っています。
22+
/// `content`タグは1つ以上の段落を含んでおり、
23+
/// これらは`p`タグとして表現されています。
2424
///
25-
/// # Example
25+
/// #
2626
/// ```example
2727
/// #let find-child(elem, tag) = {
2828
/// elem.children
@@ -58,7 +58,7 @@ use crate::loading::{DataSource, Load, Readable};
5858
#[func(scope, title = "XML")]
5959
pub fn xml(
6060
engine: &mut Engine,
61-
/// A [path]($syntax/#paths) to an XML file or raw XML bytes.
61+
/// XMLファイルの[パス]($syntax/#paths)または生のXMLバイト列。
6262
source: Spanned<DataSource>,
6363
) -> SourceResult<Value> {
6464
let data = source.load(engine.world)?;
@@ -74,12 +74,12 @@ pub fn xml(
7474

7575
#[scope]
7676
impl xml {
77-
/// Reads structured data from an XML string/bytes.
77+
/// XMLの文字列やバイト列から構造化データを読み込む。
7878
#[func(title = "Decode XML")]
79-
#[deprecated = "`xml.decode` is deprecated, directly pass bytes to `xml` instead"]
79+
#[deprecated = "`xml.decode`は非推奨です。代わりにバイト列を直接`xml`に渡してください。"]
8080
pub fn decode(
8181
engine: &mut Engine,
82-
/// XML data.
82+
/// XMLデータ。
8383
data: Spanned<Readable>,
8484
) -> SourceResult<Value> {
8585
xml(engine, data.map(Readable::into_source))

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"/docs/reference/data-loading/json/": "translated",
158158
"/docs/reference/data-loading/read/": "translated",
159159
"/docs/reference/data-loading/toml/": "translated",
160-
"/docs/reference/data-loading/xml/": "untranslated",
160+
"/docs/reference/data-loading/xml/": "translated",
161161
"/docs/reference/data-loading/yaml/": "translated",
162162
"/docs/reference/pdf/": "translated",
163163
"/docs/reference/pdf/embed/": "untranslated",

0 commit comments

Comments
 (0)