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

@Ignore gets ignored for plain text form field labels #20

Closed
althaus opened this issue Jan 16, 2012 · 3 comments
Closed

@Ignore gets ignored for plain text form field labels #20

althaus opened this issue Jan 16, 2012 · 3 comments

Comments

@althaus
Copy link

althaus commented Jan 16, 2012

Hey again,

I just stumbled upon a bug again. We had some issues on deploying to my customers server so that I wrote a small debug script for testing their mail server. I made a simple MailType for wrting mails, which doesn't need translation.

So I marked the form field labels to be ignored by the extraction:

<?php
 $builder
          ->add('to', 'email', array(
              'label' => /** @Ignore */ 'An',
              'attr' => array('class' => 'medium')
          ))
  ;

Nevertheless the label gets extracted by the console command and added to my messages.de.yml:

An: An   # FIXME

This shouldn't happen? The @Ignore works fine in all other (more complex) situations.

Cheers
Matthias

@schmittjoh
Copy link
Owner

This is the expected behavior atm.

@ignore is only used for suppressing the error message. We could change this to actually ignore the key (regardless of whether it would cause an error or not) which is probably what people would expect. Feel free to send a PR.

@althaus
Copy link
Author

althaus commented Jan 17, 2012

Ah... ok... didn't know that.

I'll at least provide an updated doc as it's missing a couple of things.

@schmittjoh
Copy link
Owner

Ok, closing this then.

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