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

[Twig] Generator for trans #506

Open
rvanlaak opened this issue May 18, 2015 · 4 comments
Open

[Twig] Generator for trans #506

rvanlaak opened this issue May 18, 2015 · 4 comments

Comments

@rvanlaak
Copy link

While adding translations in my templates, it would be great if that could speed up by generating the stub code for a translation. Currently no generators are there, except the XML tag while pressing ALT + Insert.

twig-trans

Would be great a stub for a Twig translation filter could be added from that menu. Especially because the filter has to be added after the quote characters, so now that takes lot of presses on the arrow keys.

@rvanlaak
Copy link
Author

@Haehnchen what do you think about adding extra stubs speed up things?

Now ALT + ins only shows "Generate > XML tag", but it could always result in generators for the following tags and place the cursor at the place of the ‡ sign.

{% ‡ %}
{{ ‡ }}
{{ '' }}
{{ ''|trans }}

We could also think of other tags where the filter is located after quotes, and require intensive navigating with the keyboard arrows.

@Haehnchen Haehnchen changed the title Twig generator for trans [Twig] Generator for trans Jun 28, 2015
@Haehnchen
Copy link
Owner

it only make sense with a dialog to select a translation and the "trans style" to insert. all other are more like "code templates"

@rvanlaak
Copy link
Author

Would the plugin be able to add code templates then?

Haehnchen added a commit that referenced this issue Mar 5, 2017
…y leaks with a popover bridge #832; prepare persistent translation annotator for #506
@Haehnchen
Copy link
Owner

poc is ready, sweet stuff ;) same logic as translation extraction to detection domains and provide a preselected list

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

2 participants