ChicagoBoss/ChicagoBoss — pull request #349 by mihawk (2013-12-03 02:28:16+00:00)
Title: add support translator for lib module ex: boss_form from ngaranko

make easier to translate string through cb_admin panel for modules from the lib folder in a given cb app.

ex: boss_form from ngarango.

-module(login_form, [InitialData, Errors, Trans]).
-compile(export_all).

translatable_strings() ->
[
"Email",
"type email",
"Password",
"type password",
"Password is too short"
].

form_fields() ->
[
{email, [{type, char_field},
{label, Trans("Email")},
{required, true},
{html_options, [{class, "input-large col-xs-12"},
{placeholder, Trans("type email")}]}]}
,{password, [{type, char_field},
{widget, password_input},
{label, Trans("Password")},
{required, true},
{html_options, [{class, "input-large col-xs-12"},
{placeholder, Trans("type password")}]}]}
}}]}
].