test jq to merge locale files
This commit is contained in:
parent
07cd6ab7e8
commit
111b1da00d
@ -15,6 +15,9 @@ COPY branding/constants/ constants/
|
||||
COPY branding/locales/ locales/
|
||||
COPY branding/assets/styles/imports/ assets/styles/imports/
|
||||
|
||||
## Something like (bash, jq must be installed)
|
||||
# for locale in `ls locales/*.json`; do jq -s '.[0] * .[1]' source/$locale $locale; done;
|
||||
|
||||
##################################################################################
|
||||
# BUILD ##########################################################################
|
||||
##################################################################################
|
||||
|
||||
12
tools/test/file1.json
Normal file
12
tools/test/file1.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"a-key": "A",
|
||||
"b-key": {
|
||||
"a-subkey": "A",
|
||||
"b-subkey": "B",
|
||||
"c-subkey": {
|
||||
"a-subsubkey": "A",
|
||||
"b-subsubkey": "B"
|
||||
}
|
||||
},
|
||||
"c-key": "C"
|
||||
}
|
||||
11
tools/test/file2.json
Normal file
11
tools/test/file2.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"a-key": "AA",
|
||||
"b-key": {
|
||||
"b-subkey": "BB",
|
||||
"c-subkey": {
|
||||
"b-subsubkey": "BB",
|
||||
"c-subsubkey": "C"
|
||||
}
|
||||
},
|
||||
"d-key": "D"
|
||||
}
|
||||
15
tools/test/result.json
Normal file
15
tools/test/result.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"a-key": "AA",
|
||||
"b-key": {
|
||||
"a-subkey": "A",
|
||||
"b-subkey": "BB",
|
||||
"c-subkey": {
|
||||
"a-subsubkey": "A",
|
||||
"b-subsubkey": "BB",
|
||||
"c-subsubkey": "C"
|
||||
}
|
||||
},
|
||||
"c-key": "C",
|
||||
"d-key": "D"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user