|
7 | 7 | {
|
8 | 8 | absent: String.raw`^ \s* conn = DriverManager \. getConnection \( url \,`,
|
9 | 9 | text: "Your answer should start with `conn = DriverManager.getConnection( url,` just as the initial value did. You might want to use the `Reset` button.",
|
| 10 | + text_ja: "回答は元からあるように `conn = DriverManager.getConnection( url,` で始まるはずです。「リセット」ボタンを使うとよいかもしれません。", |
10 | 11 | },
|
11 | 12 | {
|
12 | 13 | absent: String.raw`System \. getenv`,
|
13 | 14 | text: "Use `System.getenv` to retrieve an environment variable value. For example, use `System.getenv(\"USERNAME\")` to retrieve the username.",
|
| 15 | + text_ja: "環境変数の値を取得するためには `System.getenv` を使います。例えばユーザ名を取得するためには `System.getenv(\"USERNAME\")` を使ってください。", |
14 | 16 | },
|
15 | 17 | {
|
16 | 18 | present: String.raw`System \. getenv \( \"admin\" \)`,
|
17 | 19 | text: "You need to pass to `System.getenv` the name of an environment variable value, not the result you might get. Do not use constructs like `System.getenv(\"admin\")`. Instead, for example, use `System.getenv(\"USERNAME\")` to retrieve the username.",
|
| 20 | + text_ja: "`System.getenv` には取得したい値ではなく、環境変数の名前を渡します。`System.getenv(\"admin\")` の代わりに、例えばユーザ名を取得するためには `System.getenv(\"USERNAME\")` としてください。", |
18 | 21 | },
|
19 | 22 | {
|
20 | 23 | absent: String.raw`System \. getenv \( \"PASSWORD\" \)`,
|
21 | 24 | text: "Use `System.getenv` to retrieve an environment variable value. For example, use `System.getenv(\"USERNAME\")` to retrieve the username.",
|
| 25 | + text_ja: "環境変数の値を取得するためには `System.getenv` を使います。例えばユーザ名を取得するためには `System.getenv(\"USERNAME\")` を使ってください。", |
22 | 26 | },
|
23 | 27 | {
|
24 | 28 | present: "admin",
|
25 | 29 | text: "The term 'admin' should not be in your code. You should be retrieving both the username and the password from somewhere else, in this case, from environment variables.",
|
| 30 | + text_ja: "'admin' という語句はコードに現れるべきではありません。ユーザ名とパスワードのどちらもどこか他の場所から、今回のケースでは環境変数の値から取得する必要があります。", |
26 | 31 | },
|
27 | 32 | {
|
28 | 33 | present: "(system|Getenv|GetEnv)",
|
29 | 34 | text: "Java is case-sensitive. You need to use `System.getenv` and not some other variation of uppercase or lowercase.",
|
| 35 | + text_ja: "Java は大文字と小文字を区別します。`System.getenv` 以外の大文字と小文字の組み合わせを使ってはいけません。", |
30 | 36 | },
|
31 | 37 | {
|
32 | 38 | absent: String.raw`\; \s* $`,
|
33 | 39 | text: "Java statements must end with a semicolon.",
|
| 40 | + text_ja: "Java のステートメントはセミコロンで終わる必要があります。", |
34 | 41 | },
|
35 | 42 | {
|
36 | 43 | absent: String.raw`\) \) \; \s* $`,
|
37 | 44 | text: "Double-check your closing parentheses at the end of the statement.",
|
| 45 | + text_ja: "ステートメント終わりの右側(閉じ)カッコをもう一度確認してください。", |
38 | 46 | },
|
39 | 47 | {
|
40 | 48 | present: String.raw`new\s+String`,
|
41 | 49 | text: "You do not need to construct a new string to retrieve an environment variable value.",
|
| 50 | + text_ja: "環境変数の値を取得するために新たに文字列を作成する必要はありません。", |
42 | 51 | },
|
43 | 52 | {
|
44 | 53 | present: String.raw`^ conn = DriverManager \. getConnection \( url \) \; \s* $`,
|
45 | 54 | text: "In some sense this is correct, as long as the url is not hardcoded. However, it's often better if administrators can easily change the username or password separately, and it makes out point clearer. Please provide the username and password and separate values.",
|
| 55 | + text_ja: "URL がハードコードされていない限り、ある意味これは正解です。しかしユーザ名とパスワードを容易にかつ個別に変更できることはしばしば管理者にとって望ましく、かつそれにより問題の本質が明確になります。ユーザ名とパスワードは個別の値としてください。", |
46 | 56 | },
|
47 | 57 | {
|
48 | 58 | present: String.raw`^ \s* conn = DriverManager \. getConnection \( url \,
|
49 | 59 | System \. getenv \( "PASSWORD" \) \,
|
50 | 60 | System \. getenv \( "USERNAME" \) \) \; \s* $`,
|
51 | 61 | text: "The order of parameters is wrong. Provide the url, then the username, then the password. You're providing the url, then the password, then the username, which swaps the second and third parameters.",
|
| 62 | + text_ja: "引数の順番に誤りがあります。URL、ユーザ名、パスワードの順としてください。URL、パスワード、ユーザ名の順になっており、二番目と三番目の引数が逆になっています。", |
52 | 63 | },
|
53 | 64 | ],
|
54 | 65 | expected: [
|
|
0 commit comments