-
Notifications
You must be signed in to change notification settings - Fork 13
fundations/calcの翻訳 #289
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?
fundations/calcの翻訳 #289
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 the calc module documentation and comments from English to Japanese.
- Translates all function documentation comments and parameter descriptions
- Updates module comments for mathematical functions
- Updates translation status to mark calc module as translated
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
website/translation-status.json | Updates calc module status from "untranslated" to "translated" |
crates/typst-library/src/foundations/calc.rs | Translates all documentation comments and parameter descriptions for mathematical functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
ありがとうございます。最初の説明文は別のファイルになっていたのですね。そちらの訳、および訳漏れ箇所の翻訳を追加しました。 |
対応ありがとうございます。 私はnon-negativeは非負と訳すことに馴染みがあるのですが、みなさんはどうですかね? |
あと、ソース中のコメントにあるものの中でドキュメントに表示されるコメントと、そうでないものがあります。大雑把にはpublicになっている関数が表示されるのですが、publicであったとしてもドキュメントに表示されない、あるいは別の場所に表示されるものがありますので、 |
} | ||
|
||
/// Calculates the absolute value of a numeric value. | ||
/// 数値の絶対値。 |
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.
「ある数値の」を入れても良いと思います。
} | ||
|
||
/// Raises a value to some exponent. | ||
/// 数値のべき乗。 |
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.
こちらも「べき乗。」で良いと思います。
} | ||
|
||
/// Calculates the square root of a number. | ||
/// 値の平方根。 |
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.
「平方根。」もしくは「平方根の計算。」
} | ||
|
||
/// Calculates the real nth root of a number. | ||
/// 数値の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乗根を計算します。」
#[func] | ||
pub fn root( | ||
/// The expression to take the root of | ||
/// 根号で表現される式 |
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.
https://typst-jp.github.io/docs/reference/math/roots/ と翻訳を合わせた方が統一感が出ます。
/// 根号で表現される式 | |
/// 根を取る対象の式。 |
/// 根号で表現される式 | ||
radicand: f64, | ||
/// Which root of the radicand to take | ||
/// 根号の指数 |
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.
同上です。
/// 根号の指数 | |
/// 被開方数の何乗根を取るか。 |
} | ||
|
||
/// Calculates the sine of an angle. | ||
/// 角度のサイン(正弦)。 |
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.
「サイン(正弦)の計算。」または「ある角度のサイン(正弦)を計算。」でしょうか
} | ||
|
||
/// Calculates the cosine of an angle. | ||
/// 角度のコサイン(余弦)。 |
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.
「コサイン(余弦)の計算。」または「ある角度のコサイン(余弦)を計算。」でしょうか
} | ||
|
||
/// Calculates the tangent of an angle. | ||
/// 角度のタンジェント(正接)。 |
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.
「タンジェント(正接)の計算。」または「ある角度のタンジェント(正接)を計算。」でしょうか
/// | ||
/// When called with an integer or a float, they will be interpreted as | ||
/// radians. | ||
/// 整数または浮動小数点数で呼び出された場合、それらはラジアンとして解釈されます。 |
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.
こちらの方が自然な気がします。
/// 整数または浮動小数点数で呼び出された場合、それらはラジアンとして解釈されます。 | |
/// 整数または浮動小数点数に対して呼び出された場合、それらはラジアンとして解釈されます。 |
} | ||
|
||
/// Calculates the arcsine of a number. | ||
/// 数値のアークサイン(逆正弦)。 |
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.
「アークサイン(逆正弦)の計算。」または「ある数値のアークサイン(逆正弦)を計算。」でしょうか
} | ||
|
||
/// Calculates the arccosine of a number. | ||
/// 数値のアークコサイン(逆余弦)。 |
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.
「アークコサイン(逆余弦)の計算。」または「ある数値のアークコサイン(逆余弦)を計算。」でしょうか
} | ||
|
||
/// Calculates the arctangent of a number. | ||
/// 数値のアークタンジェント(逆正接)。 |
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.
「アークタンジェント(逆正接)の計算。」または「ある数値のアークタンジェント(逆正接)を計算。」でしょうか
} | ||
|
||
/// Calculates the four-quadrant arctangent of a coordinate. | ||
/// 座標の四象限アークタンジェント。 |
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.
「四象限アークタンジェントの計算。」または「ある座標の四象限アークタンジェントを計算。」でしょうか
#[func(title = "Four-quadrant Arctangent")] | ||
pub fn atan2( | ||
/// The X coordinate. | ||
/// X座標 |
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.
/// X座標 | |
/// X座標。 |
/// X座標 | ||
x: Num, | ||
/// The Y coordinate. | ||
/// Y座標 |
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.
/// Y座標 | |
/// Y座標。 |
} | ||
|
||
/// Calculates the hyperbolic sine of a hyperbolic angle. | ||
/// 双曲線角の双曲線サイン。 |
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.
「双曲線サイン」という言い方はあまりしないと思います。併記するなら「ハイパーボリックサイン(双曲線正弦)。」だと思います。また双曲角と言うのが一般的なようです。
したがって、「ハイパーボリックサイン(双曲線正弦)を計算。」あるいは「ある双曲角のハイパーボリックサイン(双曲線正弦)を計算。」などでしょうか。
#[func(title = "Hyperbolic Sine")] | ||
pub fn sinh( | ||
/// The hyperbolic angle whose hyperbolic sine to calculate. | ||
/// 双曲線サインを計算する双曲線角。 |
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.
/// 双曲線サインを計算する双曲線角。 | |
/// ハイパーボリックサインを計算する双曲角。 |
/// error if the resulting [`float`] or [`decimal`] is larger than the maximum | ||
/// 64-bit signed integer or smaller than the minimum for that type. | ||
/// この関数はつねに[整数値]($int)を返し、結果となる[`float`]や | ||
/// [`decimal`]が64ビット符号つき整数の最大値より大きい、 |
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.
/// [`decimal`]が64ビット符号つき整数の最大値より大きい、 | |
/// [`decimal`]が64ビット符号付き整数の最大値より大きい、 |
/// 64-bit signed integer or smaller than the minimum for that type. | ||
/// この関数はつねに[整数値]($int)を返し、結果となる[`float`]や | ||
/// [`decimal`]が64ビット符号つき整数の最大値より大きい、 | ||
/// または最小値より小さい場合はエラーとなります。 |
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.
"Note that"を訳出すると
/// または最小値より小さい場合はエラーとなります。 | |
/// または最小値より小さい場合はエラーとなることに注意してください。 |
のようになります。
} | ||
|
||
/// Determines whether an integer is even. | ||
/// 整数値が偶数かどうかを判断。 |
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.
好みの問題かもしれませんが、「判定」の方が自然な気がします。
} | ||
|
||
/// Determines the maximum of a sequence of values. | ||
/// 一連の値の最大値を決定 |
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.
/// 一連の値の最大値を決定 | |
/// 一連の値の最大値を決定。 |
} | ||
|
||
/// Determines the minimum of a sequence of values. | ||
/// 一連の値の最小値を決定 |
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.
/// 一連の値の最小値を決定 | |
/// 一連の値の最小値を決定。 |
/// この関数は、演算対象と同じ型の値を返します。つまり、[`float`]に`round`を | ||
/// 適用すると`float`が、[`decimal`]に適用すると`decimal`が返されます。 | ||
/// 関数の出力を明示的に[`int`]にすることも可能ですが、その`float`や`decimal`が | ||
/// 64ビット符号つき整数の最大値より大きい場合、または最小値より小さい場合はエラー |
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.
/// 64ビット符号つき整数の最大値より大きい場合、または最小値より小さい場合はエラー | |
/// 64ビット符号付き整数の最大値より大きい場合、または最小値より小さい場合はエラー |
/// 64ビット符号つき整数の最大値より大きい場合、または最小値より小さい場合はエラー | ||
/// となることに注意してください。 | ||
/// | ||
/// さらに、この関数は、最大または最小の整数や`decimal`を超えて丸めようとすると |
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.
/// さらに、この関数は、最大または最小の整数や`decimal`を超えて丸めようとすると | |
/// さらに、この関数は、整数や`decimal`の最大値または最小値を超えて丸めようとすると |
/// 数値の小数部分を切り出し。 | ||
/// | ||
/// If the number is an integer, returns `0`. | ||
/// もしその値が整数であれば、「0」を返します。 |
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.
/// もしその値が整数であれば、「0」を返します。 | |
/// もしその値が整数であれば、`0`を返します。 |
/// error if the resulting [`float`] or [`decimal`] is larger than the maximum | ||
/// 64-bit signed integer or smaller than the minimum for that type. | ||
/// この関数はつねに整数値($int)を返し、結果となる[`float`]や[`decimal`]が | ||
/// 64ビット符号つき整数の最大値より大きい、または最小値より小さい場合は |
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.
/// 64ビット符号つき整数の最大値より大きい、または最小値より小さい場合は | |
/// 64ビット符号付き整数の最大値より大きい、または最小値より小さい場合は |
/// error if the resulting [`float`] or [`decimal`] is larger than the maximum | ||
/// 64-bit signed integer or smaller than the minimum for that type. | ||
/// この関数はつねに整数値($int)を返し、結果となる[`float`]や[`decimal`]が | ||
/// 64ビット符号つき整数の最大値より大きい、または最小値より小さい場合は |
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.
/// 64ビット符号つき整数の最大値より大きい、または最小値より小さい場合は | |
/// 64ビット符号付き整数の最大値より大きい、または最小値より小さい場合は |
/// error if the resulting [`float`] or [`decimal`] is larger than the maximum | ||
/// 64-bit signed integer or smaller than the minimum for that type. | ||
/// この関数はつねに整数値($int)を返し、結果となる[`float`]や[`decimal`]が | ||
/// 64ビット符号つき整数の最大値より大きい、または最小値より小さい場合は |
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.
/// 64ビット符号つき整数の最大値より大きい、または最小値より小さい場合は | |
/// 64ビット符号付き整数の最大値より大きい、または最小値より小さい場合は |
#[func(title = "Binomial")] | ||
pub fn binom( | ||
/// The upper coefficient. Must be non-negative. | ||
/// 全体の数。0または正の値である必要があります。 |
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.
間違いではないのですが、「下側の係数」と合わせた方が良いかなと思いました。
/// 全体の数。0または正の値である必要があります。 | |
/// 上側の係数。0または正の値である必要があります。 |
} | ||
|
||
/// Calculates the hyperbolic cosine of a hyperbolic angle. | ||
/// 双曲線角の双曲線コサイン。 |
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.
「ハイパーボリックコサイン(双曲線余弦)を計算。」あるいは「ある双曲角のハイパーボリックコサイン(双曲線余弦)。」など
#[func(title = "Hyperbolic Cosine")] | ||
pub fn cosh( | ||
/// The hyperbolic angle whose hyperbolic cosine to calculate. | ||
/// 双曲線コサインを計算する双曲線角。 |
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.
/// 双曲線コサインを計算する双曲線角。 | |
/// ハイパーボリックコサインを計算する双曲角。 |
} | ||
|
||
/// Calculates the hyperbolic tangent of an hyperbolic angle. | ||
/// 双曲線角の双曲線タンジェント。 |
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.
「ハイパーボリックタンジェント(双曲線正接)を計算。」あるいは「ある双曲角のハイパーボリックタンジェント(双曲線正接)。」など
#[func(title = "Hyperbolic Tangent")] | ||
pub fn tanh( | ||
/// The hyperbolic angle whose hyperbolic tangent to calculate. | ||
/// 双曲線タンジェントを計算する双曲線角。 |
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.
/// 双曲線タンジェントを計算する双曲線角。 | |
/// ハイパーボリックタンジェントを計算する双曲角。 |
Calculationを翻訳しました。