I have a pattern of language specific folders (/src/i18n/en,/src/i18n/es, etc) that I am matching to find files under each and merge them, but using the following code, the output file only contains the last language. I realize this is probably because inside each language file the structures are the same, ie:
{ "helloMsg": "hello" } and { "helloMsg": "hola" }
Is there a way for this plugin to write the pattern name of the folder into each grouping before writing it to the file? My translation software unfortunately seems to need me to keep the pattern above for it to be able to write those files to the folders properly.
This isn't a file naming problem. It is a file content problem. But in any event, I just wrote my own script to take care of the merging I need. Thanks anyway.
I have a pattern of language specific folders (
/src/i18n/en
,/src/i18n/es
, etc) that I am matching to find files under each and merge them, but using the following code, the output file only contains the last language. I realize this is probably because inside each language file the structures are the same, ie:{ "helloMsg": "hello" }
and{ "helloMsg": "hola" }
instead of
{ "en": { "helloMsg": "hello"} }
and{ "es": { "helloMsg": "hola"} }
Is there a way for this plugin to write the pattern name of the folder into each grouping before writing it to the file? My translation software unfortunately seems to need me to keep the pattern above for it to be able to write those files to the folders properly.
Below is what my current code looks like