BazingaJsTranslationBundle
BazingaJsTranslationBundle copied to clipboard
[#163] Added support for translation extractors for JS
Improve PR https://github.com/willdurand/BazingaJsTranslationBundle/pull/164
Ping @willdurand, @JANorman, @monteiro @stof and @jcchavezs (thank you for helping me)
Great work @jeremy-richard!
I know CoffeeExtractorTest did not change from the previous PR https://github.com/willdurand/BazingaJsTranslationBundle/pull/164
Is JsExtractorTest OK? Should I do the same modifications to CoffeeExtractorTest, or define dataProviders onto a new parent class aka BaseExtractorTest ?
I'd recommend to do the abstract class as they behave the same.
Done, hopefully this feature will be available soon.
@jeremy-richard looks good! Thanks for the great work.
Can you add just the missing break in all js and coffee files. That’s would be great.
Sorry for taking a lot of time.
Do we really need two extractors? Why not allowing users to define the file extensions themselves? I can imagine .ts
(typescript) as a useful extension. Thanks for this PR!
@monteiro yep, I'll do that.
@willdurand hi, it sounds like a good idea. How would you like to proceed? I'd like to have a FrontEndExtractor, then set the extension to handle via the key bazinga_js_translation.frontend_extensions with the default value being ['js', 'jsx', 'coffee', 'ts']
Does the sequence will be the same for typescript then? (I've never code with typescript to be honest)
@willdurand Hi, I found the way to have only one extractor to handle extraction from frontend files. Let me know how to improve it.