i18n Textcollector Task Alternative

120 views
Skip to first unread message

dospuntocero

unread,
Oct 4, 2012, 6:06:31 AM10/4/12
to silverst...@googlegroups.com
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

Anselm Christophersen

unread,
Oct 4, 2012, 6:15:54 AM10/4/12
to silverst...@googlegroups.com
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.

francisco arenas

unread,
Oct 4, 2012, 6:18:45 AM10/4/12
to silverst...@googlegroups.com
Im using the same combo as anselm… MAMP is really great for some stuff, but for installing stuff over it its a pain..

Sam Minnée

unread,
Oct 4, 2012, 2:27:54 PM10/4/12
to silverst...@googlegroups.com
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

--

Ingo Schommer

unread,
Oct 4, 2012, 6:06:36 PM10/4/12
to silverst...@googlegroups.com
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 ;)

Ingo Schommer

unread,
Oct 5, 2012, 10:35:15 AM10/5/12
to silverst...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages