changeset 32553:5dea9272ad7f

maint: merge stable to default
author John W. Eaton <jwe@octave.org>
date Fri, 08 Dec 2023 09:14:35 -0500
parents 3d9e866f9ae2 (current diff) 5ce810c981ae (diff)
children 54be25f38029 d1b5f4055c83
files
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/languages/build_ts/update_ts_files	Thu Nov 30 23:07:51 2023 +0100
+++ b/libgui/languages/build_ts/update_ts_files	Fri Dec 08 09:14:35 2023 -0500
@@ -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