JavaScript function _t is not definied

320 views
Skip to first unread message

Guido Erlinger

unread,
Aug 20, 2012, 9:59:42 AM8/20/12
to habar...@googlegroups.com
Hello,

I am testing the development version of habari.

On the login page http://dev.helpy.de/auth/login the JavaScript function _t is not definied!

See attached screenshot ==> _t_is_not_defined.png

I tested this with Firefox/Firebug on Ubuntu 12.04.

greetings,
guido

_t_is_not_defined.png

Colin

unread,
Aug 20, 2012, 10:52:16 AM8/20/12
to habar...@googlegroups.com
Oooops, looks like we have several attempts to use the PHP _t() function in Javascript code.

$ grep -l _t\( **/*.js | more
admin/js/admin.js
installer/script.js
vendor/humanmsg/humanmsg.js
$

Please log a new ticket on github/habari/habari

Thanks,
Colin


--
To post to this group, send email to habar...@googlegroups.com
To unsubscribe from this group, send email to habari-dev-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/habari-dev



--
Colin Seymour
Blog: http://colinseymour.co.uk
Tech Stuff: http://lildude.co.uk
Barefoot Running: http://barefootrunner.co.uk
IRC: lildude #habari

Owen Winkler

unread,
Aug 20, 2012, 11:10:18 AM8/20/12
to habar...@googlegroups.com
On 8/20/2012 10:52 AM, Colin wrote:
> Oooops, looks like we have several attempts to use the PHP _t() function
> in Javascript code.

There is a _t() function defined in javascript to perform the similar
function of the PHP one, translation. I'm not sure why the file that
provides the translated strings in javascript is not being included on
the login page, but these calls should not be removed.

Owen


Colin

unread,
Aug 20, 2012, 11:19:24 AM8/20/12
to habar...@googlegroups.com
Ooops. My bad.  Where do we define the _t() function in the Javascript?  I admit I've not done much investigation into this short of a few quick greps.


--
To post to this group, send email to habar...@googlegroups.com
To unsubscribe from this group, send email to habari-dev-unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/habari-dev

Owen Winkler

unread,
Aug 20, 2012, 11:33:37 AM8/20/12
to habar...@googlegroups.com
On 8/20/2012 11:19 AM, Colin wrote:
> Ooops. My bad. Where do we define the _t() function in the Javascript?
> I admit I've not done much investigation into this short of a few
> quick greps.

The Javascript _t() function is generated by the AdminLocaleHandler at
the URL /admin/locale

Thinking about it, it might not be possible to get the locale data if
you're not already logged in, due to the way AdminHandler works. Maybe
that's the issue?

Owen

Reply all
Reply to author
Forward
0 new messages