← ClaudeAtlas

wp-i18n-workflowlisted

Use when managing the full translation workflow for a WordPress plugin — registering text domain with load_plugin_textdomain, wrapping strings with __(), _e(), esc_html__(), esc_attr__(), _n(), _x(), _ex(), _nx(), generating POT with wp i18n make-pot, compiling .po to .mo (wp i18n make-mo / msgfmt) and .json (wp i18n make-json), wiring JS translations with wp_set_script_translations and @wordpress/i18n (__, _n, _x, sprintf), adding translator comments, submitting to translate.wordpress.org / GlotPress, automating in GitHub Actions, or debugging missing translations. Triggers: "make this string translatable", "generate POT file", "strings not translating", "wp i18n make-pot", "JS translations not loading", "wp_set_script_translations", "how do I translate my block", "RTL language support", "missing translation", "submit to GlotPress", "translation missing in JS", "update my .po files", "load_plugin_textdomain", "__ vs esc_html__", "_n() plural strings", "_x() context string", "translator comment format", "wp i
mralaminahamed/wp-dev-skills · ★ 27 · AI & Automation · score 77
Install: claude install-skill mralaminahamed/wp-dev-skills
# WordPress Plugin i18n Workflow > **Model note:** Fully mechanical — POT generation, PO/MO compilation, and script registration are tool invocations. `haiku` handles all steps; no cross-file reasoning needed. Full translation pipeline for WordPress plugins: POT generation, PO/MO compilation, JavaScript translations, translate.wordpress.org GlotPress, and language pack distribution. Covers the coding conventions and the tooling workflow. ## When to use - "Generate a POT file for my plugin", "update translation strings". - "Set up JavaScript translations", "translate strings in React/block editor". - "Submit to translate.wordpress.org", "set up language packs". - "Why aren't my translations loading?", "debug missing .mo file". - "Add translator comments", "handle plurals and context strings". **Not for:** PHPCS i18n sniff violations — use `wp-coding-standards`. Checking i18n completeness in an audit — use `wp-plugin-audit` Dimension B. ## Method ### 1. PHP i18n conventions All translatable strings must use the plugin's **text domain** consistently. The text domain must match the `Text Domain:` header and the `load_plugin_textdomain()` call. ```php // Basic translation __( 'Settings', 'my-plugin' ) _e( 'Save Changes', 'my-plugin' ) // echo version // With HTML context (escape + translate combined) esc_html__( 'Error message', 'my-plugin' ) esc_attr__( 'Tooltip text', 'my-plugin' ) // Plurals _n( '%d item', '%d items', $count, 'my-plugin' ) sprintf( _n( '%d ite