-
Notifications
You must be signed in to change notification settings - Fork 18
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
windows-gotchas を翻訳 #118
windows-gotchas を翻訳 #118
Conversation
ひとまず原文との比較がしやすいよう、原文を併記したバージョンをコミットします。最終的に消します ついでに、訳していて気づいた、原文のおかしな部分を修正しました
@cdepillabout 英語への翻訳なので、できればレビューをお願いしたいです! 🙏 |
|
||
すごく簡潔にまとめるとこの間の下記のツイートに収まるのですが、もう少し丁寧に補足するために書きます。 | ||
|
||
<blockquote class="twitter-tweet" data-lang="ja"><p lang="ja" dir="ltr">学んだことをまとめると<br>- Invalid characterと言われたらchcp 65001しよう<br>- Permission Deniedと言われたらビルドし直そう<br>- 日本語のパスが混ざらないよう気をつけよう<br>- Cのライブラリーはものによる<br>ですか。多分 <a href="https://twitter.com/hashtag/haskell?src=hash&ref_src=twsrc%5Etfw">#haskell</a> 以外でも有益な話。</p>— Yuji Yamamoto: 山本悠滋 (@igrep) <a href="https://twitter.com/igrep/status/938056578934042626?ref_src=twsrc%5Etfw">2017年12月5日</a></blockquote> |
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.
Oh, the preview page shows the Japanese version of the tweet...
Seems the js file provided by Twitter automatically rewrites it into the original.
A bit difficult...
正直に言って私は原因はサッパリ分かってないのですが、このエラーは大抵の場合何度も同じコマンドを実行すれば再現しませんでした。 | ||
The key is to repeat many times. Never give up only by once or twice 😅 | ||
一度や二度ではめげず、繰り返すのがポイントです 😅 | ||
It also might fix the error to turn off your antivirus software's scanning of the problematic directory, Dropbox's synchronisatin, or some other similar things. |
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.
Turning off your antivirus software's scanning of the problematic directory, Dropbox's synchronisatin, etc might also fix such errors.
のように、クエスチョンマークに変換されるようになります。そう、日本語のWindowsでGHCをお使いの方は一度は目にした「?」ではないでしょうか😅 | ||
This makes me guess GHC executes `hSetEncoding stderr $ mkLocaleEncoding TransliterateCodingFailure` by default before printing out the compilation error. | ||
つまりGHCはデフォルトで`hSetEncoding stderr $ mkLocaleEncoding TransliterateCodingFailure`しているものと推測されます。 | ||
Anyway, it's good that the program dosen't abort due to the error! |
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.
doesn't
そんなときは、実際にエラーが起きているコマンドの開発元にバグ報告するか、自分で直してみましょう。 | ||
When reporting, asking the developer to run after `chcp 932' could help he/she reproduce the bug (Sorry, I've never tried it). | ||
バグ報告する場合は、「`chcp 932`してから実行してみて」とお願いすると、バグ報告を受けた開発者も再現しやすくて助かるかも知れません(残念ながら私はやったことがありません)。 | ||
When fixing by yourself, it'd be the best and certain way to switch the character encoding of the `Handle` object, among the many other ways. |
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 fixing by yourself, perhaps the best and most certain way would be to switch the character encoding of the Handle
object.
[^eta-20127]: By the way, when I once tried to build the compiler of [Eta](http://eta-lang.org/), (as long as I remember) `chcp 65001` didn't fix the problem, but `chcp 20127` did. | ||
As `chcp 20127` switches into US-ASCII, so I suspect the local environment of the developer of Eta is US-ASCII... | ||
|
||
If the error still happenes, report to the developer, or let's fix it by yourself! |
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 the error still happens you can either report to the developer, or fix it yourself!
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.
Don't you say "by yourself"? My dictionary doesn't say such an idiom though I remember I heard "yourself" without "by".
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.
Hmm I think the difference is subtle.. but "yourself" is better than "by yourself" in this context..
here is a link https://english.stackexchange.com/questions/112816/difference-between-do-it-yourself-and-do-it-by-yourself
|
||
If the error still happenes, report to the developer, or let's fix it by yourself! | ||
そんなときは、実際にエラーが起きているコマンドの開発元にバグ報告するか、自分で直してみましょう。 | ||
When reporting, asking the developer to run after `chcp 932' could help he/she reproduce the bug (Sorry, I've never tried it). |
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 reporting; asking the developer to run after doing `chcp 932' could help her reproduce the bug (Sorry, I've never tried it).
According to my guess, the `chcp 65001` command doesn't affect the grandchild processes of the Command Prompt (or bash etc.) on which the `chcp` is run (i.e. the child processes of the command you enter). | ||
私の推測なんですが、どうも`chcp 65001`は`chcp 65001`したコマンドプロンプト(とかbash)の孫プロセス(つまり、あなたが入力したコマンドの子プロセス)には届かないことがあるようです。 | ||
|
||
[^eta-20127]: By the way, when I once tried to build the compiler of [Eta](http://eta-lang.org/), (as long as I remember) `chcp 65001` didn't fix the problem, but `chcp 20127` did. |
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.
(as far as I remember)
/c/Windows/System32/chcp.com 932 | ||
``` | ||
|
||
### Still if it doesn't work, or you're the developer of the libraries etc. |
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 still it doesn't work, or you're the developer of the libraries etc.
### If you encounter as a user | ||
### ユーザーとして出くわした場合 | ||
|
||
In many cases, you can avoid this kind of errors by running the command below in advance. |
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.
In many cases you can avoid these kind of errors by running the below command in advance.
# chcp 65001 if "Invalid character" | ||
# Invalid characterと言われたらchcp 65001しよう | ||
|
||
I guess you'd encounter most freqquently with this, which can't be avoided if you don't know. |
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.
You would have encountered this frequently, especially if you don't know how to avoid/fix this.
(you used & in Japanese? first time I am seeing such usage)
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.
(you used & in Japanese? first time I am seeing such usage)
Actually it's unusual to use & in Japanese, but sometimes in a casual sentence.
hSetEncoding handle utf8 | ||
``` | ||
|
||
As a bonus, I'll show you how [I actually addressed myself to the problem to fix a bug of haddock](https://github.com/haskell/haddock/pull/566), as an example case when the error is caused by the standard output (or standard error output). |
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.
As a bonus, I'll show you an example of how I myself addressed a problem caused by the standard output (or standard error output), and fixed a bug in haddock.
Not too sure about this.. I can hardly understand the Japanese here..
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.
Hmmm... I'm not sure how I make it sense for you...
Things I want to tell are:
- I'm going to show you an example when the error was caused by the standard output or standard error output.
- With the pull request by which I fixed a bug of haddock.
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.
In that case what I wrote is correct.. I went through the PR and understood what you are trying to say..
Nice work! mostly I was able to understand the article' content. |
@dfordivam I've fixed all! Can you make sure all problems are fixed? Thanks! |
It automatically replaces the block with the original tweet. So I have to put the translation without it.
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.
LGTM
ひとまず原文との比較がしやすいよう、原文を併記したバージョンをコミットします。最終的に消します。
ついでに、訳していて気づいた、原文のおかしな部分を修正しました。