代码拉取完成,页面将自动刷新
#!/bin/bash
#
# compare_lang.sh
# quick and dirty script to find missing lang strings in webmin lang files
#
# (c) https://github.com/gnadelwartz, 2020
#
# DISPLAY missing strings from one langfile:
#
# ./compare_lang.sh module/lang/xx
#
# UPDATE one langfile of a module with missing strings:
#
# ./compare_lang.sh module/lang/xx >>module/lang/xx
#
# UPDATE one langfile in ALL modules with missing strings:
#
# for FILE in webmin/*/lang/xx; do
# ./compare_lang.sh $FILE >>$FILE
# done
# $1 = lang file to check for missing strings against en
ENGLISH="$(dirname "$1")/en"
if [ "$1" == "" -o ! -f "$1" ]
then
echo "file does not exist or no file given ..."
echo "usage: $0 file"
exit 1
fi
while read message
do
# skip empty lines
[ "$message" == "" ] && continue
# skip comments, __noref and log_* messages
if [[ "$message" == "#"* ]] || [[ "$message" == "__norefs"* ]] || [[ "$message" == "log_"* ]]; then
echo "skip $message" 1>&2
continue
fi
# output missing lines
key="${message%%=*}"; [ "$key" == "$message" ] && continue
grep -e "^${key}=" "$1" >/dev/null || echo "${message}"
done < "${ENGLISH}"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。