From b9e709e1f0455685790d1fd859b93f69b183bd29 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 28 Aug 2025 22:30:09 +0900 Subject: [PATCH 1/4] =?UTF-8?q?`/docs/reference/introspection/here`?= =?UTF-8?q?=E3=81=AE=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", From f18cc999b6fc722578db4b60e72927b4541a675f Mon Sep 17 00:00:00 2001 From: ultimatile Date: Wed, 22 Oct 2025 10:43:37 +0900 Subject: [PATCH 2/4] Update crates/typst-library/src/introspection/here.rs Co-authored-by: Shunsuke KIMURA --- crates/typst-library/src/introspection/here.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/introspection/here.rs b/crates/typst-library/src/introspection/here.rs index 9dc02d5185..5f4da85a2e 100644 --- a/crates/typst-library/src/introspection/here.rs +++ b/crates/typst-library/src/introspection/here.rs @@ -4,7 +4,7 @@ use crate::diag::HintedStrResult; use crate::foundations::{func, Context}; use crate::introspection::Location; -/// 文書中における現在位置を提供。 +/// 文書中における現在のロケーションを提供。 /// /// `here`はアクティブな[コンテキスト]($context)から現在位置を直接取得する低レベルな構成要素と考えることができます。 /// いくつかの他の関数が内部で使用しています。 From 25c1b971335c760a958cf83c32c9f1d4093b2fbe Mon Sep 17 00:00:00 2001 From: ultimatile Date: Wed, 22 Oct 2025 10:43:43 +0900 Subject: [PATCH 3/4] Update crates/typst-library/src/introspection/here.rs --- crates/typst-library/src/introspection/here.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/introspection/here.rs b/crates/typst-library/src/introspection/here.rs index 5f4da85a2e..232a51c06a 100644 --- a/crates/typst-library/src/introspection/here.rs +++ b/crates/typst-library/src/introspection/here.rs @@ -6,7 +6,7 @@ use crate::introspection::Location; /// 文書中における現在のロケーションを提供。 /// -/// `here`はアクティブな[コンテキスト]($context)から現在位置を直接取得する低レベルな構成要素と考えることができます。 +/// `here`はアクティブな[コンテキスト]($context)から現在のロケーションを直接取得する低レベルな構成要素と考えることができます。 /// いくつかの他の関数が内部で使用しています。 /// 例えば、`{counter.get()}`は`{counter.at(here())}`と等価です。 /// From 5f318cab1b0ba3ce881a5ac633a3fef0a79228f3 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Wed, 22 Oct 2025 10:43:54 +0900 Subject: [PATCH 4/4] Update crates/typst-library/src/introspection/here.rs --- crates/typst-library/src/introspection/here.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/introspection/here.rs b/crates/typst-library/src/introspection/here.rs index 232a51c06a..f92fbd88ff 100644 --- a/crates/typst-library/src/introspection/here.rs +++ b/crates/typst-library/src/introspection/here.rs @@ -10,7 +10,7 @@ use crate::introspection::Location; /// いくつかの他の関数が内部で使用しています。 /// 例えば、`{counter.get()}`は`{counter.at(here())}`と等価です。 /// -/// [ロケータブル]($location/#locatable)要素に対するshowルールにおいて、`{here()}`は表示する要素の位置にマッチします。 +/// [ロケータブル]($location/#locatable)要素に対するshowルールにおいて、`{here()}`は表示する要素のロケーションにマッチします。 /// /// 現在のページ番号を表示したい場合は、[`counter`]型のドキュメントを参照してください。 /// `here`は物理的なページ番号を決定できますが、通常は、前書きの後にリセットされるような、論理的なページ番号が必要でしょう。