kalessil / yii2inspections

MIT License
31 stars 3 forks source link

[dev] craft\web\View::registerTranslations('category', ['', ...]) #7

Closed kalessil closed 7 years ago

kalessil commented 7 years ago
kalessil commented 7 years ago

@samdark: does anything like this exist in Yii2?

samdark commented 7 years ago

No, not really. That's custom.

brandonkelly commented 7 years ago

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.

brandonkelly commented 7 years ago

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.