The R Project SVN R-packages

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1048 urbaneks 1
#!/bin/sh
2
#
3
# Created 2005/02/08 by Simon Urbanek
4
 
5
# list of localizations we want to generate from English
6
LANGUAGES=`cat LANGUAGES`
7
 
8
# this is an exception - we actually merge into the english master, too
9
LANGUAGES="$LANGUAGES English"
10
 
11
# remove existing strings (if present)
12
rm -f Localizable.strings
13
 
14
# find all sources and run filterNLS on that list
15
find -X . -name \*.m 2> /dev/null | awk '{print substr($1,3)}' | xargs ./filterNLS
16
 
17
# now we have new Localized.strings in the current directory
18
if [ ! -e Localizable.strings ]; then
19
	echo "*** ERROR: Localizable.strings were NOT generated"
20
	exit 1
21
fi
22
 
23
# we need to merge that with the available languages
24
for LANG in $LANGUAGES; do
25
	if [ -e "$LANG.lproj" ]; then
26
		if [ -e "$LANG.lproj/Localizable.strings" ]; then
27
			echo "Updating $LANG ..."
28
			./mergeLS Localizable.strings "$LANG.lproj/Localizable.strings"
29
		else
30
			echo "-- $LANG has no localizable strings, creating them"
31
			cp Localizable.strings "$LANG.lproj/Localizable.strings"
32
		fi
33
	else
34
		echo "** $LANG is in the language list, but there is no lproj dorectory for it!"
35
	fi
36
done
37
 
38
rm Localizable.strings
39
echo "  Done."