Skip to content
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

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

Ninzore
Copy link
Contributor

@Ninzore Ninzore commented Jan 14, 2024

Known issue: some text is not replaced with translation
I'm really not familiar with BS, please have a look

bug:  some text is not replaced with translation
@Ninzore
Copy link
Contributor Author

Ninzore commented Jan 14, 2024

Relative issue #360

@yihong0618
Copy link
Owner

thanks will take a look later~

known issue:
1. sometime the original text show up
2. resume function not working
Copy link
Owner

@yihong0618 yihong0618 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@Ninzore
Copy link
Contributor Author

Ninzore commented Jan 18, 2024

I want to mention the resume function doesn't work in this PR, but the rest are seems to be working properly.

Comment on lines 130 to 161
# 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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be deteled?

Copy link
Contributor Author

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

@yihong0618 yihong0618 merged commit 40aaa9b into yihong0618:main Jan 19, 2024
2 checks passed
@yihong0618
Copy link
Owner

@Ninzore thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants