egeloen / IvoryGoogleMapBundle

Google Map API v3 integration for your Symfony2 project.
https://github.com/egeloen/ivory-google-map
MIT License
217 stars 152 forks source link

places autocomplete field does not support translation #124

Closed soerenmartius closed 8 years ago

soerenmartius commented 10 years ago

Hi, It seems like translations aren't working on the places autocomplete form field.

Moreover, when i pass attributes in the template to the form field they aren't rendered. If i go the "normal" way through a form type it works.

egeloen commented 10 years ago

For the attributes passed to the twig function, it is a know bug already reported in #116. For the translation, can you elaborate? What are you translating? The label? Something else?

soerenmartius commented 10 years ago

Hi @egeloen , I tried it for the label and the placeholder. It failed in for both cases.

soerenmartius commented 10 years ago

ok the label seems to work and only the placeholder fails... also inherited classes from form styles aren't loaded. I ll dig into the code and figure it out.

egeloen commented 10 years ago

In fact this part will be rewritten in the next major release of the bundle which will come after egeloen/ivory-google-map#95 is finalized. The major issue is the rendering is done in the buildView whereas it should be done in the template. This is why #116 is not fixable currently.

Anyway, for the issue about placeholder translation, IMO it is the expected behavior (by default no attributes are translated in the symfony2 form component) and so, it is the same here. It should be your responsibility to translate your attributes before passing them.

soerenmartius commented 10 years ago

@egeloen this is wrong. Placeholder is translated by default in the standart edition.

egeloen commented 8 years ago

Your issue has been fixed in #161 but will only be part of the 3.x version of the bundle.