From e70278c03311387f1139a7ad83ad737dea29b45a Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Sat, 24 Feb 2024 00:03:13 -0800 Subject: [PATCH] Remove update_locale.sh script --- .pkgmeta | 3 +-- update_locale.sh | 57 ------------------------------------------------ 2 files changed, 1 insertion(+), 59 deletions(-) delete mode 100755 update_locale.sh diff --git a/.pkgmeta b/.pkgmeta index d951246..3e830d3 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -6,5 +6,4 @@ ignore: - libs/lua-pb/wowtest - protobuf/Myslot.proto - README.markdown - - extract_locale.sh - - update_locale.sh + - extract_locale.sh \ No newline at end of file diff --git a/update_locale.sh b/update_locale.sh deleted file mode 100755 index 4f10ef5..0000000 --- a/update_locale.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -VER=`cat MySlot.ver` -LOCALE='locales.lua' -TOC='MySlot.toc' - -TOCNOTE_KEY='TOC_NOTES' - -WOWACE_EXPORT_URL='http://www.wowace.com/addons/myslot/localization/export.txt?' - -REPLACING_SURFIX="wowace" - -declare -A TOCNOTEMAP - -echo "building $LOCALE ..." -true > "$LOCALE.$REPLACING_SURFIX" - -while read -r r; do - - param=`echo $r | sed -ne 's/.*(\([^$]*\)).*/\1/p' | sed 's/[" ]//g' | sed 's/,/\&/g' | sed 's/locale=/language=/' | sed 's/-/_/g'` - - if [ -n "$param" ]; then - lang=`echo $param | sed -n 's/language=\(\w*\).*/\1/p'` - if [ -n "$lang" ]; then - : - echo "Downloading $lang ..." - curl -s "$WOWACE_EXPORT_URL$param" >> $LOCALE.$REPLACING_SURFIX - note=`grep "L\[\"$TOCNOTE_KEY\"\]" $LOCALE.$REPLACING_SURFIX | tail -n 1 | cut -d = -f 2 | sed 's/"//g'` - - TOCNOTEMAP[$lang]="$note" - - continue - fi - fi - - echo $r >> $LOCALE.$REPLACING_SURFIX - -done< <(cat $LOCALE) - -echo "$LOCALE.$REPLACING_SURFIX done" - -echo "building $TOC ..." -true > "$TOC.$REPLACING_SURFIX" - -while read -r r; do - #@localization(locale="enUS", key="TOC_NOTES")@ - lang=`echo $r | sed -n 's/.*locale="\(\w*\)".*/\1/p'` - if [ -n "$lang" ];then - echo $r | sed "s/@localization.*@/${TOCNOTEMAP[$lang]}/" >> $TOC.$REPLACING_SURFIX - else - echo ${r/@project-version@/"$VER.DIST"} >> $TOC.$REPLACING_SURFIX - fi -: - -done< <(cat $TOC) - -echo "$TOC.$REPLACING_SURFIX done"