mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
gettext translations: extract them and use ECM to load them
Summary: Extract the strings: one main catalog and a catalog for each plugin. Also use the ECM macro to install the translations. Ref T6858 Reviewers: #falkon, drosca Reviewed By: #falkon, drosca Subscribers: drosca Tags: #falkon Maniphest Tasks: T6858 Differential Revision: https://phabricator.kde.org/D8049
This commit is contained in:
parent
a89a9a8ddc
commit
c36a113219
|
@ -19,6 +19,7 @@ include(ECMInstallIcons)
|
||||||
include(ECMSetupVersion)
|
include(ECMSetupVersion)
|
||||||
include(ECMAddAppIcon)
|
include(ECMAddAppIcon)
|
||||||
include(ECMQtDeclareLoggingCategory)
|
include(ECMQtDeclareLoggingCategory)
|
||||||
|
include(ECMPoQmTools)
|
||||||
|
|
||||||
# Output dirs (like ECM 5.38 does)
|
# Output dirs (like ECM 5.38 does)
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||||
|
|
2
src/Messages.sh
Normal file
2
src/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui' | grep -v '/plugins/'` -o $podir/falkon_qt.pot
|
|
@ -12,6 +12,7 @@ endif()
|
||||||
if (${CMAKE_SYSTEM} MATCHES "OS2")
|
if (${CMAKE_SYSTEM} MATCHES "OS2")
|
||||||
set(SRCS ${SRCS} appicon_os2.rc)
|
set(SRCS ${SRCS} appicon_os2.rc)
|
||||||
endif()
|
endif()
|
||||||
|
ecm_create_qm_loader(SRCS falkon_qt)
|
||||||
add_executable(falkon ${SRCS})
|
add_executable(falkon ${SRCS})
|
||||||
|
|
||||||
target_link_libraries(falkon FalkonPrivate)
|
target_link_libraries(falkon FalkonPrivate)
|
||||||
|
@ -32,8 +33,8 @@ endif()
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
install(TARGETS falkon ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS falkon ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
#install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/locale DESTINATION ${CMAKE_INSTALL_DATAROOTDIR})
|
|
||||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/falkon)
|
install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/falkon)
|
||||||
|
ecm_install_po_files_as_qm(${CMAKE_SOURCE_DIR}/po)
|
||||||
|
|
||||||
install(PROGRAMS ../../linux/applications/org.kde.falkon.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
install(PROGRAMS ../../linux/applications/org.kde.falkon.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ set( AutoScroll_SRCS
|
||||||
autoscrollsettings.cpp
|
autoscrollsettings.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( AutoScroll_SRCS falkon_autoscroll_qt )
|
||||||
|
|
||||||
set( AutoScroll_UIS
|
set( AutoScroll_UIS
|
||||||
autoscrollsettings.ui
|
autoscrollsettings.ui
|
||||||
)
|
)
|
||||||
|
|
2
src/plugins/AutoScroll/Messages.sh
Normal file
2
src/plugins/AutoScroll/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_autoscroll_qt.pot
|
|
@ -4,6 +4,8 @@ set( FlashCookieManager_SRCS
|
||||||
fcm_notification.cpp
|
fcm_notification.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( FlashCookieManager_SRCS falkon_flashcookiemanager_qt )
|
||||||
|
|
||||||
set( FlashCookieManager_UIS
|
set( FlashCookieManager_UIS
|
||||||
fcm_dialog.ui
|
fcm_dialog.ui
|
||||||
fcm_notification.ui
|
fcm_notification.ui
|
||||||
|
|
2
src/plugins/FlashCookieManager/Messages.sh
Normal file
2
src/plugins/FlashCookieManager/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_flashcookiemanager_qt.pot
|
|
@ -5,6 +5,8 @@ set( GnomeKeyringPasswords_SRCS
|
||||||
gnomekeyringpasswordbackend.cpp
|
gnomekeyringpasswordbackend.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( GnomeKeyringPasswords_SRCS falkon_gnomekeyringpasswords_qt )
|
||||||
|
|
||||||
set( GnomeKeyringPasswords_RSCS
|
set( GnomeKeyringPasswords_RSCS
|
||||||
gnomekeyringpasswords.qrc
|
gnomekeyringpasswords.qrc
|
||||||
)
|
)
|
||||||
|
|
2
src/plugins/GnomeKeyringPasswords/Messages.sh
Normal file
2
src/plugins/GnomeKeyringPasswords/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_gnomekeyringpasswords_qt.pot
|
|
@ -15,6 +15,8 @@ set( GreaseMonkey_SRCS
|
||||||
settings/gm_settingslistwidget.cpp
|
settings/gm_settingslistwidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( GreaseMonkey_SRCS falkon_greasemonkey_qt )
|
||||||
|
|
||||||
set( GreaseMonkey_UIS
|
set( GreaseMonkey_UIS
|
||||||
gm_addscriptdialog.ui
|
gm_addscriptdialog.ui
|
||||||
gm_notification.ui
|
gm_notification.ui
|
||||||
|
|
2
src/plugins/GreaseMonkey/Messages.sh
Normal file
2
src/plugins/GreaseMonkey/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_greasemonkey_qt.pot
|
|
@ -4,6 +4,8 @@ set( ImageFinder_SRCS
|
||||||
imagefindersettings.cpp
|
imagefindersettings.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( ImageFinder_SRCS falkon_imagefinder_qt )
|
||||||
|
|
||||||
set( ImageFinder_UIS
|
set( ImageFinder_UIS
|
||||||
imagefindersettings.ui
|
imagefindersettings.ui
|
||||||
)
|
)
|
||||||
|
|
2
src/plugins/ImageFinder/Messages.sh
Normal file
2
src/plugins/ImageFinder/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_imagefinder_qt.pot
|
|
@ -3,6 +3,8 @@ set( KWalletPasswords_SRCS
|
||||||
kwalletpasswordbackend.cpp
|
kwalletpasswordbackend.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( KWalletPasswords_SRCS falkon_kwalletpasswords_qt )
|
||||||
|
|
||||||
set( KWalletPasswords_RSCS
|
set( KWalletPasswords_RSCS
|
||||||
kwalletpasswords.qrc
|
kwalletpasswords.qrc
|
||||||
)
|
)
|
||||||
|
|
2
src/plugins/KWalletPasswords/Messages.sh
Normal file
2
src/plugins/KWalletPasswords/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_kwalletpasswords_qt.pot
|
|
@ -14,6 +14,8 @@ set( MouseGestures_SRCS
|
||||||
mousegesturessettingsdialog.cpp
|
mousegesturessettingsdialog.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( MouseGestures_SRCS falkon_mousegestures_qt )
|
||||||
|
|
||||||
set( MouseGestures_UIS
|
set( MouseGestures_UIS
|
||||||
mousegesturessettingsdialog.ui
|
mousegesturessettingsdialog.ui
|
||||||
)
|
)
|
||||||
|
|
2
src/plugins/MouseGestures/Messages.sh
Normal file
2
src/plugins/MouseGestures/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_mousegestures_qt.pot
|
|
@ -4,6 +4,8 @@ set( PIM_SRCS
|
||||||
PIM_settings.cpp
|
PIM_settings.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( PIM_SRCS falkon_pim_qt )
|
||||||
|
|
||||||
set( PIM_UIS
|
set( PIM_UIS
|
||||||
PIM_settings.ui
|
PIM_settings.ui
|
||||||
)
|
)
|
||||||
|
|
2
src/plugins/PIM/Messages.sh
Normal file
2
src/plugins/PIM/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_pim_qt.pot
|
|
@ -13,6 +13,8 @@ set( StatusBarIcons_SRCS
|
||||||
sbi_zoomwidget.cpp
|
sbi_zoomwidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( StatusBarIcons_SRCS falkon_statusbaricons_qt )
|
||||||
|
|
||||||
set( StatusBarIcons_UIS
|
set( StatusBarIcons_UIS
|
||||||
sbi_proxywidget.ui
|
sbi_proxywidget.ui
|
||||||
sbi_networkicondialog.ui
|
sbi_networkicondialog.ui
|
||||||
|
|
2
src/plugins/StatusBarIcons/Messages.sh
Normal file
2
src/plugins/StatusBarIcons/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_statusbaricons_qt.pot
|
|
@ -7,6 +7,8 @@ set( TabManager_SRCS
|
||||||
tldextractor/tldextractor.cpp
|
tldextractor/tldextractor.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( TabManager_SRCS falkon_tabmanager_qt )
|
||||||
|
|
||||||
set( TabManager_UIS
|
set( TabManager_UIS
|
||||||
tabmanagerwidget.ui
|
tabmanagerwidget.ui
|
||||||
tabmanagersettings.ui
|
tabmanagersettings.ui
|
||||||
|
|
2
src/plugins/TabManager/Messages.sh
Normal file
2
src/plugins/TabManager/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_tabmanager_qt.pot
|
|
@ -9,6 +9,8 @@ set( TestPlugin_RSCS
|
||||||
)
|
)
|
||||||
qt5_add_resources(RSCS ${TestPlugin_RSCS})
|
qt5_add_resources(RSCS ${TestPlugin_RSCS})
|
||||||
|
|
||||||
|
ecm_create_qm_loader( TestPlugin_SRCS falkon_testplugin_qt )
|
||||||
|
|
||||||
add_library(TestPlugin MODULE ${TestPlugin_SRCS} ${RSCS})
|
add_library(TestPlugin MODULE ${TestPlugin_SRCS} ${RSCS})
|
||||||
install(TARGETS TestPlugin DESTINATION ${FALKON_INSTALL_PLUGINDIR})
|
install(TARGETS TestPlugin DESTINATION ${FALKON_INSTALL_PLUGINDIR})
|
||||||
target_link_libraries(TestPlugin FalkonPrivate)
|
target_link_libraries(TestPlugin FalkonPrivate)
|
||||||
|
|
2
src/plugins/TestPlugin/Messages.sh
Normal file
2
src/plugins/TestPlugin/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_testplugin_qt.pot
|
|
@ -12,6 +12,8 @@ set( VerticalTabs_SRCS
|
||||||
verticaltabsschemehandler.cpp
|
verticaltabsschemehandler.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_create_qm_loader( VerticalTabs_SRCS falkon_verticaltabs_qt )
|
||||||
|
|
||||||
set( VerticalTabs_UIS
|
set( VerticalTabs_UIS
|
||||||
verticaltabssettings.ui
|
verticaltabssettings.ui
|
||||||
)
|
)
|
||||||
|
|
2
src/plugins/VerticalTabs/Messages.sh
Normal file
2
src/plugins/VerticalTabs/Messages.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#! /bin/sh
|
||||||
|
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_verticaltabs_qt.pot
|
Loading…
Reference in New Issue
Block a user