Skip to content

Conversation

sbtseiji
Copy link

@sbtseiji sbtseiji commented Sep 3, 2025

contentを訳しました。

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Translation of the foundations/content documentation from English to Japanese. This PR localizes the documentation comments and updates the translation status to indicate completion.

  • Translation of all documentation comments in the content module from English to Japanese
  • Updated translation status file to mark content module as translated

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
website/translation-status.json Updated status from "untranslated" to "translated" for content module
crates/typst-library/src/foundations/content.rs Translated all documentation comments from English to Japanese

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

use crate::text::UnderlineElem;

/// A piece of document content.
/// ドキュメントのコンテンツ要素
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The Japanese translation should be more precise. Consider using 'ドキュメントコンテンツの要素' or 'ドキュメントコンテンツ片' to better reflect 'A piece of document content'.

Suggested change
/// ドキュメントのコンテンツ要素
/// ドキュメントコンテンツ片

Copilot uses AI. Check for mistakes.

/// ほとんどのフィールドはオプションで、必須フィールドと同様に、単一要素を設定する
/// ために要素関数に渡すことができます。しかし、[setルール]($styling/#set-rules)で
/// 設定して、スコープ内のすべての要素に適用することも可能です。
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス構文
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the previous correction, '構文' should match the earlier translation. If using katakana, use 'シンタクス'.

Suggested change
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス構文
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス用シンタックス

Copilot uses AI. Check for mistakes.

/// コンテンツの要素関数です。この関数は、当該コンテンツに含まれる要素を生成するために
/// 使用できます。この関数は、その要素に対するsetルールやshowルール内で使用することも
/// ができます。特定の種類の要素をもっているかを確認するために、グローバル関数と比較
/// することも可能です。
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The word 'もっている' should be written in hiragana as 'もっている' or in kanji as '持っている' for better readability.

Suggested change
/// することも可能です。
/// することも可能です。特定の種類の要素を持っているかを確認するために、グローバル関数と比較

Copilot uses AI. Check for mistakes.

}

/// Whether the content has the specified field.
/// コンテンツが特定のフィールドをもつかどうか。
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] For consistency, 'もつ' should be written as '持つ' in kanji or 'もつ' should be consistently used throughout the translation.

Copilot uses AI. Check for mistakes.

use crate::text::UnderlineElem;

/// ドキュメントのコンテンツ要素
/// ドキュメントコンテンツの要素
Copy link
Contributor

@ultimatile ultimatile Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// ドキュメントコンテンツの要素
/// 文書のコンテンツ。

