-
Notifications
You must be signed in to change notification settings - Fork 22
Fixed warnings, and made changes to the privacy considerations making it more consistent with the explainer #74
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
Open
toreini
wants to merge
4
commits into
main
Choose a base branch
from
toreini-patch-explainer-spec-mismatch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bd3f3f6
Update index.bs
toreini 823e405
[[UPDATED]] added the missing parts on the explainer to the spec
toreini 55407bd
Made changes to the privacy considerations making it more consistent …
toreini 78362d1
trying to fix the validation errors
toreini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -36,6 +36,13 @@ urlPrefix: https://whatpr.org/webidl/1465.html; spec: WEBIDL | |||||
| text: quota; url: quotaexceedederror-quota | ||||||
| </pre> | ||||||
|
|
||||||
| <pre class=link-defaults> | ||||||
| spec:proofreader-api; type:dfn; text:get the language availabilities partition | ||||||
| spec:writing-assistance-apis; type:dfn; text:get the language availabilities partition | ||||||
| spec:proofreader-api; type:dfn; text:compute language availability | ||||||
| spec:writing-assistance-apis; type:dfn; text:compute language availability | ||||||
| </pre> | ||||||
|
|
||||||
| <h2 id="intro">Introduction</h2> | ||||||
|
|
||||||
| The translator and language detector APIs expose the ability to translate text between human languages, and detect the language of such text. They are complementary to any built-in browser UI features for these purposes, giving web developers the ability to trigger these operations programmatically and integrate them into their applications. This can be especially useful for operating on user input, or text retrieved from the network. | ||||||
|
|
@@ -465,10 +472,6 @@ When translation fails, the following possible reasons may be surfaced to the we | |||||
|
|
||||||
| <p class="note">This table does not give the complete list of exceptions that can be surfaced by the translator API. It only contains those which can come from certain [=implementation-defined=] steps. | ||||||
|
|
||||||
| <h3 id="translator-permissions-policy">Permissions policy integration</h3> | ||||||
|
|
||||||
| Access to the translator API is gated behind the [=policy-controlled feature=] "<dfn permission>translator</dfn>", which has a [=policy-controlled feature/default allowlist=] of <code>[=default allowlist/'self'=]</code>. | ||||||
|
|
||||||
| <h2 id="language-detector-api">The language detector API</h2> | ||||||
|
|
||||||
| <xmp class="idl"> | ||||||
|
|
@@ -795,13 +798,32 @@ When language detection fails, the following possible reasons may be surfaced to | |||||
|
|
||||||
| <p class="note">This table does not give the complete list of exceptions that can be surfaced by the language detector API. It only contains those which can come from certain [=implementation-defined=] steps. | ||||||
|
|
||||||
|
|
||||||
| <h2 id="privacy">Privacy considerations</h2> | ||||||
|
|
||||||
| Please see [[WRITING-ASSISTANCE-APIS#privacy]] for a discussion of privacy considerations for the translator and language detector APIs. That text was written to apply to all APIs sharing the same infrastructure, as noted in [[#dependencies]]. | ||||||
|
|
||||||
| <h3 id="language-detector-permissions-policy">Permissions policy integration</h3> | ||||||
|
|
||||||
| Access to the translator API is gated behind the [=policy-controlled feature=] "<dfn permission>translator</dfn>", which has a [=policy-controlled feature/default allowlist=] of <code>[=default allowlist/'self'=]</code>. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the per-API permissions policy integration sections. |
||||||
|
|
||||||
| Access to the language detector API is gated behind the [=policy-controlled feature=] "<dfn permission>language-detector</dfn>", which has a [=policy-controlled feature/default allowlist=] of <code>[=default allowlist/'self'=]</code>. | ||||||
|
|
||||||
| <h2 id="privacy">Privacy considerations</h2> | ||||||
|
|
||||||
| Please see [[WRITING-ASSISTANCE-APIS#privacy]] for a discussion of privacy considerations for the translator and language detector APIs. That text was written to apply to all APIs sharing the same infrastructure, as noted in [[#dependencies]]. | ||||||
| <h3 id="language-detector-iframe-policy"><code>iframe</code> Permissions</h3> | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| By default, these APIs are only available to top-level {{Window}} object, and to their same-origin iframes. Access to the APIs can be delegated to cross-origin iframes using the Permissions Policy <code>allow=""</code> attribute: | ||||||
|
|
||||||
|
|
||||||
| <div class="example" id="example-language-iframe"> | ||||||
| The translation service available to the top-origin is accessible to the example.com origin through <code>allow</code> attribute. | ||||||
| <xmp class="language-html"> | ||||||
| <iframe src="https://example.com/" allow="translator language-detector"></iframe> | ||||||
| </xmp> | ||||||
| </div> | ||||||
|
|
||||||
| <p class="note"> These APIs are unavailable in workers due to the complexity of setting up a responsible document for each worker to check permissions policy status. For more details, see [this discussion](https://github.com/webmachinelearning/translation-api/issues/18#issuecomment-2705630392). This restriction might be relaxed in the future.<p> | ||||||
|
|
||||||
|
|
||||||
| <h2 id="security">Security considerations</h2> | ||||||
|
|
||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I've removed the duplicate definitions from [PROOFREADER-API] so you should be able to just keep the instances from [WRITING-ASSISTANCE-APIS].