mirror of
https://gitlab.manjaro.org/applications/manjaro-architect
synced 2024-11-08 01:10:26 +00:00
Merge pull request #67 from papajoker/translate
translate tool file in memory
This commit is contained in:
commit
97b5c991d4
@ -3,10 +3,11 @@
|
|||||||
fns=($(awk -F'=' '/^_/ {print $1}' "../data/translations/english.trans"))
|
fns=($(awk -F'=' '/^_/ {print $1}' "../data/translations/english.trans"))
|
||||||
|
|
||||||
for lg in ../data/translations/*.trans ; do
|
for lg in ../data/translations/*.trans ; do
|
||||||
not=$(grep -cE "#.*translate me" "${lg}")
|
trans=$(<"${lg}")
|
||||||
|
not=$(echo "${trans}" | grep -cE "#.*translate me")
|
||||||
echo -e "\n-- $(basename "${lg}") ${not} to translate --"
|
echo -e "\n-- $(basename "${lg}") ${not} to translate --"
|
||||||
for key in "${fns[@]}"; do
|
for key in "${fns[@]}"; do
|
||||||
if (( $(grep -oEc "^${key}=" "${lg}") != 1)); then
|
if [[ ! $trans =~ $key ]]; then
|
||||||
echo -e "\t${key} not exist"
|
echo -e "\t${key} not exist"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user