十一 152007
 

My codes is:

public function testGetTextTw()

{

    $t = new Zend_Translate(‘gettext’, ‘./_locale/’, ‘zh_TW’);

    $this->assertEquals(‘n2′, $t->_(‘New’));

}

public function testGetTextCn()

{

    $t = new Zend_Translate(‘gettext’, ‘./_locale/’, ‘zh_CN’);

    $this->assertEquals(‘n1′, $t->_(‘New’));

}

But, the testGetTextCn() go into fail: expected string ‘n1′ but got string ‘n2′.

So, I read the codes in Zend_Translate_Adapter::__construct().
the param variable $local was covered by an other value.

I made this patch:

zend_translate_adapter patch

Now, it works fine!

The issue and the patch have been submited to issue tracker:

framework.zend.com/issues/browse/ZF-2205

 

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>