summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-21 15:45:26 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-21 15:45:26 -0400
commit9b78126289703b222a19dcd1fcc16bca66993c20 (patch)
tree79feedc76847f642138467cd807ba9374fa9b6ce /scripts
parentff7189971e6685118f41e3567cefae7c333202de (diff)
Add cli command to compare locales + cleanup translation files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/find-strings.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/scripts/find-strings.sh b/scripts/find-strings.sh
deleted file mode 100755
index 752a2f83..00000000
--- a/scripts/find-strings.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-REF_LANG=${1:-fr_FR}
-
-###
-APP_DIR=`dirname $0`/../app
-LANG_FILE=$APP_DIR/Locale/$REF_LANG/translations.php
-TMPFILE=`mktemp`
-
-# find all strings used with t() or e() and write them to a temp buffer
-find $APP_DIR -name '*.php' -print | xargs -n 1 cat | grep -oP -e "\b[et]\((\"\K.*?\"|\'\K.*?\') *[\)\,]" | sed -e "s/'[),]$//" -e 's/\\/\\\\/g' | sort | uniq > $TMPFILE
-
-echo "Missing strings from $REF_LANG: (if none printed, none missing)"
-while read LINE
-do
- grep -F "$LINE" $LANG_FILE > /dev/null
- if [[ $? -ne 0 ]]; then
- echo " '$LINE' => '',"
- fi
-done < $TMPFILE
-
-# delete the work file
-rm $TMPFILE