2 # Script to add a new language to khangman
5 if test $# = 0 ||
test $# -gt 1 ||
test $1 = "--help" ; then
6 echo "usage: add_language <language_code>"
9 echo "Please send your files tarred and zipped to annemarie.mahfouf@free.fr and note anything specific to your language such as special characters. Please add all special characters in a text file. Thanks a lot.
11 The script will carry on, please just do not commit the files. Please NEVER commit in a BRANCH."
13 # Check for valid language code
14 all_langs
=$KDEDIR/share
/locale
/all_languages
15 if test -e $all_langs ; then
16 grep -q "^\[$1\]$" $all_langs
17 if test $?
!= 0 ; then
18 echo "add_language: error: \"$1\" is not a valid language code"
29 # Check if directory already exists
30 if test -e $lang ; then
31 echo "add_language: error: \"$1\" already exists"
35 # Create the directory and copy files to it
37 cp $dir/en
/*.txt
$lang
38 sed -e "s/\/en/\/$code/" $en/Makefile.am
> $lang/Makefile.am
39 touch $dir/Makefile.am
41 # Tell user what to do
42 echo "The language $code has been successfully added!"
44 echo "Please edit the following files and translate the english words and english hints:"
47 echo "The files now use the kvtml format."
48 echo "See http://edu.kde.org/khangman/add_language.php for more information."
49 echo "Thanks a lot for your contribution!"