-
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Highlights inconsistent paragraphs between the original and tra…
…nslation lines. resolved #82
- Loading branch information
Showing
13 changed files
with
131 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import unittest | ||
|
||
from ..lib.cache import Paragraph | ||
|
||
|
||
class TestParagraph(unittest.TestCase): | ||
def setUp(self): | ||
self.paragraph = Paragraph( | ||
1, 'TEST', 'a\n\nb\n\nc', 'a\n\nb\n\nc\n\n', | ||
translation='A\n\nB\n\nC', attributes='{"class": "test"}') | ||
|
||
def test_get_attributes(self): | ||
self.assertEqual({'class': 'test'}, self.paragraph.get_attributes()) | ||
|
||
def test_check_translation(self): | ||
self.assertTrue(self.paragraph.is_alignment('\n\n')) | ||
|
||
self.paragraph.original = 'a\n\nb\n\nc' | ||
self.paragraph.translation = 'A\n\nB\nC\n\n' | ||
self.assertFalse(self.paragraph.is_alignment('\n\n')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: Ebook Translator Calibre Plugin\n" | ||
"Report-Msgid-Bugs-To: [email protected]\n" | ||
"POT-Creation-Date: 2024-02-17 16:48+0800\n" | ||
"POT-Creation-Date: 2024-02-26 22:51+0800\n" | ||
"PO-Revision-Date: 2023-04-17 14:17+0800\n" | ||
"Last-Translator: Automatically generated\n" | ||
"Language-Team: none\n" | ||
|
@@ -276,6 +276,9 @@ msgstr "" | |
msgid "Untranslated" | ||
msgstr "" | ||
|
||
msgid "The translation line count does not match the original." | ||
msgstr "" | ||
|
||
msgid "Select the whole chapter" | ||
msgstr "" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: Ebook Translator Calibre Plugin\n" | ||
"Report-Msgid-Bugs-To: [email protected]\n" | ||
"POT-Creation-Date: 2024-02-17 16:48+0800\n" | ||
"POT-Creation-Date: 2024-02-26 22:51+0800\n" | ||
"PO-Revision-Date: 2023-10-01 15:35-0400\n" | ||
"Last-Translator: <a href=\"https://www.mobileread.com/forums/member.php?" | ||
"u=90932\">PoP</a>\n" | ||
|
@@ -284,6 +284,9 @@ msgstr "Statut" | |
msgid "Untranslated" | ||
msgstr "Non-traduit" | ||
|
||
msgid "The translation line count does not match the original." | ||
msgstr "" | ||
|
||
msgid "Select the whole chapter" | ||
msgstr "Choisissez le chapitre en entier" | ||
|
||
|
Oops, something went wrong.