omda12 / akelosframework

Automatically exported from code.google.com/p/akelosframework
GNU Lesser General Public License v2.1
0 stars 0 forks source link

\PATCH Add t() (translate alias) in text_helper #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In views, each time I want to use php functions to display some text I had
to use '$text_helper->translate('Listing');' which is very boring each
time. So I added the t() function which is simply an alias to translate. In
models and controllers it's t() and not translate() ... I'm not sure to
understand why it's translate() and not t() in views.

The patch is attached;

Original issue reported on code.google.com by jerome.l...@gmail.com on 12 Apr 2007 at 5:49

Attachments:

GoogleCodeExporter commented 9 years ago
The only reason for translate and not t was of code readability. The cases were 
I
need to add translation within helpers the new Sintags helps on DRY by avoiding
$****_helper->
It worth having a look into the tests
http://akelosframework.googlecode.com/svn/trunk/test/fixtures/data/sintags_helpe
rs_data.txt
in order to know sintags possibilities.

By the way, your patch makes perfect sense and I've committed it on rev.198

Original comment by ber...@gmail.com on 13 Apr 2007 at 12:08

GoogleCodeExporter commented 9 years ago

Original comment by bermifer...@gmail.com on 13 Apr 2007 at 12:35