[skill-update] fix(language-detector-api): Chrome mobile limitation and measureInputUsage/Infinity note#40
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…nputUsage/Infinity note - compatibility.md: document that Language Detector API works in Chrome on desktop only; Chrome for Android and iOS are not supported (source: https://developer.chrome.com/docs/ai/language-detection) - language-detector-reference.md: clarify that measureInputUsage() returns 0 when inputQuota is Infinity, and warn against treating 0 as empty input (source: https://webmachinelearning.github.io/translation-api/#language-detector-usage) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Updates
skills/language-detector-apiwith two material corrections found during thelanguage-detector-api-skill-updateprompt run.Changes
references/compatibility.md— Chrome mobile limitationAdded: The Language Detector API works in Chrome on desktop only; Chrome for Android and iOS are not supported.
Justification: Chrome documentation explicitly states: "The Language Detector and Translator APIs work in Chrome on desktop. These APIs do not work on mobile devices." This was absent from the skill, creating a silent production risk for teams targeting cross-device deployments.
Source: [(developer.chrome.com/redacted)(developer.chrome.com/redacted) — "Review the hardware requirements" section
references/language-detector-reference.md—measureInputUsage()returns0wheninputQuotaisInfinityAdded: When
inputQuotaisInfinity,measureInputUsage()returns0; do not treat a0return as empty input in that case.Justification: The W3C spec states: "The returned input usage must be nonnegative and finite. It must be 0, if there are no usage quotas for the translation process (i.e., if the input quota is +∞)." Without this note, developers who check the return of
measureInputUsage()for a zero result to infer "no input" or "no quota" would get a false positive when the implementation has no quota limit.Source: [(webmachinelearning.github.io/redacted)(webmachinelearning.github.io/redacted) — § 4.4.2 Usage, step 3
Validation
SUCCESS: Metadata is valid and optimized for discovery.undhandling, permissions policy, and TypeScript guidance is already correct.Unresolved risks
translator-apiskill exists in this repo, it should receive the same desktop-only note in a separate pass.