-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: combine multiple lines into one block, add a new option --block_size #370
Conversation
bug: some text is not replaced with translation
Relative issue #360 |
thanks will take a look later~ |
known issue: 1. sometime the original text show up 2. resume function not working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
I want to mention the resume function doesn't work in this PR, but the rest are seems to be working properly. |
book_maker/loader/epub_loader.py
Outdated
# def _process_paragraph(self, p, index, p_to_save_len): | ||
# if not p.text or self._is_special_text(p.text): | ||
# return index | ||
|
||
# new_p = copy(p) | ||
|
||
# for p_exclude in self.exclude_translate_tags.split(","): | ||
# # for issue #280 | ||
# if type(p) == NavigableString: | ||
# continue | ||
# for pt in new_p.find_all(p_exclude): | ||
# pt.extract() | ||
|
||
# if self.resume and index < p_to_save_len: | ||
# new_p.string = self.p_to_save[index] | ||
# else: | ||
# if type(p) == NavigableString: | ||
# new_p = self.translate_model.translate(new_p.text) | ||
# self.p_to_save.append(new_p) | ||
# else: | ||
# new_p.string = self.translate_model.translate(new_p.text) | ||
# self.p_to_save.append(new_p.text) | ||
|
||
new_p = copy(p) | ||
# self.helper.insert_trans( | ||
# p, new_p.string, self.translation_style, self.single_translate | ||
# ) | ||
# index += 1 | ||
|
||
# if index % 20 == 0: | ||
# self._save_progress() | ||
|
||
# return index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be deteled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can do that
@Ninzore thanks |
Known issue: some text is not replaced with translation
I'm really not familiar with BS, please have a look