Tamer;
Including HTML in the I18n files can work, but you have to use html_safe
when rendering it:
Example:
app.en.yml:
user:
no_credit_card: 'You do not have a credit card registered in your
profile. You can add one by clicking <a href="/users/%{user_id}">here</a>.'
And, when rendering that message:
flash[:error] = I18n.translate("user.no_credit_card", :user_id =>
self.id.to_s).html_safe
Tim
On Saturday, December 7, 2013 3:33:51 AM UTC-5, Tamer Sherif wrote:
>
> Will do that, thanks again!
>
> Sent from my iPhone
> *Tamer*
>
> On Dec 6, 2013, at 8:08 PM, Ignacio Huerta <[email protected]<javascript:>>
> wrote:
>
> Hi Tamer,
>
> You are welcome :). Adding HTML in the I18n files is not going to work
> very well. You could edit the forms HTML with Dryml, but it will be much
> easier to do this with CSS. You can use firebug or similar inspector
> tools to navigate the code and then write your CSS. For example:
>
> form .name-help{
> font-weight: bold;
> }
>
> Regards,
> Ignacio
>
> El 04/12/13 08:10, Tamer Sherif escribió:
>
> Thank you Ignacio. Indeed it worked. Do you know how can I style the
>
> help text?
>
> For example I want it to be: *HELP* for name (bold)
>
>
> I tried doing it like this:
>
> - name: "<strong>HELP</strong> for name"
>
> - name: <strong>HELP</strong> for name
>
> but no luck!
>
>
>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.