mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-11-19 10:58:20 +01:00
minor fix
This commit is contained in:
parent
a111162e7b
commit
4290ea602a
@ -29,9 +29,10 @@ grep --include=\*.{coffee,tag} -roh "$1" -e '__("[^"]*"' | while read -r line ;
|
|||||||
echo -e "\t\"$SUBSTRING\":\"$SUBSTRING\"," >> "tmp.json"
|
echo -e "\t\"$SUBSTRING\":\"$SUBSTRING\"," >> "tmp.json"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
grep --include=\*.{coffee,html,tag} -roh "$1" -e '\"__\([^\"]*\)\"' | while read -r line; do
|
grep --include=\*.{coffee,html,tag} -roh "$1" -e '\"__([^\"]*)\"' | while read -r line; do
|
||||||
len=$(( ${#line} - 6 ))
|
len=$(( ${#line} - 6 ))
|
||||||
#echo $len
|
#echo $len
|
||||||
|
#echo $line
|
||||||
SUBSTRING=${line:4:len}
|
SUBSTRING=${line:4:len}
|
||||||
#echo $SUBSTRING
|
#echo $SUBSTRING
|
||||||
if test -f "$2" && [ ! -z "$(grep -F "\"$SUBSTRING\":" "$2")" ]
|
if test -f "$2" && [ ! -z "$(grep -F "\"$SUBSTRING\":" "$2")" ]
|
||||||
@ -41,21 +42,26 @@ grep --include=\*.{coffee,html,tag} -roh "$1" -e '\"__\([^\"]*\)\"' | while read
|
|||||||
echo -e "\t\"$SUBSTRING\":\"$SUBSTRING\"," >> "tmp.json"
|
echo -e "\t\"$SUBSTRING\":\"$SUBSTRING\"," >> "tmp.json"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
sort tmp.json > tmp1.json
|
if test -f tmp.json
|
||||||
awk '!a[$0]++' "tmp1.json" > tmp.json
|
|
||||||
sed '$ s/.$//' tmp.json > tmp1.json
|
|
||||||
# remove duplicate entry
|
|
||||||
if test -f $2
|
|
||||||
then
|
then
|
||||||
|
sort tmp.json > tmp1.json
|
||||||
|
awk '!a[$0]++' "tmp1.json" > tmp.json
|
||||||
|
sed '$ s/.$//' tmp.json > tmp1.json
|
||||||
|
# remove duplicate entry
|
||||||
|
if test -f $2
|
||||||
|
then
|
||||||
cp $2 "$2.old"
|
cp $2 "$2.old"
|
||||||
sed '$ s/.$//' $2 > tmp.json
|
sed '$ s/.$//' $2 > tmp.json
|
||||||
cat tmp.json > $2
|
cat tmp.json > $2
|
||||||
echo "," >> $2
|
echo "," >> $2
|
||||||
cat tmp1.json >> $2
|
cat tmp1.json >> $2
|
||||||
echo "}" >> "$2"
|
echo "}" >> "$2"
|
||||||
else
|
else
|
||||||
echo "{"> "$2"
|
echo "{"> "$2"
|
||||||
cat tmp1.json >> "$2"
|
cat tmp1.json >> "$2"
|
||||||
echo "}" >> "$2"
|
echo "}" >> "$2"
|
||||||
|
fi
|
||||||
|
rm tmp.json tmp1.json
|
||||||
|
else
|
||||||
|
echo "Nothing change"
|
||||||
fi
|
fi
|
||||||
rm tmp.json tmp1.json
|
|
@ -255,4 +255,16 @@
|
|||||||
"Please select an entry":"Vui lòng chọn 1 mục từ danh sách",
|
"Please select an entry":"Vui lòng chọn 1 mục từ danh sách",
|
||||||
"Startup applications":"Ứng dụng khởi chạy",
|
"Startup applications":"Ứng dụng khởi chạy",
|
||||||
"Startup services":"Dịch vụ khởi chạy"
|
"Startup services":"Dịch vụ khởi chạy"
|
||||||
|
|
||||||
|
,
|
||||||
|
"Cannot export to PNG in this browser: {0}":"Cannot export to PNG in this browser: {0}",
|
||||||
|
"Cannot export to {0}: {1}":"Cannot export to {0}: {1}",
|
||||||
|
"Cannot export: {0}":"Cannot export: {0}",
|
||||||
|
"Export as":"Export as",
|
||||||
|
"File exported":"File exported",
|
||||||
|
"Syntax error: {0}":"Syntax error: {0}"
|
||||||
|
|
||||||
|
,
|
||||||
|
"Graph editor":"Graph editor",
|
||||||
|
"Render":"Render"
|
||||||
}
|
}
|
||||||
|
@ -246,6 +246,21 @@
|
|||||||
"Edit mount point":"Sửa điểm truy cập"
|
"Edit mount point":"Sửa điểm truy cập"
|
||||||
|
|
||||||
,
|
,
|
||||||
"Services":"Services",
|
"Services":"Dịch vụ",
|
||||||
"Startup":"Startup"
|
"Startup":"Khởi chạy"
|
||||||
|
|
||||||
|
,
|
||||||
|
"Add application":"Thêm ứng dụng",
|
||||||
|
"Add service":"Thêm dịch vụ",
|
||||||
|
"Please select an entry":"Vui lòng chọn 1 mục từ danh sách",
|
||||||
|
"Startup applications":"Ứng dụng khởi chạy",
|
||||||
|
"Startup services":"Dịch vụ khởi chạy"
|
||||||
|
|
||||||
|
,
|
||||||
|
"Cannot export to PNG in this browser: {0}":"Cannot export to PNG in this browser: {0}",
|
||||||
|
"Cannot export to {0}: {1}":"Cannot export to {0}: {1}",
|
||||||
|
"Cannot export: {0}":"Cannot export: {0}",
|
||||||
|
"Export as":"Export as",
|
||||||
|
"File exported":"File exported",
|
||||||
|
"Syntax error: {0}":"Syntax error: {0}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user