1
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:
Luigi Toscano 2018-02-24 15:19:56 +01:00
parent a89a9a8ddc
commit c36a113219
27 changed files with 53 additions and 1 deletions

View File

@ -19,6 +19,7 @@ include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
include(ECMPoQmTools)
# Output dirs (like ECM 5.38 does)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")

2
src/Messages.sh Normal file
View 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

View File

@ -12,6 +12,7 @@ endif()
if (${CMAKE_SYSTEM} MATCHES "OS2")
set(SRCS ${SRCS} appicon_os2.rc)
endif()
ecm_create_qm_loader(SRCS falkon_qt)
add_executable(falkon ${SRCS})
target_link_libraries(falkon FalkonPrivate)
@ -32,8 +33,8 @@ endif()
if (UNIX AND NOT APPLE)
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)
ecm_install_po_files_as_qm(${CMAKE_SOURCE_DIR}/po)
install(PROGRAMS ../../linux/applications/org.kde.falkon.desktop DESTINATION ${KDE_INSTALL_APPDIR})

View File

@ -5,6 +5,8 @@ set( AutoScroll_SRCS
autoscrollsettings.cpp
)
ecm_create_qm_loader( AutoScroll_SRCS falkon_autoscroll_qt )
set( AutoScroll_UIS
autoscrollsettings.ui
)

View 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

View File

@ -4,6 +4,8 @@ set( FlashCookieManager_SRCS
fcm_notification.cpp
)
ecm_create_qm_loader( FlashCookieManager_SRCS falkon_flashcookiemanager_qt )
set( FlashCookieManager_UIS
fcm_dialog.ui
fcm_notification.ui

View 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

View File

@ -5,6 +5,8 @@ set( GnomeKeyringPasswords_SRCS
gnomekeyringpasswordbackend.cpp
)
ecm_create_qm_loader( GnomeKeyringPasswords_SRCS falkon_gnomekeyringpasswords_qt )
set( GnomeKeyringPasswords_RSCS
gnomekeyringpasswords.qrc
)

View 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

View File

@ -15,6 +15,8 @@ set( GreaseMonkey_SRCS
settings/gm_settingslistwidget.cpp
)
ecm_create_qm_loader( GreaseMonkey_SRCS falkon_greasemonkey_qt )
set( GreaseMonkey_UIS
gm_addscriptdialog.ui
gm_notification.ui

View 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

View File

@ -4,6 +4,8 @@ set( ImageFinder_SRCS
imagefindersettings.cpp
)
ecm_create_qm_loader( ImageFinder_SRCS falkon_imagefinder_qt )
set( ImageFinder_UIS
imagefindersettings.ui
)

View 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

View File

@ -3,6 +3,8 @@ set( KWalletPasswords_SRCS
kwalletpasswordbackend.cpp
)
ecm_create_qm_loader( KWalletPasswords_SRCS falkon_kwalletpasswords_qt )
set( KWalletPasswords_RSCS
kwalletpasswords.qrc
)

View 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

View File

@ -14,6 +14,8 @@ set( MouseGestures_SRCS
mousegesturessettingsdialog.cpp
)
ecm_create_qm_loader( MouseGestures_SRCS falkon_mousegestures_qt )
set( MouseGestures_UIS
mousegesturessettingsdialog.ui
)

View 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

View File

@ -4,6 +4,8 @@ set( PIM_SRCS
PIM_settings.cpp
)
ecm_create_qm_loader( PIM_SRCS falkon_pim_qt )
set( PIM_UIS
PIM_settings.ui
)

View 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

View File

@ -13,6 +13,8 @@ set( StatusBarIcons_SRCS
sbi_zoomwidget.cpp
)
ecm_create_qm_loader( StatusBarIcons_SRCS falkon_statusbaricons_qt )
set( StatusBarIcons_UIS
sbi_proxywidget.ui
sbi_networkicondialog.ui

View 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

View File

@ -7,6 +7,8 @@ set( TabManager_SRCS
tldextractor/tldextractor.cpp
)
ecm_create_qm_loader( TabManager_SRCS falkon_tabmanager_qt )
set( TabManager_UIS
tabmanagerwidget.ui
tabmanagersettings.ui

View 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

View File

@ -9,6 +9,8 @@ set( TestPlugin_RSCS
)
qt5_add_resources(RSCS ${TestPlugin_RSCS})
ecm_create_qm_loader( TestPlugin_SRCS falkon_testplugin_qt )
add_library(TestPlugin MODULE ${TestPlugin_SRCS} ${RSCS})
install(TARGETS TestPlugin DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(TestPlugin FalkonPrivate)

View 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

View File

@ -12,6 +12,8 @@ set( VerticalTabs_SRCS
verticaltabsschemehandler.cpp
)
ecm_create_qm_loader( VerticalTabs_SRCS falkon_verticaltabs_qt )
set( VerticalTabs_UIS
verticaltabssettings.ui
)

View 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