lukasgeiter/gettext-extractor

Extract comments from HTML

Closed this issue · 4 comments

wjdp commented

Hi, I'm looking at using this project with vue-gettext. That projects supports comments like:

<translate translate-comment="My comment for translators">Foo</translate>

I'd like to extract this comment, I'd imagine I'd configure like this:

HtmlExtractors.elementContent('translate', {
    attributes: {
        textPlural: 'translate-plural',
        context: 'translate-context',
        comment: 'translate-comment',
    }
}

Is this possible / feasible?

That should be quite simple to implement. I'll let you know once a release with that feature is out.

wjdp commented

Amazing, thanks @lukasgeiter

Version 3.5.0 with this feature is released. The example you provided should work without any other changes 🙂

wjdp commented

Whoa, that's fast! @lukasgeiter thank you very much for the great package and speedy delivery of this feature, almost too good! 😁