Mercurial > octave
changeset 32550:5ce810c981ae stable
update_ts_files: Prepare script to be configurable between qt5 and qt6.
* update_ts_files: Add variable QT_VERSION which is initially hardcoded to
"qt5", but eventually should come from the local build environment.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 07 Dec 2023 18:38:46 -0800 |
parents | f561b6a31e02 |
children | 5dea9272ad7f d6fdce5c7978 |
files | libgui/languages/build_ts/update_ts_files |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/languages/build_ts/update_ts_files Wed Dec 06 15:02:58 2023 -0500 +++ b/libgui/languages/build_ts/update_ts_files Thu Dec 07 18:38:46 2023 -0800 @@ -13,7 +13,10 @@ SEARCH_PATH_QSCI="build_ts/octave-qsci" # The directory with translations provided by Qt and QScintilla -QT_LANG_DIR=/usr/share/qt6/translations +# FIXME: This constant should not be hardcoded. Probably best if +# it could be picked up from the configuration such as HAVE_QTX in config.h. +QT_VERSION="qt5" +QT_LANG_DIR=/usr/share/$QT_VERSION/translations # Now update all ts files for file in $(ls -b1 *.ts) @@ -30,7 +33,7 @@ # 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 # the locally collected source files. - if [ $xx_yy != "en_US" ]; then # No trnaslation required for en_US + if [ $xx_yy != "en_US" ]; then # No translation required for en_US # Look for Qt translations 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 @@ -55,7 +58,7 @@ ANS=${ANS:-n} if [ $ANS = "y" ]; then echo - lupdate -qt5 -no-obsolete -locations relative $SEARCH_PATH -ts $file + lupdate -$QT_VERSION -no-obsolete -locations relative $SEARCH_PATH -ts $file fi done