-
Notifications
You must be signed in to change notification settings - Fork 13
Foundations/argumentsの翻訳 #285
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?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR translates comments in the Foundations/arguments file from English to Japanese. The translation provides Japanese documentation for the Args
struct and its associated methods, improving accessibility for Japanese-speaking developers.
Key changes:
- Translated all English comments and docstrings to Japanese
- Maintained the original structure and formatting of documentation
- Preserved code examples and function signatures unchanged
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
貢献いただきありがとうございます。レビューが完了するまでしばらくお待ちください。 次回からは、以下のように翻訳状況を更新してください。 diff --git a/website/translation-status.json b/website/translation-status.json
index 4c1a15e43..02c6ad779 100644
--- a/website/translation-status.json
+++ b/website/translation-status.json
@@ -12,7 +12,7 @@
"/docs/reference/scripting/": "translated",
"/docs/reference/context/": "translated",
"/docs/reference/foundations/": "untranslated",
- "/docs/reference/foundations/arguments/": "untranslated",
+ "/docs/reference/foundations/arguments/": "translated",
"/docs/reference/foundations/array/": "untranslated",
"/docs/reference/foundations/assert/": "untranslated",
"/docs/reference/foundations/auto/": "untranslated", |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
0796541
to
2a0082f
Compare
@sbtseiji 翻訳ありがとうございます。 意図的に行われているのか分かりませんが、array、autoの翻訳はそれぞれ別ブランチで作業を行うことを推奨します。
などです。 通常翻訳チェックはプルリクエスト単位で行われますので、異なる作業単位を単一プルリクエストにまとめられるとチェック状況の管理が困難になる上に、全ての作業単位のチェックが完了するまでチェックが完了した作業単位をマージできませんので翻訳の反映が遅れます。またある作業単位に何らかの問題があった場合にコミットを巻き戻す際にも関係のない作業単位まで巻き戻ってしまいます。 |
すみません。ファイルごとにブランチを分けるようにします。 |
よろしくお願いします。 翻訳に関して、これは強制ではないのですが"Create positional arguments from a span and values."などの、ページの最初の行や、各項目の最初の行などにある動詞で始まる行は「スパンと値から位置引数を作成。」のように体言止めにしていることが多いので合わせていただけるとありがたいです。たまに体言止めにすると不自然な場合などがあるので絶対ではないです。 |
@ultimatile docs/TRANSLATING_GUIDELINES.md Line 37 in 4e3161c
|
@kimushun1101 ありがとうございます。クロージャやキャプチャは用例として長音をつけているところを見たことがありませんでした(ググったら使っている人はいますね)。「原則として省略しない」ということなので、長音を付けないことが用例として定着しているので原則外と判断しました。 が、クロージャはクロージャーとする方針ならば、キャプチャもキャプチャーにすべきですね。 docs/docs/tutorial/4-template.md Line 132 in 529c33d
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRの説明文とdiffの内容が一致していないため、revertやrebaseを行い修正してください。
レビュー可能な状態に更新したら、ReviewersからRe-request reviewを送信してください。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ご貢献いただき、誠にありがとうございます。
体裁に関するコメントを少しいれさせていただいたため、ご確認ください。
また、全体的なことなので個別にはコメントをいれませんでしたが、改行は一文ずつなどで行っていただけますと幸いです。おそらく公式通りに80文字以内で折り返すように作成していただいたと思うのですが、Webページにしたときに無駄な空白が入ってしまいます。またレビューなどで微修正するときに、都度改行位置をケアするのも煩わしいと思いますので、少なくとも 1文終わる 句読点で改行することを推奨します。翻訳ガイドにも書こうかと思います。
その他、不明な点などがあれば遠慮なくお問い合わせください。
/// type. It exposes methods to access the positional and named arguments. | ||
/// # 引数シンク | ||
/// 組み込み関数と同様に、カスタム関数も可変個の引数を受け取れます。 | ||
/// 余分にある引数をすべてまとめて受け取る_引数シンク_(キッチンシンクのようにさまざまなも |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
強調表現が有効になるように、アンダースコアの前後に半角スペースを入れてください。
/// 余分にある引数をすべてまとめて受け取る_引数シンク_(キッチンシンクのようにさまざまなも | |
/// 余分にある引数をすべてまとめて受け取る _引数シンク_ (キッチンシンクのようにさまざまなも |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
完全に挙動を理解できていないですが、ここは前側の空白を入れると強調表示になります
作業手順をよく理解しておらず、お手数をおかけして申し訳ありません。 |
すみません。これを見落としていました。一旦ここのPRでつけたargs以外のファイルへのコメントはcloseしておきます。他PRを作るときに参考になれば幸いです。 |
}; | ||
|
||
/// Captured arguments to a function. | ||
/// 関数にキャプチャーされた引数。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// 関数にキャプチャーされた引数。 | |
/// 関数に渡された引数。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
キャプチャーは私が指摘してそのように変更してもらったのですが、キャプチャーだと不適切でしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以前の議論を見落としていました。
他のテクニカルタームと比べると「キャプチャー」は日本語の技術文書において浸透度が低く感じたため、和訳する修正提案をさせていただきましたが、あまり強い自信はありません。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
キャプチャーされた関数外の変数はis_mutating_method
を除いて関数内で変更できないので、通常の変数の渡し方とは違いを意識する必要はあると思いますが、「関数にキャプチャーされた引数。」でどれくらい伝わるかは微妙な気がしています。「キャプチャ(ー)」は一般的な機能・用語なので個人的にはそこまで違和感はないです。相対的にマイナーなタームと言われるとそうかもしれないです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gomazarashi @kimushun1101 こちらの件について意見があれば伺いたいです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他のテクニカルタームと比べると「キャプチャー」は日本語の技術文書において浸透度が低く感じたため、和訳する修正提案をさせていただきましたが、あまり強い自信はありません。
ここに関しては同じ感想をいだきました。私の界隈でもメジャーではありません。
キャプチャーされた関数外の変数は
is_mutating_method
を除いて関数内で変更できないので、通常の変数の渡し方とは違いを意識する必要はある
これは..sink
で関数が可変長の引数を受け取る形式のことを指していますかね?is_mutating_method
があまりわかっていないのですが、なにか違いがあるんだろうなぁくらいに雰囲気で感じている程度の理解度です。そのために「渡す」という訳を使わないというのはわかります。一方でこれを伝えたいため「キャプチャー」という訳にするというのは、目的に一致していない印象です。
両者を取るという意味では、たとえば、「取り込む」や「保持する」などの別の言葉に置き換えるという案もありそうです。
いずれにしても個人的にはそこまで強いこだわりはありません。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
キャプチャーされた関数外の変数は
is_mutating_method
を除いて関数内で変更できない
is_mutating_method
は細かい例外なので一旦忘れても良いと思います(入力された配列にpop
は可能、が例です)が、言いたいことは関数は純粋関数なので入力値に対して変更を加える副作用は(原則)許されないという話です。
キャプチャー渡しにすると入力値に変更ができなくて純粋性を保証する機能の一つになっているという感じです。foundations/functionで純粋関数に関する説明はあるので、無理に毎回キャプチャー渡しを強調する必要もない気がします。ただわざわざfoundations/argumentsを読みにきた読者に対して隠蔽して良い内容なのかという気持ちもあります。
キャプチャーの機能そのものは一般的で現代的な言語は基本的に実装されている一方で、キャプチャーというテクニカルタームがあまり一般的ではないのは、おそらくC++(だけ?)がユーザーにどうキャプチャーするかの選択の余地があり、その存在が意識されるのだと思います。Typstにおいては原則キャプチャー渡しになるので、ユーザーは意識する必要はないという観点に立つと「渡された」に戻すのが妥当かと思いました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
個人的には「渡された」のほうがしっくり来るように思います。
/// arguments as `..sink`. The resulting `sink` value is of the `arguments` | ||
/// type. It exposes methods to access the positional and named arguments. | ||
/// # 引数シンク | ||
/// 組み込み関数と同様に、カスタム関数も可変個の引数を受け取れます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// 組み込み関数と同様に、カスタム関数も可変個の引数を受け取れます。 | |
/// 組み込み関数と同様に、カスタム関数も可変長引数を受け取れます。 |
} | ||
|
||
/// Consume n positional arguments if possible. | ||
/// 可能ならn個数の位置引数を取り出します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// 可能ならn個数の位置引数を取り出します。 | |
/// 可能ならn個の位置引数を取り出します。 |
} | ||
|
||
/// Returns the captured named arguments as a dictionary. | ||
/// キャプチャーした名前付き引数を辞書の形で返します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// キャプチャーした名前付き引数を辞書の形で返します。 | |
/// 渡された名前付き引数を辞書の形で返します。 |
} | ||
|
||
/// Returns the captured positional arguments as an array. | ||
/// キャプチャーした位置引数を配列の形で返します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// キャプチャーした位置引数を配列の形で返します。 | |
/// 渡された位置引数を配列の形で返します。 |
Fundationsのargumentsファイルのコメントを訳しました。