-
Notifications
You must be signed in to change notification settings - Fork 65
Update builtin.{txt,jax} #1471
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
Update builtin.{txt,jax} #1471
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.
L2283 までレビューしました。
Avoid using 「もし」 Co-authored-by: h_east <[email protected]>
「もし」を使って訳していた部分の訳を全て見直しました。 |
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.
L4266 までレビューしました。
Co-authored-by: h_east <[email protected]>
Co-authored-by: h_east <[email protected]>
- Respect "Note:" - Only use "|Type|".
doc/builtin.jax
Outdated
@@ -2269,6 +2276,8 @@ empty({expr}) *empty()* | |||
- ジョブ |Job| は開始に失敗したときは空である。 | |||
- チャネル |Channel| は閉じられていると空である。 | |||
- |Blob| はその長さが0のときは空である。 | |||
- |Object| はオブジェクトの組み込みメソッド | |||
|empty()| (存在する場合) が真を返すとき空である。 |
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.
|empty()| (存在する場合) が真を返すとき空である。 | |
|empty()| が (存在し) 真を返すとき空である。 |
これなら自然に読めるかと思いました。この書き方だと (もし存在し) の方がいいかもしれませんが。
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.
#1471 (comment)
一応、こういうやりとりはありました。
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.
原文へのsuggestなんですが、いちいち (if present)
は要らないのでは?
だって、関数が存在しない条件は、builtin.txt の冒頭(builtin-functions
)に書かれているし。
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.
この (if present)
が指すのは、組み込み関数の empty が存在するかどうかということではなく、クラスにメンバ関数として empty という名前の関数が実装されているかどうかということなので、:h builtin-functions
を引き合いに出してこの (if present)
がいらないんじゃない?というのは少し違うかと。
とはいえ、"if present" を括弧で括ってここに置くのはちょっと違うんじゃない?というのは同意するところです。消してしまうか、あるいは if 文としてこの一文全体を書き直してしまうか。
P.S. クラスに empty とか len とかのメンバ関数を生やして使うこの機能が実装されたのはこのコミットなので、これのテストとか眺めてもらうと雰囲気が掴みやすいかもです。
vim/vim@d3eae7b
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.
一応、こういうやりとりはありました。
はい、それに基づいた上での指摘です。
(if present) は明らかに、オブジェクトにempty()メソッドがあれば、ということを言っています。
よく考えると原文の builtin は余計で、さらに |empty()| ではなく |object-empty()| にリンクすべきなのかもしれません。
「|Object| はオブジェクトの empty() メソッド (|object-empty()|) が (もし存在し) 真を返すとき空である。」
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.
すいません、完全にこっちの最後の変更を revert するのを忘れてました。
訳文の更新は上記 PR が取り込まれてからまたやります。
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.
@mityu 確認です。本家へのPRのmerge分の反映は本PRではおこなわず、別途PRされる感じでしょうか?
(どちらでも構いません)
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.
やりました。Enum 関連の変更が私の PR よりも先に入っていたこともあって、そちらもまとめてやってしまいました。
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.
一通りレビューしました。
Co-authored-by: h_east <[email protected]>
This reverts commit 6d32962.
列挙型 enum EnumName | ||
列挙値 enum name.value {name: str, ordinal: nr} |
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.
- ここの右側は、メッセージの日本語化を施した時に出てくるメッセージを記述するようなのですが、まだこのメッセージの日本語化が追いついていないようなのでとりあえず英語のまま置いています。もし先に何か訳文を当てておいた方が良い、ということであれば
列挙型 EnumName
列挙型 name.value {name: str, ordinal: nr}
あたりに訳そうかと思います。他の訳文の提案でも構いません。
- 列挙値の方は、現状幅オーバーしており、行整形をすると折り返しが発生します。が、原文も幅オーバーしていたことと、その幅オーバーも意図的だろうと解釈して一旦そのままにしています。
数個上の「文字列」の項も折り返していますがそれは補足情報の途中のところですし、他の箇所の{日本語メッセージの場合:...
の部分でもメッセージ途中で折り返したりしているので、こっちも折り返した方が良いのか...?と悩んだのですが、辞書のダンプっぽい形式のものの途中で改行を入れるのもなんだか気持ち悪い気がしてしまい...。
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.
1つ目:
列挙型
で 👍 (vim9class.jax ではそう訳してます)
2つ目:
折り返して良いと思います。
以下、原文に対しての意見。
・{expr} type
のネストがタブ1つなのがもったいない。空白4つにすればいいのに...
・将来的に、それでも足りなくなれば、result ~
の前の空白も切り詰める...とか
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.
えーと、これはつまりこういう変更をいれて追加で push しておけば OK ということでよろしいです?(すでに Approved がついているので一応確認です)
diff --git a/doc/builtin.jax b/doc/builtin.jax
index f96903c7..b07f279c 100644
--- a/doc/builtin.jax
+++ b/doc/builtin.jax
@@ -9373,8 +9373,9 @@ string({expr}) {expr}を文字列に変換して返す。{expr}が数値、浮
辞書 {key: value, key: value}
クラス クラス SomeName
オブジェクト オブジェクト SomeName {lnum: 1, col: 3}
- 列挙型 enum EnumName
- 列挙値 enum name.value {name: str, ordinal: nr}
+ 列挙型 列挙型 EnumName
+ 列挙値 列挙型 name.value {name: str, ordinal:
+ nr}
リスト |List| や辞書 |Dictionary| に循環参照がある場合、それら
は "[...]" や "{...}" に置き換えられる。その結果に対して eval()
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.
この表は string()
の結果を示しており、例えば、
vim9script
class SomeName
endclass
echo string(SomeName)
を実行すると class SomeName
になります。
結果の欄の class
, object of
, enum
は翻訳対象ではありません。
(例えば https://github.com/vim/vim/blob/cc7597c1edf478ad912d45b27f17175236f9791e/src/vim9class.c#L3855 )
改行を入れるかどうかは、string()
の結果をそのまま示すという意味では改行しない方がよさそうに思いました。(もし改行を入れるなら、原文に入れてからの方がよいかと。)
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.
なるほど。その通りですね。
class
, object of
は昔の私がやっちゃってました。 @mityu お手数ですがあわせて修正お願いします。
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.
対応しました。
Co-authored-by: K.Takata <[email protected]>
Thanks!! |
みなさんレビューありがとうございました! |
翻訳しました。よろしくお願いします。
1箇所文体の不一致を見つけたので、そこの修正も一緒に入れています。