Changeset View
Changeset View
Standalone View
Standalone View
trunk/l10n-kf5/scripts/update_translations
Context not available. | |||||
131 | extractattr=$kdesdkscriptsdir/extractattr | 131 | extractattr=$kdesdkscriptsdir/extractattr | ||
---|---|---|---|---|---|
132 | extractgrantlee=$kdesdkscriptsdir/grantlee_strings_extractor.py | 132 | extractgrantlee=$kdesdkscriptsdir/grantlee_strings_extractor.py | ||
133 | preparetips=$kconfigwidgetsdir/src/preparetips5 | 133 | preparetips=$kconfigwidgetsdir/src/preparetips5 | ||
134 | repackpot=$BASEDIR/$transmod/scripts/repack-pot.pl | 134 | repackpot=$SCRIPTY_DIR/repack-pot.pl | ||
135 | 135 | | |||
136 | for logmod in $releases; do | 136 | for logmod in $releases; do | ||
137 | 137 | | |||
Context not available. | |||||
171 | REPACKPOT="perl $repackpot" \ | 171 | REPACKPOT="perl $repackpot" \ | ||
172 | PACKAGE=$repo_name \ | 172 | PACKAGE=$repo_name \ | ||
173 | IGNORE=".$vcs" \ | 173 | IGNORE=".$vcs" \ | ||
174 | bash $BASEDIR/$transmod/scripts/extract-messages.sh) | 174 | bash $SCRIPTY_DIR/extract-messages.sh) | ||
175 | rm -f messages.log | 175 | rm -f messages.log | ||
176 | 176 | | |||
177 | ( XGETTEXT=`which xgettext` \ | 177 | ( XGETTEXT=`which xgettext` \ | ||
178 | SUBMODULE=$templatename \ | 178 | SUBMODULE=$templatename \ | ||
179 | FILLXMLFROMPO="python $BASEDIR/$transmod/scripts/fillxmlfrompo.py" \ | 179 | FILLXMLFROMPO="python $SCRIPTY_DIR/fillxmlfrompo.py" \ | ||
180 | L10NDIR=$BASEDIR/$transmod \ | 180 | L10NDIR=$BASEDIR/$transmod \ | ||
181 | bash $BASEDIR/$transmod/scripts/extract-xml.sh) | 181 | bash $SCRIPTY_DIR/extract-xml.sh) | ||
182 | 182 | | |||
183 | ( SUBMODULE=$templatename \ | 183 | ( SUBMODULE=$templatename \ | ||
184 | ASMETAINFOITS=$BASEDIR/$transmod/scripts/as-metainfo.its \ | 184 | ASMETAINFOITS=$SCRIPTY_DIR/as-metainfo.its \ | ||
185 | L10NDIR=$BASEDIR/$transmod \ | 185 | L10NDIR=$BASEDIR/$transmod \ | ||
186 | bash $BASEDIR/$transmod/scripts/extract_metainfo.sh) | 186 | bash $SCRIPTY_DIR/extract_metainfo.sh) | ||
187 | 187 | | |||
188 | ( XGETTEXT=`which xgettext` \ | 188 | ( XGETTEXT=`which xgettext` \ | ||
189 | MSGCAT=`which msgcat` \ | 189 | MSGCAT=`which msgcat` \ | ||
Context not available. | |||||
197 | BASEDIR=$BASEDIR \ | 197 | BASEDIR=$BASEDIR \ | ||
198 | transmod=$transmod \ | 198 | transmod=$transmod \ | ||
199 | templatename=$templatename \ | 199 | templatename=$templatename \ | ||
200 | bash $BASEDIR/$transmod/scripts/process-static-messages.sh) | 200 | bash $SCRIPTY_DIR/process-static-messages.sh) | ||
201 | 201 | | |||
202 | rm -f messages.log | 202 | rm -f messages.log | ||
203 | 203 | | |||
Context not available. | |||||
362 | rm -f templatenames.tmp | 362 | rm -f templatenames.tmp | ||
363 | 363 | | |||
364 | # Create the all_files_* files | 364 | # Create the all_files_* files | ||
365 | bash scripts/findfiles `pwd`/all_files | 365 | bash $SCRIPTY_DIR/findfiles `pwd`/all_files | ||
366 | 366 | | |||
367 | echo "creating *._desktop_.pot files" | 367 | echo "creating *._desktop_.pot files" | ||
368 | test -z "$TIMING1" || date | 368 | test -z "$TIMING1" || date | ||
369 | bash scripts/create_desktop_files.sh | 369 | bash $SCRIPTY_DIR/create_desktop_files.sh | ||
370 | 370 | | |||
371 | echo "commiting *._desktop_.pot files" | 371 | echo "commiting *._desktop_.pot files" | ||
372 | test -z "$TIMING1" || date | 372 | test -z "$TIMING1" || date | ||
Context not available. | |||||
390 | echo "creating *._json_.pot files" | 390 | echo "creating *._json_.pot files" | ||
391 | test -z "$TIMING1" || date | 391 | test -z "$TIMING1" || date | ||
392 | ( L10NDIR=$BASEDIR/$transmod \ | 392 | ( L10NDIR=$BASEDIR/$transmod \ | ||
393 | bash $BASEDIR/$transmod/scripts/handle_json_files.sh) | 393 | bash $SCRIPTY_DIR/handle_json_files.sh) | ||
394 | echo "commiting *._json_.pot files" | 394 | echo "commiting *._json_.pot files" | ||
395 | test -z "$TIMING1" || date | 395 | test -z "$TIMING1" || date | ||
396 | if cd templates/messages; then | 396 | if cd templates/messages; then | ||
Context not available. | |||||
425 | [ ! -d $KDOCTOOLS_DATA_DIR ] && mkdir -p $KDOCTOOLS_DATA_DIR | 425 | [ ! -d $KDOCTOOLS_DATA_DIR ] && mkdir -p $KDOCTOOLS_DATA_DIR | ||
426 | ln -s $kdoctoolsdir/src/customization $KDOCTOOLS_DATA_DIR | 426 | ln -s $kdoctoolsdir/src/customization $KDOCTOOLS_DATA_DIR | ||
427 | export XDG_DATA_DIRS=$TMP_XDG_DIR:$XDG_DATA_DIRS | 427 | export XDG_DATA_DIRS=$TMP_XDG_DIR:$XDG_DATA_DIRS | ||
428 | bash ./scripts/createdoctemplates.sh --commit --check --autosvnadd | 428 | bash $SCRIPTY_DIR/createdoctemplates.sh --commit --check --autosvnadd | ||
429 | export XDG_DATA_DIRS=$OLD_XDG_DATA_DIRS | 429 | export XDG_DATA_DIRS=$OLD_XDG_DATA_DIRS | ||
430 | rm -f $kdoctoolsdir/src/customization/dtd/kdedbx45.dtd \ | 430 | rm -f $kdoctoolsdir/src/customization/dtd/kdedbx45.dtd \ | ||
431 | $kdoctoolsdir/src/customization/kde-include-common.xsl \ | 431 | $kdoctoolsdir/src/customization/kde-include-common.xsl \ | ||
Context not available. | |||||
450 | echo | 450 | echo | ||
451 | echo "%% TRANSLATOR START $transmod" | 451 | echo "%% TRANSLATOR START $transmod" | ||
452 | echo | 452 | echo | ||
453 | bash scripts/merge_all.sh | 453 | bash $SCRIPTY_DIR/merge_all.sh | ||
454 | echo | 454 | echo | ||
455 | echo "%% TRANSLATOR END $transmod" | 455 | echo "%% TRANSLATOR END $transmod" | ||
456 | echo | 456 | echo | ||
Context not available. | |||||
517 | if cd $transmod; then | 517 | if cd $transmod; then | ||
518 | echo "applying desktop file translations" | 518 | echo "applying desktop file translations" | ||
519 | test -z "$TIMING1" || date | 519 | test -z "$TIMING1" || date | ||
520 | bash scripts/merge_desktop_files.sh | 520 | bash $SCRIPTY_DIR/merge_desktop_files.sh | ||
521 | cd $BASEDIR | 521 | cd $BASEDIR | ||
522 | fi | 522 | fi | ||
523 | echo "commiting desktop files" | 523 | echo "commiting desktop files" | ||
Context not available. | |||||
578 | echo "%% Updating x-test end" | 578 | echo "%% Updating x-test end" | ||
579 | 579 | | |||
580 | echo "%% Finding po without pot begin" | 580 | echo "%% Finding po without pot begin" | ||
581 | bash ./scripts/find_po_without_pot.sh --silent | 581 | bash $SCRIPTY_DIR/find_po_without_pot.sh --silent | ||
582 | echo "%% Finding po without pot end" | 582 | echo "%% Finding po without pot end" | ||
583 | 583 | | |||
584 | echo "%% Checking language docs are valid begin" | 584 | echo "%% Checking language docs are valid begin" | ||
585 | kdoctoolsdir=$kdoctoolsdir bash ./scripts/checkdocs.sh --optimized | 585 | kdoctoolsdir=$kdoctoolsdir bash $SCRIPTY_DIR/checkdocs.sh --optimized | ||
586 | echo "%% Checking language docs are valid end" | 586 | echo "%% Checking language docs are valid end" | ||
587 | 587 | | |||
588 | echo "%% Generating i18n for www begin" | 588 | echo "%% Generating i18n for www begin" | ||
Context not available. | |||||
605 | for subdir in `ls $webi18ndir`; do | 605 | for subdir in `ls $webi18ndir`; do | ||
606 | file=$BASEDIR/$transmod/$subdir/messages/www/$web"_www.po" | 606 | file=$BASEDIR/$transmod/$subdir/messages/www/$web"_www.po" | ||
607 | if [ -e $file ]; then | 607 | if [ -e $file ]; then | ||
608 | PYTHONPATH=$POLOGYDIR python $BASEDIR/$transmod/scripts/po2phparray.py $file $webi18ndir/$subdir/$web.inc | 608 | PYTHONPATH=$POLOGYDIR python $SCRIPTY_DIR/po2phparray.py $file $webi18ndir/$subdir/$web.inc | ||
609 | git add $webi18ndir/$subdir/$web.inc | 609 | git add $webi18ndir/$subdir/$web.inc | ||
610 | else | 610 | else | ||
611 | echo "$subdir in $web exists but $file does not" | 611 | echo "$subdir in $web exists but $file does not" | ||
Context not available. | |||||
621 | for subdir in `ls $webi18ndir`; do | 621 | for subdir in `ls $webi18ndir`; do | ||
622 | file=$BASEDIR/$transmod/$subdir/messages/www/$web"_www.po" | 622 | file=$BASEDIR/$transmod/$subdir/messages/www/$web"_www.po" | ||
623 | if [ -e $file ]; then | 623 | if [ -e $file ]; then | ||
624 | PYTHONPATH=$POLOGYDIR python $BASEDIR/$transmod/scripts/po2phparray.py $file $webi18ndir/$subdir/$web.inc | 624 | PYTHONPATH=$POLOGYDIR python $SCRIPTY_DIR/po2phparray.py $file $webi18ndir/$subdir/$web.inc | ||
625 | else | 625 | else | ||
626 | echo "$subdir in $web exists but $file does not" | 626 | echo "$subdir in $web exists but $file does not" | ||
627 | fi | 627 | fi | ||
Context not available. | |||||
633 | 633 | | |||
634 | echo "%% Generating announcements/release_data.php begin" | 634 | echo "%% Generating announcements/release_data.php begin" | ||
635 | webdir=$BASEDIR/`get_path www-www` | 635 | webdir=$BASEDIR/`get_path www-www` | ||
636 | python ./scripts/generate_release_data.py -a $webdir/announcements/ -t . -s | 636 | python $SCRIPTY_DIR/generate_release_data.py -a $webdir/announcements/ -t . -s | ||
637 | svn commit $SVNQUIETFLAG $webdir/announcements/ -m "SVN_SILENT regenerate from .po" | 637 | svn commit $SVNQUIETFLAG $webdir/announcements/ -m "SVN_SILENT regenerate from .po" | ||
638 | echo "%% Generating announcements/release_data.php end" | 638 | echo "%% Generating announcements/release_data.php end" | ||
639 | 639 | | |||
Context not available. | |||||
644 | test -z "$TIMING1" || date | 644 | test -z "$TIMING1" || date | ||
645 | } | 645 | } | ||
646 | 646 | | |||
647 | OLD_PWD=$PWD | ||||
648 | cd $(dirname $0) | ||||
649 | SCRIPTY_DIR=$PWD | ||||
650 | cd $OLD_PWD | ||||
651 | | ||||
647 | # releases: paths of modules - kdelibs has to be first | 652 | # releases: paths of modules - kdelibs has to be first | ||
648 | # transmod: path of the corresponding l10n module | 653 | # transmod: path of the corresponding l10n module | ||
649 | 654 | | |||
650 | # test only | 655 | # test only | ||
651 | dir=`dirname $0` | 656 | . $SCRIPTY_DIR/get_paths | ||
652 | . $dir/get_paths | | |||
653 | transmod=`get_path l10n` | 657 | transmod=`get_path l10n` | ||
654 | releases=`list_modules $dir` | 658 | releases=`list_modules $SCRIPTY_DIR` | ||
655 | kconfigwidgetsdir=$BASEDIR/`get_path frameworks_kconfigwidgets` | 659 | kconfigwidgetsdir=$BASEDIR/`get_path frameworks_kconfigwidgets` | ||
656 | kdoctoolsdir=$BASEDIR/`get_path frameworks_kdoctools` | 660 | kdoctoolsdir=$BASEDIR/`get_path frameworks_kdoctools` | ||
657 | kdesdkscriptsdir=$BASEDIR/`get_path kdesdk_kde-dev-scripts` | 661 | kdesdkscriptsdir=$BASEDIR/`get_path kdesdk_kde-dev-scripts` | ||
Context not available. |