Regenerate the POT template and compile all MO translation files. Use whenever new translatable strings are added to the plugin.
Regenerate the POT template and compile all MO files. Run this skill whenever new translatable strings are added to the plugin.
The Docker dev environment must be running. If it is not, start it first:
docker compose up -d
Run WP-CLI inside the WordPress container to scan all PHP files and regenerate the master template:
docker compose exec wordpress wp i18n make-pot \
/var/www/html/wp-content/plugins/simple-cookie-consent \
/var/www/html/wp-content/plugins/simple-cookie-consent/languages/simple-cookie-consent.pot \
--domain=simple-cookie-consent \
--allow-root
Compare the new POT with the existing PO files to identify:
For each locale (pt_PT, pt_BR, de_DE), update the PO file to include new strings.
If the user has provided translations for new strings, apply them.
If not, mark new strings as untranslated (msgstr "").
Never delete existing translations — only add missing entries for new strings.
When translating, follow locale conventions:
For each updated PO file, compile the binary MO:
docker compose exec wordpress wp i18n make-mo \
/var/www/html/wp-content/plugins/simple-cookie-consent/languages \
--allow-root
Verify that a matching .mo file exists for every .po file.
Stage all files in languages/:
git add languages/
git commit -m "i18n: update translations"
Report to the user which locales were updated and how many new strings were added.
| File | Locale | Notes |
|---|---|---|
simple-cookie-consent.pot | Template (all strings) | Source of truth |
simple-cookie-consent-pt_PT.po/.mo | European Portuguese | Guardar/Ecrã/Eliminar |
simple-cookie-consent-pt_BR.po/.mo | Brazilian Portuguese | Salvar/Tela/Excluir |
simple-cookie-consent-de_DE.po/.mo | German | Formal register |