mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
[PyQt6] make translations work with both Qt 6 and 5
This commit is contained in:
parent
5b4449602b
commit
db30d294cb
@ -27,12 +27,15 @@ set(TS_FILES qgis_ar.ts qgis_az.ts qgis_bg.ts qgis_bs.ts qgis_ca.ts qgis_cs.ts q
|
||||
|
||||
ADD_TRANSLATION_FILES (QM_FILES ${TS_FILES})
|
||||
|
||||
# TODO QGIS 4.0: remove configure and call directly script
|
||||
configure_file(${CMAKE_SOURCE_DIR}/scripts/ts2appinfo.py.in ${CMAKE_BINARY_DIR}/ts2appinfo.py)
|
||||
|
||||
if (UNIX AND NOT APPLE AND PYQT_FOUND)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
COMMAND ${Python_EXECUTABLE}
|
||||
ARGS ${CMAKE_SOURCE_DIR}/scripts/ts2appinfo.py "${CMAKE_BINARY_DIR}"
|
||||
ARGS ${CMAKE_BINARY_DIR}/ts2appinfo.py "${CMAKE_BINARY_DIR}"
|
||||
COMMENT "Updating appinfo files..."
|
||||
DEPENDS ${QM_FILES} ${CMAKE_SOURCE_DIR}/linux/org.qgis.qgis.desktop.in ${CMAKE_SOURCE_DIR}/linux/org.qgis.qgis.appdata.xml.in
|
||||
)
|
||||
|
@ -22,7 +22,7 @@ import sys
|
||||
import os
|
||||
from glob import glob
|
||||
from xml.etree import ElementTree as et
|
||||
from PyQt5.QtCore import QCoreApplication, QTranslator
|
||||
from PyQt@PYQT_VERSION_MAJOR@.QtCore import QCoreApplication, QTranslator
|
||||
|
||||
strings = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user