/// コンテンツは`+`演算子で追加したり、[結合]($scripting/#blocks)したり、整数と乗算したりすることができます。コンテンツが期待される場所であれば、[文字列]($str)や`{none}`を渡すことも可能です。
///
/// # 表現
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス用シンタックス]($scripting/#field-access)でそのフィールドにアクセスできます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"syntax"は「構文」で統一しています。

Suggested change
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス用シンタックス]($scripting/#field-access)でそのフィールドにアクセスできます。
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス構文]($scripting/#field-access)でそのフィールドにアクセスできます。

/// on content of that type. Required fields are marked as such in the
/// documentation.
/// ほとんどのフィールドはオプションで、必須フィールドと同様に、単一要素を設定するために要素関数に渡すことができます。しかし、[setルール]($styling/#set-rules)で設定して、スコープ内のすべての要素に適用することも可能です。
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス用シンタックスで利用でき、setルールから適用された場合は利用できません。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス用シンタックスで利用でき、setルールから適用された場合は利用できません。
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス構文で利用でき、setルールから適用された場合は利用できません。

/// by [query] or provided by a [show rule]($reference/styling/#show-rules),
/// for other content it will be `{none}`. The resulting location can be
/// used with [counters]($counter), [state] and [queries]($query).
/// コンテンツの位置情報です。これは、[query]によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、{none}になります。取得された位置情報は、[counter]($counter)、[state]、[query]($query)と一緒に使用できます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// コンテンツの位置情報です。これは、[query]によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、{none}になります。取得された位置情報は、[counter]($counter)、[state]、[query]($query)と一緒に使用できます。
/// コンテンツの位置情報です。これは、[クエリ]($query)によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、`{none}`になります。取得された位置情報は、[カウンター]($counter)、[状態]($state)、[クエリ]($query)と一緒に使用できます。

/// element. Can be compared with global functions to check whether you have
/// a specific
/// kind of element.
/// コンテンツの要素関数です。この関数は、当該コンテンツに含まれる要素を生成するために使用できます。この関数は、その要素に対するsetルールやshowルール内で使用することもできます。特定の種類の要素を持っているかを確認するために、グローバル関数と比較することも可能です。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正提案しづらいので文分割させてもらいました。

Suggested change
/// コンテンツの要素関数です。この関数は、当該コンテンツに含まれる要素を生成するために使用できます。この関数は、その要素に対するsetルールやshowルール内で使用することもできます。特定の種類の要素を持っているかを確認するために、グローバル関数と比較することも可能です
/// コンテンツの要素関数
/// この関数を用いると、当該コンテンツに含まれる要素を生成できます。
/// この関数は、その要素に対するsetルールやshowルール内でも使用できます。
/// グローバル関数と比較することで、特定の種類の要素を持っているかを確認できます。

1行目はAPI定義の1行目のため体言止め。2・4行目は間違いではないのですが、こちらの方が自然かと思います。採用するかはお任せします。
3行目(4行目も)に関しては、「ことが(も)できます」という表現はスタイルガイドで避けるようになっていますので、これは修正をお願いします。

/// コンテンツは`+`演算子で追加したり、[結合]($scripting/#blocks)したり、整数と乗算したりすることができます。コンテンツが期待される場所であれば、[文字列]($str)や`{none}`を渡すことも可能です。
///
/// # 表現
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス構文]($scripting/#field-access)でそのフィールドにアクセスできます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

強調表現されるように前後に空白を入れてください

Suggested change
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス構文]($scripting/#field-access)でそのフィールドにアクセスできます。
/// コンテンツはフィールドを持つ要素で構成されます。 _要素関数_ で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス構文]($scripting/#field-access)でそのフィールドにアクセスできます。

/// by [query] or provided by a [show rule]($reference/styling/#show-rules),
/// for other content it will be `{none}`. The resulting location can be
/// used with [counters]($counter), [state] and [queries]($query).
/// コンテンツの位置情報です。これは、[クエリ]($query)によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、`{none}`になります。取得された位置情報は、[カウンター]($counter)、[状態]($state)、[クエリ]($query)と一緒に使用できます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

現在introspection/locationの翻訳に着手してますが、locationの翻訳はシンプルに「位置」にしようかと思っています。「位置情報」の方が良いでしょうか?一般的な用語として見た「位置」でも理解可能な説明になるドキュメントが多く、基本的に問題なさそうなのと、ドキュメント内で必ずしもlocationとpositionが明確に区別されずに用いられているところがあるので、他に「ローケーション」も考えたのですが、「位置」の方が良いと思いました。もし意見があれば教えていただきたいです。

Suggested change
/// コンテンツの位置情報です。これは、[クエリ]($query)によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、`{none}`になります。取得された位置情報は、[カウンター]($counter)、[状態]($state)、[クエリ]($query)と一緒に使用できます。
/// コンテンツの位置。これは、[クエリ]($query)によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、`{none}`になります。取得された位置は、[カウンター]($counter)、[状態]($state)、[クエリ]($query)と一緒に使用できます。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kimushun1101 @gomazarashi @3w36zj6 locationの訳語に関してご意見があれば伺いたいです(ここでやることではないかもですが)。簡単にlocationについて補足しておくと、locationは実体としては識別用のIDのみを持っていて、そのIDを用いて(locationを渡して)システムに問い合わせた実際のposition(実際に位置するページとxy座標)を、locationのpositionメソッドが返すという関係になっています。したがって厳密にはlocationとpositionは別物ですが、ユーザーレベルで違いを意識する必要は(positionメソッドの存在を認知する必要性以外は)ありません。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants