remove tmp folder, test for override of existing locales
This commit is contained in:
parent
9045ac3199
commit
ebf8894ca2
@ -1,3 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
"user": {
|
||||||
|
"avatar": {
|
||||||
|
"submitted": "XXXXXXX"
|
||||||
|
}
|
||||||
|
},
|
||||||
"new-key": "This is a new key"
|
"new-key": "This is a new key"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE}
|
|||||||
FROM $APP_IMAGE_CODE as code
|
FROM $APP_IMAGE_CODE as code
|
||||||
|
|
||||||
# copy public constants into the Docker image to brand it
|
# copy public constants into the Docker image to brand it
|
||||||
|
COPY tools/ tools/
|
||||||
COPY branding/static/ static/
|
COPY branding/static/ static/
|
||||||
COPY branding/constants/ constants/
|
COPY branding/constants/ constants/
|
||||||
COPY branding/locales/html/ locales/html/
|
COPY branding/locales/html/ locales/html/
|
||||||
@ -21,9 +22,6 @@ RUN apk add --no-cache bash jq
|
|||||||
|
|
||||||
RUN tools/merge-locales.sh
|
RUN tools/merge-locales.sh
|
||||||
|
|
||||||
## Something like (bash, jq must be installed)
|
|
||||||
# for locale in `ls locales/*.json`; do jq -s '.[0] * .[1]' source/$locale $locale; done;
|
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# BUILD ##########################################################################
|
# BUILD ##########################################################################
|
||||||
##################################################################################
|
##################################################################################
|
||||||
|
|||||||
@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
for locale in `ls locales/*.json`;
|
for locale in `ls locales/*.json`;
|
||||||
do
|
do
|
||||||
file = basename $locale;
|
file=$(basename $locale);
|
||||||
if [ -f locales/tmp/$file ]; then
|
if [ -f locales/tmp/$file ]; then
|
||||||
jq -s '.[0] * .[1]' $locale locales/tmp/$file > locales/tmp/tmp.json;
|
jq -s '.[0] * .[1]' $locale locales/tmp/$file > locales/tmp/tmp.json;
|
||||||
mv locales/tmp/tmp.json $locale;
|
mv locales/tmp/tmp.json $locale;
|
||||||
fi;
|
fi;
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
rm -r locales/tmp/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user