← ClaudeAtlas

orbit-i18n-js-paritylisted

PHP↔JS label parity audit — verifies every label key consumed by JS via `wp_localize_script` / `wp_set_script_translations` is actually emitted from PHP. Catches the silent-English-fallback bug where JS reads `myObject.someLabel` but PHP never put `someLabel` into the localized object. Use when the user says "JS label", "wp_localize_script", "Elementor editor label", "Gutenberg block label", "missing translation in JS", or before any release that touches block editor / Elementor / admin JS.
adityaarsharma/orbit · ★ 1 · Testing & QA · score 55
Install: claude install-skill adityaarsharma/orbit
# 🪐 orbit-i18n-js-parity — JS↔PHP label parity The skill that catches the bug `orbit-i18n` cannot see: **the PHP side wraps every string in `__()` correctly, but the JS side reads a key the PHP never localizes.** Result: JS falls back to English (or `undefined`), and no warning, no error, no test fails. The string just silently never translates. **Why this skill exists:** RankReady's Elementor editor showed an English "Generate FAQ" button in every language because `class-rnrd-elementor.php` localized `rnrdElEditor.generateSummary` but not `rnrdElEditor.generateFaq` — the JS read the missing key, defaulted to a hardcoded English fallback, and shipped to production. Plugin-agnostic — applies to any plugin with PHP-localized JS labels. --- ## What this skill checks ### 1. Collect every `wp_localize_script` emit Scan every PHP file for: ```bash grep -rn 'wp_localize_script' --include='*.php' . | grep -v 'tests/' ``` For each call, extract: - The script handle (arg 1) - The JS object name (arg 2) - The array of keys (arg 3) Build a table: ``` HANDLE JS OBJECT KEYS EMITTED rnrd-elementor-editor rnrdElEditor generateSummary, regenerateSummary, generatingSummary ``` ### 2. Collect every `wp_set_script_translations` emit ```bash grep -rn 'wp_set_script_translations' --include='*.php' . ``` For each: handle + textdomain + path. Required for `wp.i18n.__()` calls in JS to resolve. ### 3. Collect every JS read of the localized object For each