In order to be able to internationalize your application, you will need to avoid using plain strings in your templates. Instead, you would need to use a template helper specializing in translation (ember-intl is the recommended project to use this for).
This rule forbids the following:
<h2>Some string here!</h2>
This rule allows the following:
{{!-- ember-intl example --}}
<h2>{{t 'photos.banner' numPhotos=model.photos.length}}</h2>
The following values are valid configuration:
- boolean --
true
for enabled /false
for disabled - array -- an array of allowlisted strings (extends the default config)
- object -- An object with the following keys:
allowlist
-- An array of allowlisted strings (extends the default config)globalAttributes
-- An array of attributes to check on every element (extends the default config)elementAttributes
-- An object whose keys are tag names and value is an array of attributes to check for that tag name (extends the default config)
When the config value of true
is provided, the following default configuration is used:
allowlist
- refer to theDEFAULT_CONFIG.allowlist
property in the ruleglobalAttributes
-title
,aria-label
,aria-placeholder
,aria-roledescription
,aria-valuetext
elementAttributes
-{ img: ['alt'], input: ['placeholder'] }