computerline1z / okapi

Automatically exported from code.google.com/p/okapi
0 stars 0 forks source link

Checkmate: Error description confusing #439

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add the following check rule:
Source pattern: \x0a (or alternatively \x0d OR \x0d\x0a)
Target pattern: <same>
Description: "Line Break missing"
2. Run the rules on a TMX file where a line break is missing in the target.

What is the expected output? What do you see instead?
The source part "\x0a" ist not in the target (from rule: Line Break missing").

Instead I see:
The source part "" ist not in the target (from rule: Line Break missing").

It seems as if the regular expression is not displayed in the message. I only 
have this phenomenon with the expressions metioned above. Others work fine

What version of the product are you using? On what operating system?
0.26, Windows 7

Original issue reported on code.google.com by m...@sebastianebert.com on 30 Jan 2015 at 7:54

GoogleCodeExporter commented 9 years ago

Original comment by tingley on 6 Mar 2015 at 7:32

GoogleCodeExporter commented 9 years ago
Fixed (commit 0382c1c5f873).  The literal line break that was missing was 
ending up in the issue message, and this broke the CheckMate display.

One caveat -- we can't distinguish between patterns that use \x0a versus those 
that use other forms like \n (ditto for \x0d).  So the error message we produce 
now escapes the U+000A as '\n' and U+000D as '\r', since those forms are 
slightly more recognizable.

Original comment by tingley on 6 Mar 2015 at 7:53