Automated summary
This skill helps manage WordPress plugin internationalization using the 'retrologin' text domain.
Strengths
- Provides correct translation functions (__, _e, esc_html__, etc.)
- Reminds to use the proper text domain
- Gives concrete PHP code examples
Limitations
- Specific to the 'retrologin' domain
- Does not cover PO/MO file management
- Does not address loading translation files
When adding translatable strings to a WordPress plugin using the 'retrologin' text domain.
For projects without internationalization or using a different text domain.
Security analysis
SafeThe skill only provides informational guidance on WordPress internationalization functions and a standard composer build command. It does not execute any code or declare any tools that pose a security risk.
No concerns found
How this analysis is madeExamples
Add a translatable string 'Login Page' using the retrologin domain with the appropriate translation function.Create an input placeholder with a translatable string 'Enter username' escaped for attributes using the retrologin domain.Generate the POT file for translations by running composer run make-pot.name: i18n-helper description: Handle WordPress internationalization. Use when adding translatable strings.
i18n Helper
Instructions
When adding translatable strings to the plugin:
- Use the correct text domain:
'retrologin' - Choose the right function:
__()- Return translated string_e()- Echo translated stringesc_html__()- Return escaped translated stringesc_html_e()- Echo escaped translated stringesc_attr__()- Return escaped for HTML attributes
- Generate POT file:
composer run make-pot - Keep strings in English (US)
Translation Functions
| Function | Output | Use When |
| ---------------------------- | --------------- | ----------------------------- |
| __($text, $domain) | Return | Strings in PHP variables |
| _e($text, $domain) | Echo | Direct output |
| esc_html__($text, $domain) | Return + escape | Displaying user content |
| esc_html_e($text, $domain) | Echo + escape | Direct output of user content |
| esc_attr__($text, $domain) | Return + escape | HTML attributes |
Example
// Basic usage
__('Login Page', 'retrologin');
_e('Welcome back!', 'retrologin');
// With escaping
esc_html__('Please log in to continue', 'retrologin');
esc_attr__('Username', 'retrologin');
// In attributes
<input placeholder="<?php esc_attr_e('Enter username', 'retrologin'); ?>">
Generate Translations
# Generate POT file for translations
composer run make-pot
# POT file location: inc/languages/retrologin.pot
Guidelines
- Always include text domain second parameter
- Use escaping functions for user-generated content
- Keep strings concise for translation
- Avoid embedding variables in translatable strings
Design-to-Dev Specification Writer
Development
Translate your mockups into technical specifications for developers.
Exports & Barrel Files
Development
Defines conventions for module exports and barrel files: named exports only, no flat wildcards (except `export * as Name` for compound components), sectioned comments, types alongside values, and one export line per source file. Helps maintain consistent, tree-shakeable exports in portal apps using Turbopack or similar bundlers.
Write an Agent Skill
Development
Step-by-step guide to create a structured Agent Skill for coding agents, including directory structure, SKILL.md format, and design principles.