Skip to content

Add i18n/l10n testing: pseudo-localization, text-overflow, catalog diff#228

Merged
JE-Chen merged 1 commit into
devfrom
feat/i18n-batch
Jun 19, 2026
Merged

Add i18n/l10n testing: pseudo-localization, text-overflow, catalog diff#228
JE-Chen merged 1 commit into
devfrom
feat/i18n-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 19, 2026

Copy link
Copy Markdown
Member

Round-5 research follow-up, batch 10 — three pure-stdlib i18n/l10n testing helpers that compound, each wired through all five layers (facade, AC_*, MCP, Script Builder) with headless tests + EN/Zh v20 docs + README sections.

Features (utils/i18n_test)

  • Pseudo-localizationpseudo_localize / pseudo_localize_catalog: accent + pad strings (placeholders preserved, ⟦…⟧ wrapped) to flush out hardcoded text and pre-stress layout. AC_pseudo_localize + ac_pseudo_localize.
  • Text-overflow detectioncheck_overflow(elements): flag text whose estimated width (len*avg_char_px) exceeds its widget bounds — the Dev #1 l10n bug — from the a11y bounds already read. AC_check_overflow + ac_check_overflow.
  • Catalog completenesscheck_catalog(base, target): missing / orphaned / empty keys + placeholder mismatch. AC_check_catalog + ac_check_catalog.

Why

Surfaced by a round-5 i18n/l10n-testing research agent (a niche the prior 12 agents hadn't covered); the three compound (pseudo-loc generates the input overflow/catalog checks consume). Pure-stdlib (re), no new deps.

Verification

  • test/unit_test/headless/test_i18n_batch.py — 9 tests pass.
  • ruff clean; radon no CC≥C (split check_catalog into helpers); bandit clean; import je_auto_control PySide6-free.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 63 complexity · 0 duplication

Metric Results
Complexity 63
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 98fcbc5 into dev Jun 19, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/i18n-batch branch June 19, 2026 05:22
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant