From b9e709e1f0455685790d1fd859b93f69b183bd29 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 28 Aug 2025 22:30:09 +0900 Subject: [PATCH] =?UTF-8?q?`/docs/reference/introspection/here`=E3=81=AE?= =?UTF-8?q?=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../typst-library/src/introspection/here.rs | 27 ++++++++----------- website/translation-status.json | 2 +- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/crates/typst-library/src/introspection/here.rs b/crates/typst-library/src/introspection/here.rs index 5100932473..9dc02d5185 100644 --- a/crates/typst-library/src/introspection/here.rs +++ b/crates/typst-library/src/introspection/here.rs @@ -4,24 +4,19 @@ use crate::diag::HintedStrResult; use crate::foundations::{func, Context}; use crate::introspection::Location; -/// Provides the current location in the document. +/// 文書中における現在位置を提供。 /// -/// You can think of `here` as a low-level building block that directly extracts -/// the current location from the active [context]. Some other functions use it -/// internally: For instance, `{counter.get()}` is equivalent to -/// `{counter.at(here())}`. +/// `here`はアクティブな[コンテキスト]($context)から現在位置を直接取得する低レベルな構成要素と考えることができます。 +/// いくつかの他の関数が内部で使用しています。 +/// 例えば、`{counter.get()}`は`{counter.at(here())}`と等価です。 /// -/// Within show rules on [locatable]($location/#locatable) elements, `{here()}` -/// will match the location of the shown element. +/// [ロケータブル]($location/#locatable)要素に対するshowルールにおいて、`{here()}`は表示する要素の位置にマッチします。 /// -/// If you want to display the current page number, refer to the documentation -/// of the [`counter`] type. While `here` can be used to determine the physical -/// page number, typically you want the logical page number that may, for -/// instance, have been reset after a preface. +/// 現在のページ番号を表示したい場合は、[`counter`]型のドキュメントを参照してください。 +/// `here`は物理的なページ番号を決定できますが、通常は、前書きの後にリセットされるような、論理的なページ番号が必要でしょう。 /// -/// # Examples -/// Determining the current position in the document in combination with the -/// [`position`]($location.position) method: +/// # 例 +/// [`position`]($location.position)メソッドと組み合わせて文書中での現在位置を決定します。 /// ```example /// #context [ /// I am located at @@ -29,7 +24,7 @@ use crate::introspection::Location; /// ] /// ``` /// -/// Running a [query] for elements before the current position: +/// 現在位置より前にある要素に対して[クエリ]($query)を実行します。 /// ```example /// = Introduction /// = Background @@ -42,7 +37,7 @@ use crate::introspection::Location; /// /// = Conclusion /// ``` -/// Refer to the [`selector`] type for more details on before/after selectors. +/// セレクターのbeforeおよびafterに関する詳細は[`selector`]型のドキュメントを参照してください。 #[func(contextual)] pub fn here(context: Tracked) -> HintedStrResult { context.location() diff --git a/website/translation-status.json b/website/translation-status.json index b0d7b43f19..56f157ac51 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -145,7 +145,7 @@ "/docs/reference/visualize/tiling/": "untranslated", "/docs/reference/introspection/": "untranslated", "/docs/reference/introspection/counter/": "untranslated", - "/docs/reference/introspection/here/": "untranslated", + "/docs/reference/introspection/here/": "translated", "/docs/reference/introspection/locate/": "untranslated", "/docs/reference/introspection/location/": "untranslated", "/docs/reference/introspection/metadata/": "untranslated",