Skip to content

How to Localize Error Messages? #686

Open
@obahareth

Description

@obahareth

Hey,

I would like to localize the Content missing message from here:

this.element.innerHTML = `<strong class="turbo-frame-error">Content missing</strong>`;

but I am not sure what's the appropriate way since this is a JS file that's putting a hardcoded string.

How can I get this to work with I18n?

Would monkeypatching this to use I18n.t and using the extension .js.erb work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions