gettext-extractor icon indicating copy to clipboard operation
gettext-extractor copied to clipboard

Cannot extract context strings from identifiers

Open chkt opened this issue 2 years ago • 1 comments

Hi,

thanks for your great work! I encountered a smallish problem where the extractor fails to extract context strings that are not string literals from js/ts files. I like to put all my context strings into a typescript const enum to keep them dry.

Would it be feasible for your parser to resolve identifiers that point to stringifyable const and enum values in context arguments?

chkt avatar May 06 '22 20:05 chkt

Hi, that's an interesting idea. While it is technically possible, I'm not sure it's in the scope of this project. I'll keep this issue open for the time being though. If other people are looking for this too, I might reconsider.

lukasgeiter avatar May 08 '22 18:05 lukasgeiter