Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify "Message catalog" settings #48

Open
motin opened this issue Oct 7, 2013 · 3 comments
Open

Clarify "Message catalog" settings #48

motin opened this issue Oct 7, 2013 · 3 comments

Comments

@motin
Copy link
Collaborator

motin commented Oct 7, 2013

There is currently a "Message Catalog Standard" with default value "crud" and a "Message Catalog" with default value "model".

  1. Why is "model" a default value? I have never used this label. "crud" and "app" are sane defaults though.
  2. What exactly is "Message Catalog Standard"? The name nor it's hint does not explain (it's "standard" as opposed to "generated", but it's used in generated code)

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.

@uldisn
Copy link
Contributor

uldisn commented Oct 7, 2013

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:

  • FuelingModule.crud_static
  • FuelingModule.crud

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;",....

@schmunk42
Copy link
Owner

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?

@motin
Copy link
Collaborator Author

motin commented Oct 7, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants