Added a mock translation handler and translation factories.
authorGunnar Wrobel <p@rdus.de>
Mon, 18 Oct 2010 12:36:17 +0000 (14:36 +0200)
committerGunnar Wrobel <p@rdus.de>
Mon, 18 Oct 2010 12:49:21 +0000 (14:49 +0200)
commit29bb2aca756f91a2be5c14d86a4c7239dd2b13d9
tree7a695b01474e78dc943c9a965255293e5bedadee
parentfacaa53b69d3499289a445f083a8339f09d2878c
Added a mock translation handler and translation factories.

Creating new translation handlers within the classes that use
translated texts breaks the idea of dependency injection.
Providing such classes with a factory that delivers the
translation handler on demand seems to be more flexible to me.

Horde_Translation_Factory_Gettext also distinguishes between
repository checkout and installed PEAR package. In both
situations the locale directories are placed into different
locations.
framework/Translation/lib/Horde/Translation/Factory.php [new file with mode: 0644]
framework/Translation/lib/Horde/Translation/Factory/Gettext.php [new file with mode: 0644]
framework/Translation/lib/Horde/Translation/Factory/Mock.php [new file with mode: 0644]
framework/Translation/lib/Horde/Translation/Mock.php [new file with mode: 0644]
framework/Translation/package.xml
framework/Translation/test/Horde/Translation/Autoload.php [new file with mode: 0644]
framework/Translation/test/Horde/Translation/FactoryTest.php [new file with mode: 0644]
framework/Translation/test/Horde/Translation/GettextTest.php
framework/Translation/test/Horde/Translation/phpunit.xml [new file with mode: 0644]