Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged branch andrefgneves/translate-widget-attributes (PR #4194)
Commits ------- 23bad29 Added translation to placeholder and title attributes Discussion ---------- Added translation to placeholder and title attributes --------------------------------------------------------------------------- by schmittjoh at 2012-05-03T13:52:38Z Better translate it where it is defined. Dynamic translations are usually not desirable as they cannot be automatically extracted, and thus require more work. --------------------------------------------------------------------------- by ruimarinho at 2012-05-03T13:57:30Z @schmittjoh but isn't that the same case as with labels for instance? I don't think injecting the translator service into the form type would require less work than what this PR suggests. --------------------------------------------------------------------------- by schmittjoh at 2012-05-03T14:02:02Z Yeah, same thing. There might be some cases where it's fine, but in general, we should try to not translate dynamic vars. --------------------------------------------------------------------------- by ruimarinho at 2012-05-03T14:17:44Z @schmittjoh I think that's one of those cases, since these attributes in particular (title and placeholder) are intended to aid the user with a brief description. I understand (and agree) with your concern regarding dynamic vars, but in my opinion this is a use case where it is worth it. Just my two cents :) --------------------------------------------------------------------------- by stof at 2012-05-03T18:07:01Z @schmittjoh the issue is that translating the label before the template would require injecting the translator in the form types (as the form label can be set there) and would force the user to duplicate the translation process if they pass the label explicitly in the template.
- Loading branch information