Mercurial > octave
changeset 32539:cbdd37c5a223 stable
update_ts_files: more comprehensive output
* libgui/languages/update_ts_files: added more comprehensive output
of the script for updating the GUI's öanguage files
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Tue, 05 Dec 2023 20:06:21 +0100 |
parents | f3df7a95ff16 |
children | 06a541ee4f05 |
files | libgui/languages/build_ts/update_ts_files |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/languages/build_ts/update_ts_files Tue Dec 05 10:18:56 2023 -0800 +++ b/libgui/languages/build_ts/update_ts_files Tue Dec 05 20:06:21 2023 +0100 @@ -12,20 +12,20 @@ SEARCH_PATH_QT="build_ts/octave-qt" SEARCH_PATH_QSCI="build_ts/octave-qsci" -# Alwys add Qt search query widget since no translation is provided by Qt -SEARCH_PATH_COMMON="$SEARCH_PATH_COMMON $SEARCH_PATH_QT/qhelpsearchquerywidget.cpp" - # The directory with translations provided by Qt and QScintilla -QT_LANG_DIR=/usr/share/qt5/translations +QT_LANG_DIR=/usr/share/qt6/translations # Now update all ts files -for file in *.ts; do +for file in $(ls -b1 *.ts) +do xx=${file:0:2} xx_yy=${file:0:5} # Set the search path to the minimal one used for each ts file SEARCH_PATH=$SEARCH_PATH_COMMON + T_QT="YES" + T_QSCI="YES" # Look for translations provided by Qt and QScintilla and extend the search # path if no existing translations are found. In this case we have to scan @@ -35,22 +35,23 @@ if [ "`ls $QT_LANG_DIR | grep -i qt_$xx.qm | wc -l`" -eq 0 ] && [ "`ls $QT_LANG_DIR | grep -i qt_$xx_yy.qm | wc -l`" -eq 0 ]; then SEARCH_PATH="$SEARCH_PATH $SEARCH_PATH_QT" -echo "QT" + T_QT="NO" fi # Look for QScintilla translations if [ "`ls $QT_LANG_DIR | grep -i qscintilla_$xx.qm | wc -l`" -eq 0 ] && [ "`ls $QT_LANG_DIR | grep -i qscintilla_$xx_yy.qm | wc -l`" -eq 0 ]; then SEARCH_PATH="$SEARCH_PATH $SEARCH_PATH_QSCI" -echo "QSCI" + T_QSCI="NO" fi fi echo echo + echo "$xx_yy: Existing translations for Qt: $T_QT, QSci: $T_QSCI" # Do the update after user's confirmation - echo "$file => scan for strings in following paths" - echo " => $SEARCH_PATH" - read -p " => Update (y/[n])? " ANS; + echo " => scan for strings in following paths" + echo " => $SEARCH_PATH" + read -p " => Update (y/[n])? " ANS; ANS=${ANS:-n} if [ $ANS = "y" ]; then echo