9 Star 27 Fork 0

Gitee 极速下载/Webmin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/webmin/webmin
克隆/下载
compare_lang.sh 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
luz paz 提交于 2022-06-29 19:17 +08:00 . Fix user and non-user facing typos
#!/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}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Perl
1
https://gitee.com/mirrors/webmin.git
git@gitee.com:mirrors/webmin.git
mirrors
webmin
Webmin
master

搜索帮助