Skip to content

Update syntax.{txt,jax} #1215

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

Closed
wants to merge 18 commits into from

Conversation

cmplstofB
Copy link
Contributor

翻訳しました。よろしくおねがいします。

4d32d3b における翻訳修正について

"@" が使えるようになっている。しかし*.texファイルは次の拡張子: sty cls clo dtx
ltx を持たないので @ をエラーと判断してハイライトする。これを解決するにはこう

私のコミットメッセージでは原文と意味が違うとかなんとかぬかしてますが,すいません,意味は合ってました。

ただし,やはりすこし不自然に感じます (Vimの内部実装によりすぎ?) ので,原文に忠実であることを前提として,(La)TeX における事情を踏まえた翻訳にしました。また,訳注を付すことによってもこの設定の意図するところを分かりやすしました……そのつもりです。

これは今回の更新で変更された場所ではない。
以前から未翻訳だった。
修正前の文章は,原文と意味が異なってしまっている(直訳してもおかしい)。
(La)TeX における事情を踏まえたうえで,原文の意味を保つことを最優先にして翻訳しなおした。
また,念の為訳注を付してこの設定の意図するところを分かりやすくした。
Copy link
Member

@h-east h-east left a comment

Choose a reason for hiding this comment

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

ひと通りレビューしました。

@@ -500,7 +500,7 @@ Force to omit the line numbers: >
Go back to the default to use 'number' by deleting the variable: >
:unlet g:html_number_lines
<
*g:html_line_ids*
*g:html_line_ids*
Copy link
Member

Choose a reason for hiding this comment

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

こちらの変更を syntax.jax へ反映お願いします。

@@ -1810,6 +1827,17 @@ htmlプロセッサー言語は複数ある。html.vimはインクルードし
そしてプリプロセッサー言語を含むすべての領域をクラスタhtmlPreprocに加えればよ
い。

*html-folding*
Copy link
Member

Choose a reason for hiding this comment

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

空白部分、原文まま(タブ7つ)でお願いします。

@@ -2932,30 +2958,30 @@ Default folding is rather detailed, i.e., small syntax units like "if", "do",

You can set "ruby_foldable_groups" to restrict which groups are foldable: >

:let ruby_foldable_groups = 'if case %'
:let ruby_foldable_groups = 'if case %'
Copy link
Member

Choose a reason for hiding this comment

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

こちらの変更を .jax へ反映お願いします。

<
The value is a space-separated list of keywords:

keyword meaning ~
-------- ------------------------------------- ~
ALL Most block syntax (default)
NONE Nothing
if "if" or "unless" block
if "if" or "unless" block
Copy link
Member

Choose a reason for hiding this comment

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

同上。

def "def" block
class "class" block
module "module" block
do "do" block
do "do" block
Copy link
Member

Choose a reason for hiding this comment

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

同上。

Comment on lines +3355 to +3359
{訳注: この挙動は、おもに LaTeX において、「@ を含むコマンドは開発用途として
使う」という取り決めがあることに由来する(と思われる)。ちょうど、一般のプログ
ラミング言語における隠蔽変数のようなものである。「普通の」TeX ファイルを編集
するさいには、そのようなコマンドを扱うことはないから、@ を含んだコマンドが
「エラー」になるのはある意味で正しい挙動と言える。}
Copy link
Member

Choose a reason for hiding this comment

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

L2957 辺りのコメントに書きましたが、この注釈が無いと分かり辛いと感じたのでしたら、原文(syntax.txt)に説明を追加する事を検討ください。

Copy link
Member

@h-east h-east left a comment

Choose a reason for hiding this comment

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

コメントが1つ反映されていなかったので追加。

Comment on lines +3346 to +3348
"\makeatletter" を用いれば、*.tex ファイルのなかで "@" という文字を含むコマンド
を利用できる。しかしながら、拡張子が sty cls clo dtx ltx のどれでもない場合、@
を含むコマンドはエラーとして表示される。これを解決するには: >
Copy link
Member

@h-east h-east Jan 22, 2023

Choose a reason for hiding this comment

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

  • sufficessuffixesのtypoですね。typo報告スレに差分張りました。
    (extensions が妥当な気がする)
    ところで、clo だけ filetype.vim に見つからないですね。これもtypoなんでしょうか?

  • 直訳に寄せました。いかがでしょうか?

Suggested change
"\makeatletter" を用いれば、*.tex ファイルのなかで "@" という文字を含むコマンド
を利用できる。しかしながら、拡張子が sty cls clo dtx ltx のどれでもない場合、@
を含むコマンドはエラーとして表示される。これを解決するには: >
*.tex ファイルで "\makeatletter" を使用すると、"@" を含むコマンドを使用できる
ようになる。しかしながら、*.tex ファイルは sty cls clo dtx ltx のいずれかの接
尾辞ではないため、構文の強調表示によって @ の使用箇所がエラーとして表示される。
これを解決するには: >

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ここのsuffixはファイル拡張子のことを表していると思うのですが、「接尾辞」と訳すべきでしょうか。

参考

https://github.com/vim/vim/blob/ce93d162da8de2419c15b63286e2f72a8fe3bf2d/runtime/syntax/tex.vim#L81-L95

Copy link
Member

Choose a reason for hiding this comment

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

今はsuffixesになっているので、「接尾辞」でお願いします。
私がtypoのコメントで「(extensions が妥当な気がする)」と言っているのでそちらに反応して欲しかったです。

Copy link
Member

Choose a reason for hiding this comment

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

ところで、clo だけ filetype.vim に見つからないですね。これもtypoなんでしょうか?

syntax/tex.vim には含まれているので typo ではなさそうです。

@h-east h-east changed the title Update syntax.{txt/jax} Update syntax.{txt,jax} Feb 4, 2023
@h-east
Copy link
Member

h-east commented Feb 16, 2023

反映されていない部分を対応したものをPRさせていただきました。 #1222

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