diff --git a/xwords4/android/scripts/strings_check.sh b/xwords4/android/scripts/strings_check.sh index 574a110df..c0ef48078 100755 --- a/xwords4/android/scripts/strings_check.sh +++ b/xwords4/android/scripts/strings_check.sh @@ -15,7 +15,17 @@ usage() { list_ids() { XML_FILE=$1 - xmlstarlet sel -T -t -m "/resources/string" -v @name -o " " $XML_FILE + xmlstarlet sel -T -t -m "/resources/string" -v @name -n $XML_FILE +} + +list_pairs() { + XML_FILE=$1 + #xmlstarlet sel -t -m "//string" -v @name -o ':' -v . -n $XML_FILE | tr -d '\n' | sed 's, *, ,g' + for NAME in $(list_ids $XML_FILE); do + xmlstarlet sel -t -m "//string[@name='$NAME']" -v @name -o ':' -v . $XML_FILE \ + | tr -d '\n' | sed 's, *, ,g' + echo "" + done } while [ $# -gt 0 ]; do