i18n Textcollector Task Alternative

Showing 1-6 of 6 messages
i18n Textcollector Task Alternative dospuntocero 10/4/12 3:06 AM
Hi guys, i was wondering if there is an alternative to the text collector that doesnt use PHP Test Unit... usually i could get my translations without much trouble from that task even getting errors, but now i just cant. Im not a hardcore developer so i dont think i need to install a php test suite, but i really need to get my translated YML files.

thanks in advance
Re: [silverstripe-dev] i18n Textcollector Task Alternative anselmdk 10/4/12 3:15 AM
I agree that it would be beneficial finding a solution to that.
I developed on Ubuntu for a while and there it was not a big deal getting PHP unit set up.
For several reasons I'm now back at using OSX and MAMP, and all I remember was it being a big pain setting that up.

I would probably find my way around once I really need it, but it would be nice to make is easy for everybody to add i18n support to their code and modules.

Anselm



On 04/10/2012, at 12.06, dospuntocero wrote:

Hi guys, i was wondering if there is an alternative to the text collector that doesnt use PHP Test Unit... usually i could get my translations without much trouble from that task even getting errors, but now i just cant. Im not a hardcore developer so i dont think i need to install a php test suite, but i really need to get my translated YML files.

thanks in advance

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/yY2dUmTaHhQJ.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.

RE: [silverstripe-dev] i18n Textcollector Task Alternative dospuntocero 10/4/12 3:18 AM
Im using the same combo as anselm… MAMP is really great for some stuff, but for installing stuff over it its a pain..
Re: [silverstripe-dev] i18n Textcollector Task Alternative Sam Minnée 10/4/12 11:27 AM
There is nothing out of the box, so the alternative would be to refactor the existing class.

On 4/10/2012, at 11:06 PM, dospuntocero <francisc...@gmail.com> wrote:

Hi guys, i was wondering if there is an alternative to the text collector that doesnt use PHP Test Unit... usually i could get my translations without much trouble from that task even getting errors, but now i just cant. Im not a hardcore developer so i dont think i need to install a php test suite, but i really need to get my translated YML files.

thanks in advance

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/yY2dUmTaHhQJ.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.
Re: [silverstripe-dev] i18n Textcollector Task Alternative Ingo Schommer 10/4/12 3:06 PM
PHPUnit isn't needed for its operation, as the source code hints:

// HACK Ugly workaround to avoid "Cannot redeclare class PHPUnit_Framework_TestResult" error
// when running text collector with PHPUnit 3.4. There really shouldn't be any dependencies
// here, but the class reflection enforces autloading of seemingly unrelated classes.
// The main problem here is the CMSMenu class, which iterates through test classes,
// which in turn trigger autoloading of PHPUnit.
$phpunitwrapper = PhpUnitWrapper::inst();
$phpunitwrapper->init();

So in the end, you have to prevent those test classes from being included in the ClassManifest.
This is usually done by implementing the "TestOnly" interface as a flag.
I think we need to refactor the retrieval from going through all PHP files,
to using ClassInfo::implementorsOf() and then looking if the file path of the class matches.
Feel free to give it a shot, otherwise I will in the next week.

BTW, phpunit is now easier to install (mainly because pear is a bit less crap than it used to be).
Still no match to composer, of course ;)
Re: [silverstripe-dev] i18n Textcollector Task Alternative Ingo Schommer 10/5/12 7:35 AM