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

FullCrud: Inconsistencies with translation of model fields between form labels and attributeLabels() #17

Open
igorsantos07 opened this issue Apr 11, 2013 · 2 comments

Comments

@igorsantos07
Copy link
Contributor

I tried using the FullCrud with the slim template, with the default "crud" as i18n key:

  • The first field in the form (a text field) used CActiveForm::labelEx(), which is fine as my model is already i18n as I created it with the FullModel gii template
  • The other two fields (relational fields) however used a vanilla <label> tag with the label title inside it using Yii::t('crud', 'UnitTo') (what's not even human-readable text, it's the original field name). On top of that, there's no red star showing the field as required.

Seeing this way, looks like the FullModel and FullCrud are struggling with each other to see who gets the better translation haha
I also noticed the text "Fields with * are required" got broken into two parts, while I'm used to translate the entire line (including the HTML tag for the star) - it does not make much sense having two separate i18n lines, each for half of the phrase.

What if the i18n was removed from FullCrud? Or at least from the labels, and "app" could be the default instead of "crud"?

@igorsantos07
Copy link
Contributor Author

In fact "UnitTo" is not even the field name - it should be "unit_to".

@schmunk42
Copy link
Owner

You're raising valid issues, thank you.
But I need some time to investigate this.

What if the i18n was removed from FullCrud? Or at least from the labels, and "app" could be the default instead of "crud"?
You can set the default translation catalogue in the admin interface.

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

2 participants