SimpleCrudGenerator
SimpleCrudGenerator copied to clipboard
Suggestion: don't put translation into app.php, but create separate crud
Please consider creating a separate language for the crud general translations
Hello @rabol, the app.php
translation file only used for the general texts or labels.
For each CRUD feature, we have this master.stub file which will be replaced by the model name.
Yes, I understand, but my suggestion is to leave app.php alone and generate a new e.g. crud.php for the general translation
in app.php the following are created:
// Labels
'table_no' => '#',
'total' => 'Total',
'action' => 'Actions',
'show_detail_title' => 'View :name :type detail',
// Actions
'show' => 'View Detail',
'edit' => 'Edit',
'delete' => 'Delete',
'cancel' => 'Cancel',
'reset' => 'Reset',
'delete_confirm' => 'Are you sure to delete this?',
'delete_confirm_button' => 'YES, delete it!',
Imagine that one already have 'show' with another text like
'show' => 'Show details'
then that will be overridden by the CRUD
You mean if we already have an existing resources/lang/en/app.php
this package will replace the file content with the one that comes from the stub, @rabol?
yes, app.php is a very common lang file for the 'app' :) But, only a suggestion, to keep backwards comaptibility you could add a parameter like --languagefile crud.php
Ok, I got your point for to this consideration app.php is a very common
.
I will consider this suggestion. I will get back to you if I have another possible solution.