본문으로 건너뛰기
cccskills
무료GitHub에 공개

i18n-string-coverage

Build-an-X workflow that scans source code for untranslated strings - finds hardcoded user-facing text not wrapped in the i18n function (`t()`, `i18n.t`, `gettext`, `__()`, etc.), maps gaps to the team's translation file, reports per-language coverage (en: 100%; fr: 87%; es: 60%), gates per-PR for new untranslated strings. Use when the product ships in multiple locales and the team needs continuous coverage tracking.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testland/qa스타 13(GitHub 13 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(3)

  • SKILL.md7.8 KB
  • .tessl-plugin/plugin.json557 B
  • references/coverage-report.md1.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

i18n-string-coverage

Overview

Two coverage gaps this skill detects: hardcoded user-facing text not wrapped in the i18n function, and keys present in en.json but missing from a locale file (so the UI shows the raw key). It finds both via source scanning plus a translation-file diff.

When to use

  • The product ships in 2+ locales.
  • A bug report says "X appears in English in Y locale."
  • Quarterly: scheduled coverage review.
  • A new locale launches and the team needs the gap inventory.

How to use

  1. Identify the i18n wrap function for the stack (Step 1 table).
  2. Scan source for hardcoded user-facing text not wrapped in t() (Step 2).
  3. Diff each locale file against the en source-of-truth for per-locale coverage % (Step 3).
  4. Assemble the report: per-locale %, new untranslated strings, orphan keys (Step 4).
  5. Wire the scan into a per-PR gate that fails on new untranslated strings (Step 5).
  6. Flag RTL / bidi strings that need extra translator attention (Step 6).

Step 1 - Identify the i18n library

Per stack, the wrap function differs:

StackWrap function
react-i18nextt('key') / useTranslation()
i18nexti18next.t('key')
Vue i18n$t('key')
Angular i18ni18n attribute / $localize\...``
Djangogettext('text') / _('text') / {% trans %}
RailsI18n.t('key') / t('key') (in views)
FormatJSintl.formatMessage({ id: 'key' })
.NETResources.SubmitButton

Configure per project.

Step 2 - Scan for untranslated strings

# Pattern: JSX/TSX text children that aren't wrapped
# (heuristic; refines per-codebase)
grep -rn -E '>[A-Z][a-z]+ ?[A-Za-z ]*<' src/components/ \
  | grep -v -E '\$?\{?t\(|i18n\.t\(|trans|formatMessage'

This catches the obvious cases - <button>Submit</button> - without false-positive on <button>{t('submit')}</button>.

For more comprehensive detection, language-specific tooling:

ToolUse
i18n-extract (npm)JS/TS - extracts keys + finds missing
eslint-plugin-i18nextJS/TS - ESLint rule for unwrapped strings
pylint-django-i18nDjango - pylint plugin
i18nspector (Debian)Lints .po files
xgettextCross-language: extracts strings from source

Step 3 - Diff translation files

# scripts/i18n-coverage.py
import json
from pathlib import Path

def flatten(d, prefix=''):
    for k, v in d.items():
        full = f'{prefix}.{k}' if prefix else k
        if isinstance(v, dict):
            yield from flatten(v, full)
        else:
            yield full

base_keys = set(flatten(json.loads(Path('locales/en.json').read_text())))  # source-of-truth

coverage = {}
for f in Path('locales').glob('*.json'):
    if f.stem == 'en': continue
    keys = set(flatten(json.loads(f.read_text())))
    covered = base_keys & keys
    coverage[f.stem] = {
        'missing': sorted(base_keys - keys),
        'extra_orphans': sorted(keys - base_keys),
        'pct': round(100 * len(covered) / len(base_keys), 1),
    }

print(json.dumps(coverage, indent=2))

Step 4 - Report

Assemble per-locale coverage %, the new untranslated source strings (file, line, string, suggested key), and orphan keys (present in a locale file but not in source - deletion candidates). Full fill-in template: references/coverage-report.md.

Step 5 - PR gate

- name: i18n coverage check
  if: github.event_name == 'pull_request'
  run: |
    NEW_UNWRAPPED=$(./scripts/i18n-scan.sh)
    if [ -n "$NEW_UNWRAPPED" ]; then
      echo "::error::New untranslated strings found:"
      echo "$NEW_UNWRAPPED"
      exit 1
    fi

For new locales without 100% coverage, gate is informational, not blocking - the gap is tracked, not blocked.

Step 6 - Bilingual / RTL flagging

For RTL languages (Arabic, Hebrew, Persian, Urdu - per w3-rtl), the report also flags:

  • Strings that include hardcoded LTR/RTL marker characters.
  • Strings with embedded HTML (often direction-sensitive).
  • Strings combining RTL and LTR text (need bidi handling).

These need extra translator attention even when "translated" - character-by-character translation may not render correctly without bidi guidance.

Worked example

A PR adds a promo banner to checkout. The scan (Step 2) flags <button>Apply your discount</button> in src/checkout/PromoBanner.tsx:18 - the text is not wrapped in t(). The translation-file diff (Step 3) reports ja at 60% coverage (218 keys missing) against 542 en keys.

The PR gate (Step 5) blocks on the newly unwrapped string; the ja gap stays informational, not blocking. The developer wraps the text as t('checkout.promo.banner_cta'), adds the key to all five locale files, and re-runs. The scan reports zero new untranslated strings and the gate passes.

