bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml
Other
320 stars 28 forks source link

how to render html gettext msgstr inside blade template? #203

Closed nkhine closed 10 years ago

nkhine commented 10 years ago

hi, i am using i18next http://i18next.com/node/index.html with my application to localise some content and have a blade template like:

include "../layout.blade"
replace page
    .row.reg-form
        .large-10.large-centered.columns
            .row.centred
                .large-12.columns
                    h2=t("Thank you!")
                    h1=t("Application has been submitted")
                    block=t("<p>Your application will be processed by our sales staff within one working day.</p><p> You will be notified by email when your business has been verified and you will then be able to trade with us.</p>")
            .row
                .large-12.columns
                    a.cta.brandRed( href="/" )
                        i=t("Return home")

and in my locale.po file i would have something like:

msgid
    """
        <p>Your application will be processed by our sales staff within one
        working day.</p>
        <p>You will be notified by email when your business has been verified
        and you will then be able to trade with us.</p>
    """
msgstr
       ""

when i display this, the <p> html tags are displayed.

the only way around is to either have a msgid for each <p> html tag and then change the blade template accordingly.

any advise much appreciated

bminer commented 10 years ago

I do not understand your problem. Could you please provide more information?

This is not a Blade issue. It is more of a question. Because of that, I am closing the issue; however, you can feel free to post back here.