mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-07 00:03:52 -05:00
Merge pull request #55613 from troopa81/pyqt6_translation
[PyQt6] make translations work with both Qt 6 and 5
This commit is contained in:
commit
8677bc2f18
@ -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})
|
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)
|
if (UNIX AND NOT APPLE AND PYQT_FOUND)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml
|
OUTPUT ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
COMMAND ${Python_EXECUTABLE}
|
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..."
|
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
|
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
|
import os
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from xml.etree import ElementTree as et
|
from xml.etree import ElementTree as et
|
||||||
from PyQt5.QtCore import QCoreApplication, QTranslator
|
from PyQt@QT_VERSION_MAJOR@.QtCore import QCoreApplication, QTranslator
|
||||||
|
|
||||||
strings = {}
|
strings = {}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user