Added translation to placeholder and title attributes
Added a unit test for the shortcut name of the InputOption class
Empty shortcut check in the constructor
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.
added the possibility to translate the placeholder and title attributes in the PHP form templates (refs #4194)
merged branch Nanocom/master (PR #4346)

Commits
-------

2c19b3c Empty shortcut check in the constructor
cf9039e Added a unit test for the shortcut name of the InputOption class

Discussion
----------

[Console] Single dash for option shortcuts

See https://github.com/symfony/symfony/pull/4062

---------------------------------------------------------------------------

by travisbot at 2012-05-20T13:09:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1380389) (merged 02290da4 into f433f6b0).

---------------------------------------------------------------------------

by stof at 2012-05-20T13:16:34Z

please rebase your branch to get rid of these merge commits
btw, you should use feature branches to send your next pull requests instead of using your master branch each time, which limits you to a single PR.

---------------------------------------------------------------------------

by Nanocom at 2012-05-20T13:39:32Z

Sorry for the mess, cleaning it

---------------------------------------------------------------------------

by travisbot at 2012-05-20T13:41:46Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1380549) (merged 63129657 into f433f6b0).

---------------------------------------------------------------------------

by travisbot at 2012-05-20T13:43:07Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1380553) (merged 2c19b3c7 into f433f6b0).
[Console] added an exception when an option name or shortcut is invalid (refs #4346)