fix: 卸载工具的comment只显示英文

This commit is contained in:
shenmo 2023-11-17 21:01:58 +08:00
parent caadd5d785
commit ddabb804d0
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
Package: cn.flamescion.bookworm-compatibility-mode
Version: 12.3.5
Version: 12.4
Section: misc
Priority: optional
Depends: bubblewrap,flatpak,zenity,policykit-1

View File

@ -23,7 +23,13 @@ for file in "$ACE_dir"/usr/share/applications/*.desktop; do
else
name=$name_i18n
fi
comment=$(grep -m 1 '^Comment=' "$file" | cut -d '=' -f 2)
comment_orig=$(grep -m 1 '^Comment=' "$file" | cut -d '=' -f 2)
comment_i18n=$(grep -m 1 "^Comment\[${LANGUAGE}\]\=" "$file" | cut -d '=' -f 2)
if [ -z "$comment_i18n" ] ;then
comment=$comment_orig
else
comment=$comment_i18n
fi
# 如果没有简介,则显示"N/A"
[[ -z "$comment" ]] && comment="N/A"
# 添加到应用列表数组