Our review
This skill helps manage WordPress internationalization for a plugin by providing the correct translation functions and POT file generation for the 'retrologin' text domain.
Strengths
- Clear guidance on using WordPress translation functions with escaping
- Includes POT file generation via Composer
- Covers common use cases (PHP variables, direct output, HTML attributes)
- Emphasizes proper text domain usage and best practices
Limitations
- Specific to the 'retrologin' domain only
- Does not cover plural forms (ngettext)
- No handling of existing translation files (.po/.mo)
Use this skill when adding translatable strings in a WordPress plugin with the 'retrologin' text domain.
Do not use it for non-WordPress projects or plugins with a different text domain.
Security analysis
SafeThe skill provides guidance on WordPress internationalization functions and a legitimate 'composer run make-pot' command. No destructive or exfiltrating actions are present.
No concerns found
Examples
Add a translatable string for a login button using the correct WordPress i18n function with escaping and the 'retrologin' text domain.Generate the POT file for the retrologin plugin using Composer.How do I safely translate and escape a placeholder attribute in WordPress for the retrologin plugin?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
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.