Anti-patterns

Anti-patternWhy it failsFix
Heuristic-only string scanning (no whitelist for known-non-text)False positives on technical strings (URLs, IDs).Whitelist patterns; tune per project.
Treating English as auto-100%New en strings without keys are still gaps in source-of-truth.All locales (including en) must have keys for new strings.
Scanning generated codeFalse positives flood the report.Exclude dist/, build/, node_modules/.
Ignoring orphansTranslation files bloat over time.Surface orphans (Step 4 example); periodic cleanup.
Per-locale gates blocking new locale launchesDefeats the goal; team disables.Gate is informational for incomplete locales (Step 5).

Limitations

  • Heuristic scanning has gaps. Dynamically-constructed strings (e.g., t(dynamicKey)) miss; manual review required.
  • Translator quality not addressed. "Translated" doesn't mean "good translation"; pair with linguistic review.
  • Per-language differences in pluralization, gender, etc. Some i18n libraries handle these well (ICU MessageFormat); others poorly. Coverage % doesn't reflect quality.

References

  • w3rtl - W3C on dir attribute + RTL languages.
  • pseudo-localization-runner - sibling: layout-level i18n testing.
  • rtl-rendering-tester - RTL-specific rendering verification.
  • locale-format-validator - date / number / currency format verification.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Builds a CI gate that fails the build on **new** WCAG / a11y violations introduced by a PR while grandfathering pre-existing violations on a per-rule / per-page baseline. Aggregates verdicts from axe-core / pa11y / Lighthouse a11y / WAVE / IBM Equal Access scans. Use when a project has accumulated a11y debt and a strict "zero violations" gate would block every PR - the ratchet pattern lets the team ship while preventing regressions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testland/qa132026년 10월 20일 업데이트

Workflow skill that builds an A/B-test validity checklist from an experiment proposal, walking the canonical design-correctness gates - pre-registered OEC/power/guardrails, randomization unit + SRM check, assignment integrity, telemetry, peeking discipline, novelty/primacy, post-experiment SRM re-check - into a per-experiment checklist + sign-off form. Use when launching, auditing, or governing an experiment. For pitfall mechanics (guardrails, peeking) see experiment-results-interpreter's references; to read an already-valid result use experiment-results-interpreter; for per-SDK harness tests use experiment-sdk-testing - this gates DESIGN, not SDK code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testland/qa132026년 10월 20일 업데이트

The single install-flow skill: the reference contract for the PWA install flow (installability gate fields, `beforeinstallprompt` handshake, per-platform paths - Android WebAPK / iOS Share menu / Firefox no-op - and the `display-mode` post-install signal, in references/install-flow-reference.md) plus the build-an-X workflow that emits the Add-to-Home-Screen suite. Walks the four-stage timeline, emitting one test per gate cell per [web.dev/articles/install-criteria][install-criteria], the deferred-prompt → `prompt()` → `userChoice` chain per [web.dev/articles/customize-install][customize-install], the iOS Safari manual-metadata branch (`apple-touch-icon`) per [web.dev/learn/pwa/installation][learn-pwa], and the post-install `(display-mode: standalone)` MQ assertion. Output: a Playwright spec with per-stage cells plus a coverage matrix. Use when a PWA's manifest, icons, or install handler change, when install conversion drops at an unknown stage, or when triaging a flaky install assertion.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testland/qa132026년 10월 20일 업데이트

Build-an-X workflow that uses an LLM to map existing tests to spec sections - given a spec doc + the test suite, the LLM identifies which tests cover which sections, surfaces uncovered sections (gap), and recommends specific tests to add. Output is a coverage matrix per spec ID. Scope is mapping tests that already exist and naming the gaps, not authoring tests for new acceptance criteria. Use when a spec doc and a test suite both exist but nobody can say which requirements are actually covered - before a release sign-off, an audit, or a decision about where to spend the next round of test effort.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testland/qa132026년 10월 20일 업데이트

Generates tests from natural-language specs (acceptance criteria, user stories, requirements) using an LLM, with confidence scoring per test case (LLM self-assessment plus heuristics: assertion quality, naming, completeness), batching uncertain cases for human review, and integration with the team's existing test framework. Use when the user asks to generate unit tests from acceptance criteria, convert user stories to test cases, automate test creation from requirements, or augment a spec-driven test suite with AI-generated stubs that are then curated before merge.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testland/qa132026년 10월 20일 업데이트

Configures Allure Report (test-runner adapter install, `allure-results` directory wiring, `categories.json` for failure classification, `history-trend.json` retention via the copy-history-between-runs pattern), runs the Allure CLI to convert `allure-results` to a static HTML site, and uploads the report as a CI artifact. Use when the team needs richer test reporting than JUnit XML - step-level attachments, per-test history, retry tracking, and severity / epic / feature labeling across framework-agnostic adapters (pytest, Jest, JUnit, TestNG, NUnit, Mocha). As a rich static HTML report generator, it is the open-source alternative to the sunset ExtentReports (JVM/.NET per-test HTML narrative); for hosted cross-run flakiness analytics rather than a static per-run report use currents-integration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testland/qa132026년 10월 20일 업데이트

testland의 스킬 모두 보기

이 스킬의 문제 신고