PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Template_Flexy » Bug #6723

Flexy and Translation2 issues

Details

Submitted2006-02-08 09:26 UTC
Frombjartekv at gmail dot com
StatusBogus
PackageHTML_Template_Flexy
PHP Version5.0.4
OSLinux
Roadmaps(Not assigned)

Comments

[2006-02-08 09:26 UTC] bjartekv at gmail dot com

Description:
------------
Hi!

Ran into some problems when i tried to use Translation2 with flexy. I am using the latest Translation2 beta.

I tracked it down to a call to constructor in
HTML/Template/Flexy/Compiler/Standard.php line 82-85

It works however if I set compiler to 'Flexy'.

Also I don't get any translations out, because for some reason the lang gets set to '-'.

Dataobject debug:

SELECT * FROM translations WHERE translations.page = 'poll.html' AND translations.lang = '-' AND translations.translation = 'There are currently no polls running'

Seems like $this->currentLang['id'] isn't set in
Translation2/Container/dataobjectsimple.php on line 176.

Is there something I didn't configure correctly?

-Bjarte

Test script:
---------------
my configuration:
'locale' => 'no',
'compiler' => 'Standard',
'Translation2' => array('driver' => 'dataobjectsimple','options'=>array())

Expected result:
----------------
Translated text

Actual result:
--------------
Fatal error: Translation2 error: Don't use the constructor - use factory() in /usr/share/pear/Translation2.php on line 129

[2006-02-08 09:38 UTC] bjartekv at gmail dot com

Ok :)

Any ideas why the lang get set to '-' when using the Flexy compiler? The locale is added to filename, but it doesnt seem to be in the dataobjectsimple container.

-Bjarte

[2006-02-08 10:06 UTC] bjartekv at gmail dot com

Ok, so you have a language '-' in the database then?

But the query doesnt change the lang parameter to 'en' or 'no' When I change the locale to that. So it seems the dataobjectsimple Translation2 container isn't supplied with a valid language id.

-Bjarte

[2006-02-14 19:06 UTC] bjartekv at gmail dot com

Added a language - in the database, worked flawlessly.
Sorry to bother you.