-
Notifications
You must be signed in to change notification settings - Fork 13
/docs/reference/introspection/here
の翻訳
#318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,32 +4,27 @@ use crate::diag::HintedStrResult; | |||||
use crate::foundations::{func, Context}; | ||||||
use crate::introspection::Location; | ||||||
|
||||||
/// Provides the current location in the document. | ||||||
/// 文書中における現在位置を提供。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここもロケーションでしょうか?
Suggested change
|
||||||
/// | ||||||
/// 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)から現在位置を直接取得する低レベルな構成要素と考えることができます。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hereはlocation型を返すのでこれはロケーションのことです。
Suggested change
|
||||||
/// いくつかの他の関数が内部で使用しています。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] 文の主語述語が不自然です。受け身にすると自然な日本語になります。提案: 『いくつかの他の関数でも内部で使用されています。』
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
/// 例えば、`{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()}`は表示する要素の位置にマッチします。 | ||||||
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
/// | ||||||
/// 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 | ||||||
/// #here().position() | ||||||
/// ] | ||||||
/// ``` | ||||||
/// | ||||||
/// 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`]型のドキュメントを参照してください。 | ||||||
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
#[func(contextual)] | ||||||
pub fn here(context: Tracked<Context>) -> HintedStrResult<Location> { | ||||||
context.location() | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.