Open agarciabz opened 4 years ago
I believe it is intended that you use the marker declaration for non-trivial cases such as using a variable. I don't think the parser does complex checking such as when are variable used to extract the translation contained in them (which may change, it's unpredictable).
I am facing the exact same problem as @agarciabz. It is only able to extract :
marker("String")
but do not extract:
let stringVar = "String";
marker(stringVar)
I store a translation key in a variable to reuse it later, but when I'm running a extraction script this key is not generated in my JSON file.
Strangely enough, the extraction works if I pass the key as a string literal.
This is the script I'm using:
My dependencies:
Workaround: using marker on the variable declaration. It works this way.
I find very strange that is not extracting if it's from a variable, could you take a look at this? Thanks.