Skip to content

Commit b3bbe21

Browse files
authored
Fix the error message (#23)
* Fix the error message - 文字「が」見つかる (名詞 + be found) / 文字「を」見つける (find + 名詞) のどちらかであるべきなので、このような際のエラーメッセージに典型的に用いられる "Cannot find + 名詞" と表現。 - 両者を見せるエラーメッセージは This pair of (punctuation) marks などとするのがよい(cf. https://en.wikipedia.org/wiki/Guillemet )ので、その旨修正。 * The test must also be modified accordingly
1 parent 269d0c6 commit b3bbe21

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/textlint-rule-no-unmatched-pair.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ const report = (context) => {
3939
report(
4040
node,
4141
new RuleError(
42-
`Not found pair character for ${contextLocation.pairMark.start}.
42+
`Cannot find a pairing character for ${contextLocation.pairMark.start}.
4343
4444
You should close this sentence with ${contextLocation.pairMark.end}.
45-
This pair mark is called ${contextLocation.pairMark.key}.`,
45+
This pair of marks is called ${contextLocation.pairMark.key}.`,
4646
{
4747
index: sentenceIndex - node.range[0] + contextLocation.index
4848
}

test/textlint-rule-no-unmatched-pair-test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ tester.run("textlint-rule-no-unmatched-pair", rule, {
4747
errors: [
4848
{
4949
index: 4,
50-
message: `Not found pair character for (.
50+
message: `Cannot find a pairing character for (.
5151
5252
You should close this sentence with ).
53-
This pair mark is called 丸括弧().`
53+
This pair of marks is called 丸括弧().`
5454
}
5555
]
5656
},
@@ -59,10 +59,10 @@ This pair mark is called 丸括弧().`
5959
errors: [
6060
{
6161
index: 11,
62-
message: `Not found pair character for ".
62+
message: `Cannot find a pairing character for ".
6363
6464
You should close this sentence with ".
65-
This pair mark is called double quote.`
65+
This pair of marks is called double quote.`
6666
}
6767
]
6868
},

0 commit comments

Comments
 (0)