Open motin opened 11 years ago
I prefer use for module message catalag in same module separate from app messages. Then module more plugable.Currently in one module I use follow values:
Tobias prefer use "model". If its mean separate for each model in module, then I think, that not good. So many translation files. My be better "module", if it is common for module.
In "Full Module" Gii generator I included message catalog with standard translation for LV and no more problems with translation "Save", "Cance;",....
I merged @uldisn PR introducing the new message catalog.
The idea is that the "standard" translations for button labels, etc... go into crud
while the model specific translations go into model
usually MyModule.model
in my cases.
I think the separation makes totally sense, how can we name that, so that this is more intuitive?
Since messageCatalog was introduced in gtc, I believe the default has been "crud", and at least I have grown accustomed to think of the messages/lang/crud.php as the place to translate things like "Book", "Chapter" etc, but 'model' is even better I believe.
The default catalog name is 'messages' in yii, so maybe we should default to that in case of the "standard" messages? Otherwise 'app' has been a default in gtc for a while.
Based on that, a proposal could be:
"Message Catalog Standard" Hint: Message catalog for CRUD standard hints and labels. Default: crud -> "Default Message Catalog" Hint: Message catalog for general strings such as 'Cancel', 'Save' etc. Default: messages or app
"Message Catalog" Hint: Message catalog for CRUD generated hints and labels. Default: model -> "CRUD Message Catalog" or "Model Message Catalog" Hint: Message catalog for CRUD generated hints and labels that depend on your data model Default: crud or model, respectively
There is currently a "Message Catalog Standard" with default value "crud" and a "Message Catalog" with default value "model".
Somewhere I suspect that "Message Catalog" is for fieldname-dependent translations and "Standard" is for more ordinary static strings, but in that case the defaults ought to be "app" for "Standard" and "crud" for fieldname-dependent translations, and the names and hints should explain their application.