Incorrect use of i18n specifiers
What is the issue and why is it important?
There are three types of internationalization:
-
_('Cancel')
- Used when the translation is not likely to use different words depending on context
-
s_('SecurityPolicies|Invalid policy')
- Used when context is needed (in the translation interface, only the string can be seen, not where it is used)
-
n_('%d issues updated')
- Used when it contains a variable amount ("0 issues updated". "1 issue updated", "2 issues updated")
Some of the types are misused, such as s_('Cancel')
(should not be scoped), or _('SecurityPolicies|Invalid policy')
(should be scoped, but isn't).
In the latter case, proper scoping allows translators to work on translating strings by product area, reducing context switching. For other examples of how proper scoping improves the efficiency of translation efforts, see the Internationalization guide.