=================================================================== RCS file: /cvs/web/transl.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -r1.3 -r1.4 --- web/transl.sh 2015/07/19 09:00:10 1.3 +++ web/transl.sh 2015/07/19 16:44:48 1.4 @@ -8,44 +8,42 @@ # timestamp now=`date` -cat index.xml | (rm index.xml; \ - sed -e "s/dateModified\">\([^\"]*\)$now index.xml) +(rm index.xml; sed -e "s/dateModified\">\([^\"]*\)$now index.xml) < index.xml cp index.xml index.html +descr_en=`grep name=\"description\" index.html | sed -e 's/^.*content=\"//' -e 's/\".*>//'` +keywd_en=`grep name=\"keywords\" index.html | sed -e 's/^.*content=\"//' -e 's/\".*>//'` + for iso639 in `ls -F ~/web/keywords/$@ | grep -v /` ; do if [ ! -e $iso639 ]; then mkdir $iso639; fi sintl -j ~/web/xlf/${iso639}.xlf index.html > ./${iso639}/index.html - descr_en=`cat ./${iso639}/index.html | grep name=\"description\" | \ - sed -e 's/^.*content=\"//' -e 's/\".*>//'` - keywd_en=`cat ./${iso639}/index.html | grep name=\"keywords\" | \ - sed -e 's/^.*content=\"//' -e 's/\".*>//'` descr_transl=`cat ~/web/description/$iso639` keywd_transl=`cat ~/web/keywords/$iso639` - cat ./${iso639}/index.html | (rm ./${iso639}/index.html; \ + (rm ./${iso639}/index.html; \ sed -e 2s/en/$iso639/ -e s/"\ its:translate=\"yes\""//g \ -e s/"$descr_en"/"$descr_transl"/g -e s/"$keywd_en"/"$keywd_transl"/g \ - > ./${iso639}/index.html) + > ./${iso639}/index.html) < ./${iso639}/index.html done # remove sintl tags -cat index.html | (rm index.html; \ - sed -e s/"its:translate=\"yes\""//g > index.html) +(rm index.html; \ + sed -e s/"its:translate=\"yes\""//g > index.html) < index.html #ja modifications -cat ./ja/index.html | (rm ./ja/index.html; \ - sed -e s/"http:\/\/hako.space\/publications\/"/"http:\/\/hako.space\/ja\/publications\/"/g > ./ja/index.html) +(rm ./ja/index.html; \ + sed -e s/"http:\/\/hako.space\/publications\/"/"http:\/\/hako.space\/ja\/publications\/"/g > ./ja/index.html) < ./ja/index.html -cat ./ja/index.html | (rm ./ja/index.html; \ - sed -e s/"http:\/\/hako.space\/talks\/"/"http:\/\/hako.space\/ja\/talks\/"/g > ./ja/index.html) +(rm ./ja/index.html; \ + sed -e s/"http:\/\/hako.space\/talks\/"/"http:\/\/hako.space\/ja\/talks\/"/g > ./ja/index.html) < ./ja/index.html -cat ./ja/index.html | (rm ./ja/index.html; \ - sed -e s/"http:\/\/hako.space\/CV\/"/"http:\/\/hako.space\/ja\/CV\/"/g > ./ja/index.html) +(rm ./ja/index.html; \ + sed -e s/"http:\/\/hako.space\/CV\/"/"http:\/\/hako.space\/ja\/CV\/"/g > ./ja/index.html) < ./ja/index.html -cat ./ja/index.html | (rm ./ja/index.html; \ - sed -e s/"http:\/\/hako.space\/course\/"/"http:\/\/hako.space\/ja\/course\/"/g > ./ja/index.html) +(rm ./ja/index.html; \ + sed -e s/"http:\/\/hako.space\/course\/"/"http:\/\/hako.space\/ja\/course\/"/g > ./ja/index.html) < ./ja/index.html -cat ./ja/index.html | (rm ./ja/index.html; \ - sed -e s/"http:\/\/hako.space\/about\/"/"http:\/\/hako.space\/ja\/about\/"/g > ./ja/index.html) +(rm ./ja/index.html; \ + sed -e s/"http:\/\/hako.space\/about\/"/"http:\/\/hako.space\/ja\/about\/"/g > ./ja/index.html) < ./ja/index.html exit 0