praekeltfoundation / jspot

Extracts gettext strings from Javascript files into pot files
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

About functionnalities #20

Closed JSteunou closed 10 years ago

JSteunou commented 10 years ago

Just a discussion topic to ask you guys what are the features you want to add, or not, to jspot?

It already does (and pretty damn well)

What about initiate .po for a list of language? What about updating .po from .pot?

I have some piece of code about those cases, but it's just using nodejs to launch msginit, msgmerge instead of using command line or Poedit.

Have you ever considered that jspot should only focus on creating .pot and let pomo conversion in json to po2json or, completely the opposite, jspot being a complete tool chain from code + liste of languages to pomo in json?

justinvdm commented 10 years ago

@JSteunou

Some context that might help: I think the main reason behind jspot was because we couldn't find something robust enough out there for extracting gettext strings from javascript code. Once that was supported, it was doing half of the work that would usually need to be done by dev partners and others using our platform. The other half was turning po files to json files. We decided that it would help if we gave them a single tool to use to do the translation tasks required from them, so we included a simple po2json wrapper.

So with this context in mind, I think our plans are to keep jspot as a gettext extraction tool for js-based projects, and leave the other translation tasks we may need to the other tools out there (including the features you mentioned above).

Hope that helps :)

JSteunou commented 10 years ago

Like you I couldn't find robust tools to extract gettext strings from js. I'm currently using a grunt xgettext task, that does the job, but wrote around regex and more a one shot tool than a solid ground production ready extraction tool. Now jspot is solid and with Handlebars support (or near) I'm considering using it in our projects. That's why I was wondering if you would prefer make jspot a complete tool chain, in that case I would PR the missing pieces I'm currently using, or making it single task. I was confuse by the little po2json wrapper.

Now it's crystal clear, I understand the need behind jspot, thank you for the enlightenment.

justinvdm commented 10 years ago

Cool :) glad the helped, closing to the ticket for now.