schmittjoh / JMSTranslationBundle

Puts the Symfony2 Translation Component on steroids
http://jmsyst.com/bundles/JMSTranslationBundle
427 stars 291 forks source link

How to generate XLIFF files? #428

Open cmerli opened 7 years ago

cmerli commented 7 years ago

Sorry to ask, but I really don't understand how to generate the XLIFF translation files from YAML. All my messages are in a YAML file now, in the translations directory /www/surex/backend/app/Resources/translations:

And this is what I got:

Extracting Translations for locale en
Keep old translations: No
Output-Path: /home/cristian/www/surex/backend/app/Resources/translations
Directories: /home/cristian/www/surex/backend/app/Resources/translations
Excluded Directories: cache, data, logs, vendor
Excluded Names: *TestCase.php, *Test.php, *Controller.php
Output-Format: xliff
Custom Extractors: # none #
============================================================
Loading catalogues from "/home/cristian/www/surex/backend/app/Resources/translations"
Extracting translation keys
Extracting messages from directory : /home/cristian/www/surex/backend/app/Resources/translations
done!

Is that supposed to generate XLIFF files? I don't get any. Is it ok to leave Custom Extractors blank?

Thanks

Bundle version: 1.3.1 Symfony version: 2.8.15

Fraktalis commented 7 years ago

Hi ! I'm not sure to understand what you try to do. Do you want to extract your messages from YML files into XLIFF files ? If so, it's impossible. You should set your directories to /home/cristian/www/surex/backend/app or /home/cristian/www/surex/backend/src so that it can find translations keys.

Nyholm commented 7 years ago

I created a converter for this purpose. See https://github.com/php-translation/converter