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

Original text popup #65

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Original text popup #65

wants to merge 3 commits into from

Conversation

jelmervdl
Copy link
Owner

Implement #5 by getting the original text from the "restore page" feature.

It doesn't have information about sentence ends, so currently generates a popup the size of the translated DOM node (or "chunk")

@jelmervdl
Copy link
Owner Author

jelmervdl commented Jan 2, 2023

image

Doesn't work all that well without sentence boundaries unfortunately.

Intl.Segmenter exists but I don't want to have two sentence splitters inside the project, with the chance that they go out of sync and its unable to map the correct sentence to the correct translated sentence :/

@jelmervdl
Copy link
Owner Author

For simple content it works quite well though:
image

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.

1 participant