Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 948 Bytes

no-untranslated-text.md

File metadata and controls

32 lines (21 loc) · 948 Bytes

enforce text labels in JSX to be wrapped by translate calls (no-untranslated-text)

Ensures that all text labels in JSX are wrapped by <Translate> components.

When the i18n feature is used, this rule is to ensure that all strings appearing on the website are being translated, so no string accidentally slips through untranslated.

Rule Details

Examples of incorrect code for this rule:

// Hello World is not translated
<Component>Hello World</Component>

Examples of correct code for this rule:

// Hello World is translated
<Component>
  <Translate>Hello World</Translate>
</Component>

When Not To Use It

If you're not using the i18n feature then you can disable this rule.

Further Reading