This gem provides translations for Alchemy CMS. Translation files live in locales/alchemy.<locale>.yml.
The Alchemy CMS source is at ~/code/alchemy_cms. Always use this local checkout to:
- Look up where translation keys are used
- Check the English reference locale at
config/locales/alchemy.en.yml - Verify keys are actually used before adding translations
bundle exec rake translations:statusβ Show translation coverage for all localesbundle exec rake "translations:missing[de]"β Show missing keys for a specific localebundle exec rake translations:validateβ Validate YAML syntax for all locale files
Set ALCHEMY_CMS_PATH env var if the Alchemy CMS checkout is not at ~/code/alchemy_cms.
- Run
translations:missing[<locale>]to find missing keys - Check the Alchemy CMS codebase to verify keys are actually used before translating
- Only add missing keys β never remove existing keys without explicit permission
- Keys with
nilvalues in the EN locale (likeelement_names,ingredient_roles,page_layout_names) are user-customizable placeholders β do not add them to other locales - Some keys exist only in code (not in the EN locale file) and rely on
Alchemy.t's fallback (humanizing the key). These still need translations in other locales. - Validate YAML after editing:
bundle exec rake translations:validate - Commit one language per commit
Alchemy.t(key) automatically scopes all lookups under the alchemy namespace. So Alchemy.t(:hello) looks up alchemy.hello, and Alchemy.t(:name, scope: [:filters, :page]) looks up alchemy.filters.page.name. See alchemy_cms/lib/alchemy/i18n.rb for details.
- Use consistent formatting within each locale file
- Preserve existing YAML anchors (e.g.,
&mime_typesand<<: *mime_types) - Keep keys in the same order as they appear in the file β add new keys near related existing keys
- When unsure about a translation, ask β do not guess