pungpoo / giix

Automatically exported from code.google.com/p/giix
0 stars 0 forks source link

Set your screen name at the time of code generation #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In many languages ​​is not possible to extract the correct name of the 
screen according to the model name.

Usually the modeling of the database does not use any special character. 
However, they exist in name displayed on the screen and present several times 
in the archives of the views ...

There is also the problem of a plural name. Not all words are pluralized by 
adding only the letter S in the end.

In the form of CRUD generation there should be two more fields: name of the 
object manipulated or screen in the correct language and this name in the 
plural. These fields will be used in code generation of views (screen titles, 
breadcrumbs, side menu, etc).

Original issue reported on code.google.com by thiagota...@gmail.com on 2 Jun 2011 at 6:38

GoogleCodeExporter commented 8 years ago
Thiago, please check this post on the giix's topic:

http://www.yiiframework.com/forum/index.php?/topic/13154-giix-%E2%80%94-gii-exte
nded/page__st__80__gopid__100879#entry100879

Original comment by rodrigo.coelho@gmail.com on 16 Jun 2011 at 10:50

GoogleCodeExporter commented 8 years ago
Rodrigo,

The solution of the label() method was very good.

But it still uses the same format of label generation, "discovering" the name 
across the table. You left the option to set the name through the messages of 
translation. But it could further improve including the fields to enter the 
name.

Please see the attachment you send with my solution.
Run with giix to see how this change is practical and that the generated 
basemodel is ready to work with languages ​​that have a problem with the 
"discovery" of names.

Original comment by thiagota...@gmail.com on 21 Jun 2011 at 3:03

Attachments:

GoogleCodeExporter commented 8 years ago
The idea is good, but we've seen that problem when we use the asterisk. 
It can override the name defined at the individual record.

I'll think of a better solution...

Original comment by thiagota...@gmail.com on 21 Jun 2011 at 6:52