Welcome to mirror list, hosted at ThFree Co, Russian Federation.

add_message.sh « lang - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 515578bec104214a9abc84773cc80c5fe2013d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# $Id$
#
# Shell script that adds a message to all message files (Lem9)
#
# Example:  add_message.sh '$strNewMessage' 'new message contents'
#

if [ $# -ne 2 ] ; then
    echo "usage: add_message.sh '\$strNewMessage' 'new message contents'"
    exit 1
fi

for file in *.inc.php
do
    echo $file " "
    grep -v '?>' ${file} > ${file}.new
    case $file in
        english*)
            echo "$1 = '"$2"';" >> ${file}.new
            ;;
        *)
            echo "$1 = '"$2"';  //to translate" >> ${file}.new
            ;;
    esac
    echo "?>" >> ${file}.new
    rm $file
    mv ${file}.new $file
done
./sort_lang.sh english*
echo " "
echo "Message added to all message files (including english)"