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

[Translation] in XLIFF format in app/Resources/translations #479

Closed
Nyholm opened this issue Apr 14, 2015 · 17 comments
Closed

[Translation] in XLIFF format in app/Resources/translations #479

Nyholm opened this issue Apr 14, 2015 · 17 comments

Comments

@Nyholm
Copy link

Nyholm commented Apr 14, 2015

According to the best practices you should store your translations in XLIFF format in the app/Resources/translations folder.

Please correct me if I'm wrong but I can't get it to work properly:

  • Autocomplete - Works fine
  • ctrl + click on a translation does not show the source of the translation
  • I can't extract translations to app/Resources/translations
@Haehnchen
Copy link
Owner

its because of XLIFF is a not supported language type by phpstorm. will open external issue

@Nyholm
Copy link
Author

Nyholm commented Apr 20, 2015

Thank you @Haehnchen. I did not know that. Please link to that external issue once it is open.

@marapper
Copy link

marapper commented Jun 7, 2015

https://youtrack.jetbrains.com/issue/WI-9220

*.xlf and *.xliff registered as pattern for XML but it doesn't work properly:

If domain1 contains *.xlf files and domain2 contains *.xliff files and domain3 contains *.yml files

  • suggest works only for *.yml
  • ctrl+click doesnt jump to *.xliff files for neither translation text either domain file
  • "Extract translation" suggest full list domains in "Domain (Yaml)" and oly *.yml files in a current domain file list

@marapper
Copy link

marapper commented Jun 7, 2015

  1. "Create translation key" hint shows up only for *.yml
  2. trans_default_domain doesn't work for *.xliff

@rvanlaak
Copy link

rvanlaak commented Jul 9, 2015

Big 👍 for xliff support, it seems the Jetbrains issue is closed, so I've opened a new one with more info: https://youtrack.jetbrains.com/issue/WI-27964#

@rvanlaak
Copy link

There is quite some activity on the Jetbrains issue page over the last few days 👍

@marapper
Copy link

👍

@stof
Copy link
Contributor

stof commented Oct 8, 2015

@Haehnchen any plan to make this work at least when xliff files are registered as being XML files in PhpStorm ?

@Haehnchen
Copy link
Owner

yes, xml is all i need. i am thinking of a mini plugin if jetbrains dont getting it :)

@neuro159
Copy link

We don't plan to work on this internally/ add .xliff to xml for all users by default.
We can help make the 3rd party plugin work.

@stof
Copy link
Contributor

stof commented Nov 24, 2015

@Haehnchen please start by supporting Xliff files in this bundle when they are already registered as an XML pattern (I did it in my PhpStorm already).
Then, you could create a plugin registering it automatically, but this may not be worth it: doing it manually is easier than installing a plugin (it requires at most 4 clicks to do it, and no restart...)

@Nyholm
Copy link
Author

Nyholm commented Nov 24, 2015

Thank you @neuro159 for replying to this issue.

@Haehnchen Is it anything I can do to help?

@rvanlaak
Copy link

rvanlaak commented Mar 9, 2016

Saw 84fb5db, would it also be possible to add a generator for translations in XLIFF now?

@piegus
Copy link

piegus commented May 23, 2016

+1

@rvanlaak
Copy link

@Nyholm I've been postponing our move from .yml translations to .xlf translations because of the partial IDE support. Basically we'd love to start using Weblate for Git-integrated continuous translation based on .xlf, but if that would compromise the developer experience we will postpone it again.

So, you got the autocomplete, CTRL+click, extractor and generator in Twig working as how it works with .yml?

@Haehnchen
Copy link
Owner

finally its supported now, but you need to register all XLIFF extension as xml files. I am also thinking of adding a notification like its done by the Drupal plugin which announcing eg .module files

@Haehnchen
Copy link
Owner

closing XLIFF extension issue; documented in optional installation requirements

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

7 participants