Commit 085110f7 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

use one kate.po(t) for lib + apps

parent 2aaffa59
Pipeline #176720 passed with stage
in 7 minutes and 54 seconds
#! /usr/bin/env bash
# we create one kate.pot for the shared lib + the applications, the addons have extra ones
$EXTRACTRC `find lib apps -name \*.rc -o -name \*.ui` >> lib/rc.cpp || exit 11
$XGETTEXT `find lib apps -name "*.cpp" -o -name "*.h"` -o $podir/kate.pot
......@@ -10,6 +10,9 @@ add_executable(kate-bin
SingleApplication/singleapplication_p.cpp)
target_link_libraries(kate-bin PRIVATE kateprivate)
# ensure right translations domain, we use one kate.po(t) for lib + apps
target_compile_definitions(kate-bin PRIVATE TRANSLATION_DOMAIN="kate")
# ensure consistent SingleApplication usage
target_compile_definitions(kate-bin PRIVATE -DQAPPLICATION_CLASS=QApplication)
......
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui` >> rc.cpp || exit 11
$XGETTEXT `find . -name "*.cpp" -o -name "*.h"` -o $podir/kate.pot
......@@ -100,11 +100,6 @@ int main(int argc, char **argv)
SingleApplication app(argc, argv, true);
app.setApplicationName(QStringLiteral("kate"));
/**
* Connect application with translation catalogs
*/
KLocalizedString::setApplicationDomain("kate");
/**
* construct about data for Kate
*/
......
......@@ -2,6 +2,9 @@
add_executable(kwrite main.cpp data/kwrite.qrc)
target_link_libraries(kwrite PRIVATE kateprivate)
# ensure right translations domain, we use one kate.po(t) for lib + apps
target_compile_definitions(kwrite PRIVATE TRANSLATION_DOMAIN="kate")
# application icon, in all sizes needed to have e.g. nice Windows icons, too
set(ICONS_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/icons)
set(ICON_FILES
......
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui` >> rc.cpp || exit 11
$XGETTEXT `find . -name "*.cpp" -o -name "*.h"` -o $podir/kwrite.pot
......@@ -74,11 +74,6 @@ extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
QApplication app(argc, argv);
app.setApplicationName(QStringLiteral("kwrite"));
/**
* Connect application with translation catalogs
*/
KLocalizedString::setApplicationDomain("kwrite");
/**
* then use i18n and co
*/
......
......@@ -3,8 +3,8 @@ add_library(kateprivate SHARED "")
set_target_properties(kateprivate PROPERTIES VERSION ${RELEASE_SERVICE_VERSION})
install(TARGETS kateprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
# ensure right translations domain
target_compile_definitions(kateprivate PRIVATE TRANSLATION_DOMAIN="kateprivate")
# ensure right translations domain, we use one kate.po(t) for lib + apps
target_compile_definitions(kateprivate PRIVATE TRANSLATION_DOMAIN="kate")
configure_file(config.h.in config.h)
......
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui` >> rc.cpp || exit 11
$XGETTEXT `find . -name "*.cpp" -o -name "*.h"` -o $podir/kateprivate.pot
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment