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

description attribute is not translated in blueprint #729

Closed
dimitrilongo opened this issue Aug 3, 2016 · 8 comments
Closed

description attribute is not translated in blueprint #729

dimitrilongo opened this issue Aug 3, 2016 · 8 comments

Comments

@dimitrilongo
Copy link

I notice that description attribute is not translated

                header.seotwitterimg:
                  type: pagemediaselect
                  label: MYTHEME_POST_FEATURED_IMAGE
                  help: MYTHEME_SEO_DEFAULT_IMG
                  description: MYTHEME_SEO_DEFAULT_IMG
@rhukster
Copy link
Member

rhukster commented Aug 3, 2016

description is not used by form fields. it does no harm adding it to the definition, but it's not used in any output of the field, so it not translated.

@rhukster rhukster closed this as completed Aug 3, 2016
@rhukster
Copy link
Member

rhukster commented Aug 3, 2016

BTW if you have a custom form field that use description in, just make sure you add the |tu twig filter to translate it.

@dimitrilongo
Copy link
Author

@rhukster thanks
But i used description only in the backend. maybe i misunderstand the purpose of description

@rhukster
Copy link
Member

rhukster commented Aug 3, 2016

Are you talking about this bit?

{% if files is empty %}Add files through the page media, or by dropping them in the page folder{% endif %}

Currently that's not even in translated it's hardcoded in pagemediaselect.html.twig

@dimitrilongo
Copy link
Author

dimitrilongo commented Aug 4, 2016

no i saw that PR #667 about allowing description for form fields.

@dimitrilongo
Copy link
Author

dimitrilongo commented Aug 4, 2016

i think i know why because of this {{ field.description|raw }} https://github.com/getgrav/grav-plugin-form/blob/develop/templates/forms/default/field.html.twig#L59 it's not "translatable"

@flaviocopes
Copy link
Contributor

That's actually for the frontend, but in admin this is used: https://github.com/getgrav/grav-plugin-admin/blob/develop/themes/grav/templates/forms/field.html.twig#L75 - some issue though, fixed in c837942

@dimitrilongo
Copy link
Author

thanks a lot @flaviocopes

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

No branches or pull requests

3 participants