-
Notifications
You must be signed in to change notification settings - Fork 46
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
Multi-line sentence translation #428
Comments
Actually, a better solution, rather than a per-book import option, might be just to have separate hotkeys for "translate line" and "translate sentence". The former would work the same way it works currently. The latter would scan forwards and backwards for the previous and next sentence delimiter and translate everything in between. Sentence delimiters could be configurable per-language. |
Thanks @bwkimmel . The challenge here is that Lute thinks that sentences that break across lines are separate things. Parsing gets pretty tough with various scenarios, song lyrics, etc. Lute thinks these are two sentences, even though that's obviously not the case:
I usually remove all of the unwanted newlines from simple imports ... but that gets messy. Sometimes I just live with it. Sentence delimiters are configurable per language already :-) in the settings > language > forms. |
Is your feature request related to a problem? Please describe.
Sentence translation only translates the current line of text, even if the sentence spans multiple lines.
Describe the solution you'd like
Some texts may consistently include punctuation (periods), while others may not. Perhaps there could be a per-book setting (with a configurable default -- perhaps in the language settings?) to indicate what characters are considered sentence delimiters (and, in particular, whether newlines are considered sentence delimiters).
Alternatively, or in addition, perhaps there could be a separate option to pass all of the highlighted text (which may span multiple lines) to the configured sentence translation page.
Describe alternatives you've considered
Alternatives include:
Additional context
In the screenshot below, I have a word within a 2-line sentence selected. When I hit 't', only the line containing the highlighted word is passed to the translation page. I would like for both lines to be passed. This particular text consistently has periods to delimit sentences.
The text was updated successfully, but these errors were encountered: