From 1e927dd66e24b72ac3ba129dfb578746ce896ce2 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 19 Feb 2021 18:39:43 -0500 Subject: Fix translation regex replacements (#1423) * Fix regex replacements having issues at the start of scanned text * Fix test cases * Add tests --- test/data/dictionaries/valid-dictionary2/tag_bank_1.json | 4 +++- test/data/dictionaries/valid-dictionary2/term_bank_1.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'test/data/dictionaries/valid-dictionary2') diff --git a/test/data/dictionaries/valid-dictionary2/tag_bank_1.json b/test/data/dictionaries/valid-dictionary2/tag_bank_1.json index 109ad395..d66db94b 100644 --- a/test/data/dictionaries/valid-dictionary2/tag_bank_1.json +++ b/test/data/dictionaries/valid-dictionary2/tag_bank_1.json @@ -3,5 +3,7 @@ ["tag2", "category2", 0, "tag2 notes", 0], ["tag3", "category3", 0, "tag3 notes", 0], ["tag4", "category4", 0, "tag4 notes", 0], - ["tag5", "category5", 0, "tag5 notes", 0] + ["tag5", "category5", 0, "tag5 notes", 0], + ["popular", "popular", 0, "popular term", 0], + ["vt", "partOfSpeech", 0, "transitive verb", 0] ] \ No newline at end of file diff --git a/test/data/dictionaries/valid-dictionary2/term_bank_1.json b/test/data/dictionaries/valid-dictionary2/term_bank_1.json index 32dc1ede..fcfe7365 100644 --- a/test/data/dictionaries/valid-dictionary2/term_bank_1.json +++ b/test/data/dictionaries/valid-dictionary2/term_bank_1.json @@ -9,5 +9,7 @@ ["打ち込む", "うちこむ", "tag1 tag2", "v5", 1, ["definition15", "definition16"], 4, "tag5 tag6 tag7"], ["打ち込む", "ぶちこむ", "tag1 tag2", "v5", 10, ["definition17", "definition18"], 4, "tag3 tag4 tag5"], ["打ち込む", "ぶちこむ", "tag1 tag2", "v5", 1, ["definition19", "definition20"], 4, "tag3 tag4 tag5"], - ["画像", "がぞう", "tag1 tag2", "", 1, ["definition21", {"type": "image", "path": "image.gif", "width": 350, "height": 350, "description": "An image", "pixelated": true}], 5, "tag3 tag4 tag5"] + ["画像", "がぞう", "tag1 tag2", "", 1, ["definition21", {"type": "image", "path": "image.gif", "width": 350, "height": 350, "description": "An image", "pixelated": true}], 5, "tag3 tag4 tag5"], + ["読む", "よむ", "popular", "v5", 100, ["to read"], 6, "vt"], + ["強み", "つよみ", "popular", "n", 90, ["strong point"], 7, ""] ] \ No newline at end of file -- cgit v1.2.3