mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
just copy it over from french_xlation branch -- screw history
This commit is contained in:
parent
b6cfdbbb37
commit
45bf34fdc1
1 changed files with 30 additions and 4 deletions
|
@ -4,12 +4,14 @@ set -u -e
|
||||||
|
|
||||||
declare -A ENG_IDS
|
declare -A ENG_IDS
|
||||||
LOCS=""
|
LOCS=""
|
||||||
|
LIST_ONLY=""
|
||||||
|
PAIRS_ONLY=""
|
||||||
SEARCH_SOURCE=1
|
SEARCH_SOURCE=1
|
||||||
|
|
||||||
ENG=~/dev/git/ANDROID_BRANCH/xwords4/android/XWords4/res/values/strings.xml
|
# ENG=~/dev/git/ANDROID_BRANCH/xwords4/android/XWords4/res/values/strings.xml
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $0 [--loc <path_to_strings.xml>]*" >&2
|
echo "usage: $0 (--loc <path_to_strings.xml>)+ [--list-only] [--pairs-only]" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +38,12 @@ while [ $# -gt 0 ]; do
|
||||||
LOCS="$LOCS $2"
|
LOCS="$LOCS $2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--list-only)
|
||||||
|
LIST_ONLY=1
|
||||||
|
;;
|
||||||
|
--pairs-only)
|
||||||
|
PAIRS_ONLY=1
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
@ -43,9 +51,27 @@ while [ $# -gt 0 ]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -n "$LOCS" ] || usage
|
||||||
|
|
||||||
|
if [ -n "$LIST_ONLY" ]; then
|
||||||
|
for LOC in $LOCS; do
|
||||||
|
list_ids $LOC
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$PAIRS_ONLY" ]; then
|
||||||
|
for LOC in $LOCS; do
|
||||||
|
list_pairs $LOC
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# echo "checking $ENG for ids not in any .java file"
|
# echo "checking $ENG for ids not in any .java file"
|
||||||
for ID in $(list_ids $ENG); do
|
for LOC in $LOCS; do
|
||||||
ENG_IDS[$ID]=1
|
for ID in $(list_ids $LOC); do
|
||||||
|
ENG_IDS[$ID]=1
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SEARCH_SOURCE" ]; then
|
if [ -n "$SEARCH_SOURCE" ]; then
|
||||||
|
|
Loading…
Reference in a new issue