Replies: 1 comment
-
とりあえず、該当部分のコードブロックの頭を、 この問題はこれだけではなく、HTMLを日本語訳したときに、日本語中に現れる英数字の前後に空白を入れた場合、その空白が強制的に改行に置き換えられてしまうことがあるなど、特に日本語のような単語間に空白を入れない言語では、この対応によりソースが読みにくくなることかま多いと思います。 そもそも、MDNの日本語訳では英語版のHTMLをコピーして、部分的にローカライズするだけだと思いますので、あまりリンターで検査・修正する必要性を感じません。むしろ、勝手に改行位置が変更されることがあるので、英語版が更新されたときに、それに合わせて翻訳版を更新するのが面倒になると感じています。 Prettierを導入した人に抗議を申し入れたのですが、このツールは私たちが開発しているものではないから、との一点張りで取り合ってもらえませんでした。 そもそも、特定の文字数で改行を入れて行を折り返すという発想自体、様々なスクリーンサイズがある現代としては、時代に逆行するとても古い発想だと思います。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
今日のミートアップで自分担当の Pull Request を見ていて、reviewdog による自動レビューが気になったので、自分の調査、Slack、報告会での参加者とのやり取りでわかったことを共有します。
自動レビューの仕組み
MDN のレポジトリーに Pull Request をすると、GitHub Action が動き、色々なチェックが行われます。
チェックでエラーになってマージできないということは、以前からあったと思いますが、エラーになった場合に、そのエラーに対する修正の提案を自動で行うのが reviewdog です。 reviewdog は修正内容の投稿をするだけで、エラーチェック自体は別のツールによって行われます。MDN では、markdownlint と prettier によるエラーチェックがあります(Action の "Lint and review content files”)。
気になったエラー修正(余分に改行されてしまう)
展開する操作が面倒と思うので画像で貼り付けます。
元 PR は以下です。
mdn/translated-content#17917
実際のエラーの Actionログは以下にあります。
https://github.com/mdn/translated-content/actions/runs/7540000163/job/20523677196
改行されてしまうのは、該当部分が HTML として扱われていることが原因です。以下に解説があります。
不自然な自動レビューによる修正提案が頻発するようなら困ると思い、調べ始めたのですが、ひとまずは様子見とします。
自動レビューで困っていることや対処法などあれば、このディスカッションにお寄せください。
Beta Was this translation helpful? Give feedback.
All reactions