Kagera Web Interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prepdicts.sh 536B

12345678910111213
  1. #!/bin/bash
  2. prepare() {
  3. FILENAME=$(basename ${1})
  4. perl -lne 'print for /(<%@ .*? %>)/g;' ${1} | uniq | awk '{sub($1,"",$0); sub(/^ */,"msgid \"",$0); sub($NF"$","",$0); sub(/ *$/,"\"\nmsgstr \"\"\n",$0); print}' | head -n-1 > ./files/usr/lib/kagera/langs/TEMPLATE/${FILENAME%%.*}.dic
  5. }
  6. mkdir -p ./files/usr/lib/kagera/langs/TEMPLATE
  7. while read FILE; do
  8. prepare ${FILE}
  9. done < <(find ./files/ -type f -name \*.cbsi -o -name \*.sh)
  10. mv ./files/usr/lib/kagera/langs/TEMPLATE/index.dic ./files/usr/lib/kagera/langs/TEMPLATE/common.dic