mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
修改生成的图标
This commit is contained in:
parent
923dac898d
commit
170f95a67e
@ -5,7 +5,7 @@ set -e
|
|||||||
function help()
|
function help()
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: ${0##*/} [+-s} [published] [translated] [translating] [sources]
|
Usage: ${0##*/} [+-s] [published] [translated] [translating] [sources]
|
||||||
|
|
||||||
显示已发布、已翻译、正在翻译和待翻译的数量
|
显示已发布、已翻译、正在翻译和待翻译的数量
|
||||||
|
|
||||||
@ -27,7 +27,8 @@ shift $(( OPTIND - 1 ))
|
|||||||
OPTIND=1
|
OPTIND=1
|
||||||
|
|
||||||
declare -A catalog_comment_dict
|
declare -A catalog_comment_dict
|
||||||
catalog_comment_dict=([translated]="待校对" [published]="已发布" [translating]="翻译中" [sources]="待翻译")
|
catalog_comment_dict=([sources]="待翻译" [translating]="翻译中" [translated]="待校对" [published]="已发布")
|
||||||
|
catalog_color_dict=([sources]="#97CA00" [translating]="#00BCD5" [translated]="#FF9800" [published]="#FF5722")
|
||||||
|
|
||||||
function count_files_under_dir()
|
function count_files_under_dir()
|
||||||
{
|
{
|
||||||
@ -60,26 +61,27 @@ for catalog in "$@";do
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
comment=${catalog_comment_dict[${catalog}]}
|
comment=${catalog_comment_dict[${catalog}]}
|
||||||
|
color=${catalog_color_dict[${catalog}]}
|
||||||
if [[ "${show_format}" == "svg" ]];then
|
if [[ "${show_format}" == "svg" ]];then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="20">
|
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="20">
|
||||||
<linearGradient id="b" x2="0" y2="100%">
|
<linearGradient id="b" x2="0" y2="100%">
|
||||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
|
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
|
||||||
<stop offset="1" stop-opacity=".1" />
|
<stop offset="1" stop-opacity=".1" />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
<mask id="a">
|
<mask id="a">
|
||||||
<rect width="132.53125" height="20" rx="3" fill="#fff" />
|
<rect width="100" height="20" rx="3" fill="#fff" />
|
||||||
</mask>
|
</mask>
|
||||||
<g mask="url(#a)">
|
<g mask="url(#a)">
|
||||||
<path fill="#555" d="M0 0 h70.53125 v20 H0 z" />
|
<path fill="#555" d="M0 0 h60 v20 H0 z" />
|
||||||
<path fill="#97CA00" d="M70.53125 0 h62.0 v20 H70.53125 z" />
|
<path fill="${comment}" d="M60 0 h40 v20 H70.53125 z" />
|
||||||
<path fill="url(#b)" d="M0 0 h132.53125 v20 H0 z" />
|
<path fill="url(#b)" d="M0 0 h100 v20 H0 z" />
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" font-family="DejaVu Sans" font-size="11">
|
<g fill="#fff" font-family="DejaVu Sans" font-size="11">
|
||||||
<text x="6" y="15" fill="#010101" fill-opacity=".3">${comment}</text>
|
<text x="12" y="15" fill="#010101" fill-opacity=".3">${comment}</text>
|
||||||
<text x="6" y="14">${comment}</text>
|
<text x="12" y="14">${comment}</text>
|
||||||
<text x="74.53125" y="15" fill="#010101" fill-opacity=".3">${num}</text>
|
<text x="70" y="15" fill="#010101" fill-opacity=".3">${num}</text>
|
||||||
<text x="74.53125" y="14">${num}</text>
|
<text x="70" y="14">${num}</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user