config/i18n-js.yml
translations:
-
# This key must match exactly
file: 'public/javascripts/platform_ui/i18n/translations.js'
# List the translation keys you want exported to JS here.
# The leading * indicates all locales. The first two sections
# are required for bundle-picker and dialog support in PlatformUi.
# If you list just "*", then all translations will be available in JS.
only:
- "*.platform_ui.bundle_picker"
- "*.platform_ui.dialogs"
- "*.js"
In the above file, the line
- "*.js"
means to only extract translations under the key js
(e.g. en.js.foo
). If the project's config/locales/en.yml
does not have the key js
, change the line to
- "*"
This will extract all keys from the en.yml
file, and put it into platform_ui/i18n/#{locale}.js
.