[dev] craft\web\View::registerTranslations('category', ['', ...])
kalessil opened this issue · comments
Vladimir Reznichenko commented
- Apply "Translation message correctness" inspection to the translations array
- Register translations from the array as used while indexing
Vladimir Reznichenko commented
@samdark: does anything like this exist in Yii2?
Alexander Makarov commented
No, not really. That's custom.
Brandon Kelly commented
Yeah Yii doesn't have a major front-end framework built in (nor should it), so it doesn't need to worry about how to register translation messages for Javascript use.
Brandon Kelly commented
Feature description:
If the project contains a craft\web\View
class, the plugin should find calls to its registerTranslations()
method, and index each of translation messages passed into the $messages
argument (array), with the $category
argument (string) as the translation category.