← ClaudeAtlas

project-translationslisted

Use when adding or modifying UI strings, adding translation keys, removing form fields, or adding a new locale.
ubermuda/loupe · ★ 2 · AI & Automation · score 65
Install: claude install-skill ubermuda/loupe
# Translations The app supports multiple locales. Translations live in XLF string files and in locale-specific templates. ## XLF string translations XLF string translations live in `translations/`, for example `messages.en.xlf`. Use them for UI strings through `{% trans %}` or the `trans` filter. Add a new translation key to every locale file in the same edit. A locale that misses the key falls back to the bare key string at runtime. ## Locale-specific templates Use a locale-specific template when a page differs in structure between locales. Legal pages and date format partials are the usual cases. Name the file `template.{locale}.html.twig`, for example `privacy.en.html.twig` or `dashboard/_card_date.en.html.twig`. Every locale-specific template must exist for all supported locales. When you add or change one, add or update the equivalent file for every other locale. ## Cleaning up orphan keys When you remove a field from a Symfony form, delete its translation entries from all locale files. Those entries are `*.form.<field>.label` and `*.form.<field>.placeholder`. Delete `*.form.save.label` as well if the whole form is gone. PHPStan and CI do not flag unused translation keys, and there is no scanner for them, so orphans silently rot until someone notices. If the form has no fields left, delete the `*Type` and `*Request` classes as well. An empty `data_class` DTO is dead code. ## Translation keys inside FormType classes Each FormType must define and use translatio