Notre avis
Ce skill aide à gérer l'internationalisation d'un plugin WordPress en utilisant le domaine de texte 'retrologin' et les fonctions de traduction appropriées.
Points forts
- Guide l'utilisation correcte des fonctions de traduction WordPress (__(), _e(), etc.)
- Rappelle d'inclure systématiquement le domaine de texte
- Propose des fonctions d'échappement pour la sécurité
- Automatise la génération du fichier POT avec une commande simple
Limites
- Spécifique au domaine de texte 'retrologin' uniquement
- Ne couvre pas la configuration avancée de WPML ou Polylang
- Suppose que l'outil make-pot est déjà configuré dans Composer
À utiliser chaque fois que vous ajoutez ou modifiez des chaînes de caractères traduisibles dans un plugin WordPress utilisant le domaine 'retrologin'.
Ne pas utiliser pour des projets non WordPress, pour des plugins utilisant un autre domaine de texte, ou lorsque la localisation est déjà prise en charge par un autre système.
Analyse de sécurité
SûrThe skill only provides guidance on using WordPress translation functions and a standard Composer command to generate a POT file. There are no destructive commands, data exfiltration, or unsafe practices.
Aucun point d'attention détecté
Exemples
Add a new translatable label 'Email Address' to the plugin using the correct text domain and escaping for an input placeholder.Regenerate the POT file for the plugin to include the latest strings.The text 'Login Page' is not being translated. Check and fix the code to use the correct text domain.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
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.