Skip to content

Support for HTML elements inside i18n tags #1

@joaopslins

Description

@joaopslins

Hi,

I have a use case where my i18n tag has a HTML tag inside it, like <input>. I can get the translation working if I manually edit the file. But it looks like omnixlf doesn't support this. Am I doing something wrong or this is really not supported? If so, any plans of implementing this feature?

Example:

<span i18n="Filtro Datetime|Nos ultimos X dias@@datetimeFilterLastXDays">
    Nos últimos <input formControlName="days"/> dias
</span>

XLF output for pt-BR, main language: (source and target tags only, for clarity)

<trans-unit id="datetimeFilterLastXDays" datatype="html">
    <source>Nos últimos <x id="TAG_INPUT" ctype="x-input"/> dias</source>
    <target state="translated">Nos últimos <x id="TAG_INPUT" ctype="x-input"/> dias</target>
    [...]
</trans-unit>

XLF desired output for en-US:

<trans-unit id="datetimeFilterLastXDays" datatype="html">
    <source>Nos últimos <x id="TAG_INPUT" ctype="x-input"/> dias</source>
    <target state="translated">Last <x id="TAG_INPUT" ctype="x-input"/> days</target>
    [...]
</trans-unit>

Thanks for this tool by the way, really appreciate it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions