314.3. lokalize-26.08.2
Translation editor — Gettext PO and XLIFF files with translation memory, glossary and quality checks
26.08.2-1 · (GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL) AND (GPL-2.0-or-later WITH LicenseRef-Qt-Commercial-exception-1.0) AND GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause AND GFDL-1.2-or-later · 1.8 SBU · 3.6 MiB, 145 files · 44_apps, 256 of 422 · ports/core/i18n/lokalize
Homepage: https://apps.kde.org/lokalize/
Lokalize is KDE’s computer-aided translation tool: it edits Gettext PO and XLIFF files one entry at a time, suggests translations from a translation memory kept in SQLite and from a glossary, checks spelling through sonnet and runs quality checks, and manages a whole project’s files at once. Word stems for the memory’s fuzzy matching come from hunspell, which upstream requires.
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, ki18n, ktextwidgets, kio, kxmlgui, knotifications, kconfig, kcoreaddons, sonnet, kcrash, kiconthemes, kcolorscheme, kdbusaddons, kdoctools, hunspell, kitemviews, kconfigwidgets.
Required by (1): kde-gear-utilities.
Sources: lokalize-26.08.2.tar.xz (2.0 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install lokalize'
build.sh:
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-D BUILD_DOC=ON \
-D USE_DBUS=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
-D BUILD_DOC=ON— Build the handbook through kdoctools, which is then a required package. On by default upstream; named so the handbook cannot drop out.-D USE_DBUS=ON— The D-Bus interface that lets scripts and other programs open files and query the translation memory, with kdbusaddons. On by default on Linux; named so it stays on.-D KF_SKIP_PO_PROCESSING=ON— Skips building the interface translations, which the package-wide English-only rule would remove anyway (see Size and language policy).
Programs: lokalize.
Directories: /usr/share/doc/HTML/en/lokalize, /usr/share/licenses/lokalize, /usr/share/lokalize.
Translating an OpenDocument file runs odf2xliff and xliff2odf from translate-toolkit, looked for on PATH when the action is used; translate-toolkit is not a port, so that action reports the missing package and everything else works. The unit tests in autotests are compiled whatever BUILD_TESTING says and are not installed.
Lokalize’s main() sets QT_QPA_PLATFORM=xcb on Linux, over the session’s wayland;xcb, because its several QMainWindows misbehave under Wayland (KDE bugs 424024 and 477704). It always runs as an X11 client on Xwayland.