-
Notifications
You must be signed in to change notification settings - Fork 38
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
Allow per-input options #346
Conversation
e8afdf7
to
b4006af
Compare
Check For inputs mixed sent with corresponding HTML response-options: std::vector<std::string> plainTexts = {
"Hello World!", //
"The quick brown fox jumps over the lazy dog." //
};
std::vector<std::string> htmlTexts = {
"<a href=\"#\">Hello</a> world.", //
"The quick brown <b id=\"fox\">fox</b> jumps over the lazy <i id=\"dog\">dog</i>." //
}; The library code works:
The final tests will follow at a later stage when I can access |
@jerinphilip Do you intend to make a similar change to Async service as well? |
Not sure how this is relevant to Mozilla efforts, but I will try to answer. AsyncService was meant to operate at one input which allows one option setting, not wait and go forward. Batching will happen by queueing and not blocking. Also figured it's easier to provide cancellation handles per request than for a batch of requests. Maybe we will change it later if we need the concept of a "BatchJob", but not right now. Where such a change relevant is perhaps python, but I don't see an immediate need to do it unless there's a client. |
@jelmervdl points out (in internal messaging) without @abhi-agg Please note that I expect you to experiment with and bring changes to |
@jelmervdl has been kind enough to edit the WASM/HTML bindings as well. Requesting @abhi-agg to review now. |
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 change lacks an accompanying test specific to the mixed HTML
and plaintext inputs.
Approving this change per agreement that the corresponding test cases would be added in a separate PR soon.
Changes signature of
BlockingService::{translate,pivot}Multiple
functions to take per input options, so a mix of HTML and plaintext
can be sent from the extension. Templating over testing is adjusted
to allow for continuous evaluations by modifying the test code.
Updates WebAssembly bindings to reflect the change in signature
and the javascript test-page to work with the new bindings.
This change lacks an accompanying test specific to the mixed HTML
and plaintext inputs.
Fixes: #345
See also: mozilla/firefox-translations#94