Skip to content

[skill-update] fix(language-detector-api): Chrome mobile limitation and measureInputUsage/Infinity note#40

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
skill-update/language-detector-api-20260406-ff18162932ec42a6
Draft

[skill-update] fix(language-detector-api): Chrome mobile limitation and measureInputUsage/Infinity note#40
github-actions[bot] wants to merge 1 commit intomainfrom
skill-update/language-detector-api-20260406-ff18162932ec42a6

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 6, 2026

Updates skills/language-detector-api with two material corrections found during the language-detector-api-skill-update prompt run.

Changes

references/compatibility.md — Chrome mobile limitation

Added: 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.mdmeasureInputUsage() returns 0 when inputQuota is Infinity

Added: When inputQuota is Infinity, measureInputUsage() returns 0; do not treat a 0 return 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

  • Metadata validator: SUCCESS: Metadata is valid and optimized for discovery.
  • No other skill files required changes; existing wording for detection result filtering, multilingual proportioning, und handling, permissions policy, and TypeScript guidance is already correct.

Unresolved risks

  • The Chrome desktop-only restriction applies to both Language Detector API and Translator API. If a translator-api skill exists in this repo, it should receive the same desktop-only note in a separate pass.
  • Chrome hardware requirements (OS, storage, GPU, RAM) listed in Chrome docs apply to Gemini Nano–backed APIs (Prompt, Summarizer, Writer, etc.), not to Language Detector or Translator. These are intentionally excluded from this skill to avoid scope creep.

Generated by Skill Update Worker ·

…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>
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.

0 participants