Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | reyssat | 1 | #! /bin/sh |
2 | # |
||
3 | # List language-dependent system files that need to be retranslated |
||
4 | # into language $1. |
||
5 | |||
6 | lang=$1 |
||
7 | if [ -z "$lang" ]; then |
||
8 | echo "This tool lists WIMS system files that are modified and might |
||
9 | need a retranslation to another language. |
||
10 | |||
11 | Usage: $0 [your-language] |
||
12 | |||
13 | The reference language is English. |
||
14 | |||
15 | WARNING. The list may be incomplete, as some global modifications may |
||
16 | touch all files independent of the language. |
||
17 | " |
||
18 | exit |
||
19 | fi |
||
20 | |||
21 | cd `dirname $0`/../public_html |
||
22 | wims_home=`pwd` |
||
23 | |||
24 | checks="html scripts modules/adm modules/home modules/help modules/template modules/classes" |
||
25 | |||
26 | files=`find $checks -type f -name \*.en |\ |
||
27 | grep -v scripts/authors/` |
||
28 | dirs=`find $checks -type d -name \*.en |\ |
||
29 | grep -v modules/adm/manage.en |\ |
||
30 | grep -v scripts/authors/ |\ |
||
31 | grep -v modules/help/wimsdoc.en` |
||
32 | dfiles=`find $dirs -type f -name \*.phtml` |
||
33 | |||
34 | echo " |
||
35 | WARNING. The list may be incomplete, as some global modifications may |
||
36 | touch all files independent of the language. So please check all phtml |
||
37 | files in a module if you see one file in that module shown in the list. |
||
38 | |||
39 | " >&2 |
||
40 | |||
41 | for f in $files |
||
42 | do |
||
43 | cf=`echo $f | sed 's/\.en$/.'$lang/` |
||
44 | if [ ! -f $cf ] || [ $f -nt $cf ]; then echo $cf; fi |
||
45 | done |
||
46 | |||
47 | for d in $dirs |
||
48 | do |
||
49 | dfiles=`find $d -type f -name \*.phtml` |
||
50 | for f in $dfiles |
||
51 | do |
||
52 | cf=`echo $f | sed "s!\.en/!.$lang/!"` |
||
53 | if [ ! -f $cf ] || [ $f -nt $cf ]; then echo $cf; fi |
||
54 | done |
||
55 | done |
||
56 |