Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions crates/typst-library/src/introspection/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ use crate::engine::Engine;
use crate::foundations::{elem, Content, Packed, Show, StyleChain, Value};
use crate::introspection::Locatable;

/// Exposes a value to the query system without producing visible content.
/// 可視コンテンツの生成を伴わないクエリシステムへの値の公開。
///
/// This element can be retrieved with the [`query`] function and from the
/// command line with
/// [`typst query`]($reference/introspection/query/#command-line-queries). Its
/// purpose is to expose an arbitrary value to the introspection system. To
/// identify a metadata value among others, you can attach a [`label`] to it and
/// query for that label.
/// この要素は[`query`]関数や[`typst query`]($reference/introspection/query/#command-line-queries)を用いてコマンドラインから取得できます。
/// その目的は任意の値を内省システムに公開することです。
/// メタデータの値を他と識別するために、[`label`]を付けて、それを検索することができます。
///
/// The `metadata` element is especially useful for command line queries because
/// it allows you to expose arbitrary values to the outside world.
/// `metadata`要素は、外部に任意の値を公開できるため、特にコマンドラインクエリで便利です。
///
/// ```example
/// // Put metadata somewhere.
Expand All @@ -26,7 +22,7 @@ use crate::introspection::Locatable;
/// ```
#[elem(Show, Locatable)]
pub struct MetadataElem {
/// The value to embed into the document.
/// 文書に埋め込む値。
#[required]
pub value: Value,
}
Expand Down
2 changes: 1 addition & 1 deletion website/translation-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"/docs/reference/introspection/here/": "untranslated",
"/docs/reference/introspection/locate/": "untranslated",
"/docs/reference/introspection/location/": "untranslated",
"/docs/reference/introspection/metadata/": "untranslated",
"/docs/reference/introspection/metadata/": "translated",
"/docs/reference/introspection/query/": "untranslated",
"/docs/reference/introspection/state/": "untranslated",
"/docs/reference/data-loading/": "translated",
Expand Down