Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

257.3. ki18n-6.31.0

KDE Frameworks: gettext-based translation for Qt programs

Version 6.31.0, release 1
Shelf kf6 — KDE Frameworks 6: every port whose homepage is under invent.kde.org/frameworks, whatever it does
Phase 43_toolkits (Toolkits), 30 of 344 in build order
Licence LGPL-2.0-or-later AND ODbL-1.0 AND (LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) AND CC0-1.0
Homepage https://api.kde.org/frameworks/ki18n/html/
Build time 3.5 SBU
Installed size 2.8 MiB in 61 files
Recipe ports/core/kf6/ki18n/kpkgbuild

About

KI18n is KDE’s translation library: it wraps gettext with i18n() and its relatives, handles plural forms and the translation scripting of KDE catalogues, and its locale-data library names countries and country subdivisions from the iso-codes data (KCountry, KCountrySubdivision) and finds the time zone of a location and the country of a time zone (KTimeZone). It also carries the CMake macros, ki18n_install() and ki18n_wrap_ui(), that KDE projects call. Nearly every KDE port in the tree depends on it.

Why it is in KDOS

The comment above the 61 ports from karchive to kfilemetadata in script/phases/43_toolkits/packages.d/kf6.txt:

The libraries KDE applications are built on, without Plasma.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, gettext, python3, iso-codes.

Required by (325): accessibility-inspector, akonadi, akonadi-calendar, akonadi-calendar-tools, akonadi-contacts, akonadi-import-wizard, akonadi-mime, akonadi-search, akonadiconsole, akregator, alligator, angelfish, arianna, ark, artikulate, audex, audiocd-kio, audiotube, aurorae, baloo, baloo-widgets, blinken, bluedevil, bomber, bovo, breeze, calendarsupport, calindori, calligra, cantor, digikam, discover, dolphin, dolphin-plugins, dragon, elisa, eventviews, falkon, fcitx5-configtool, filelight, francis, glaxnimate, granatier, grantlee-editor, grantleetheme, gwenview, haruna, incidenceeditor, isoimagewriter, itinerary, juk, k3b, kaccounts-integration, kaccounts-providers, kactivitymanagerd, kaddressbook, kajongg, kalarm, kalgebra, kalk, kalm, kalzium, kamera, kamoso, kanagram, kapman, kapptemplate, kasts, kate, katomic, kbackup, kblackbox, kblocks, kbounce, kbreakout, kbruch, kcachegrind, kcalc, kcalutils, kcharselect, kclock, kcm-kdos-boxes, kcm-kdos-firewall, kcm-kdos-health, kcm-kdos-look, kcm-kdos-system, kcmutils, kcolorchooser, kcolorscheme, kconfigwidgets, kcontacts, kcron, kdav, kde-cli-tools, kde-dev-utils, kde-inotify-survey, kdebugsettings, kdeclarative, kdeconnect, kdecoration, kded-kdos, kdenetwork-filesharing, kdepim-addons, kdepim-runtime, kdeplasma-addons, kdesdk-kio, kdesu, kdev-php, kdev-python, kdevelop, kdf, kdiamond, kdiff3, kdoctools, kdominate, kdos-discover, kdos-installer-gui, kdos-transcribe, keditbookmarks, keepsecret, keysmith, kfilemetadata, kfind, kfourinline, kgeography, kget, kgoldrunner, kgpg, kgraphviewer, khangman, khealthcertificate, khelpcenter, kiconthemes, kidentitymanagement, kig, kigo, killbots, kimagemapeditor, kimap, kinfocenter, kio, kio-admin, kio-extras, kio-gdrive, kio-library, kio-zeroconf, kirigami-addons, kirigami-app-components, kiriki, kiten, kitinerary, kjumpingcube, kldap, kleopatra, klettres, klickety, klines, kmahjongg, kmail, kmail-account-wizard, kmailtransport, kmenuedit, kmines, kmix, kmouth, kmplot, knavalbattle, knetwalk, knewstuff, knights, knighttime, knotifyconfig, koko, kolf, kollision, kolourpaint, kompare, kongress, konqueror, konquest, konsole, kontact, kontactinterface, kontrast, konversation, kopeninghours, korganizer, kosmindoormap, kpackage, kparts, kpat, kpeople, kpimtextedit, kpipewire, kpmcore, kpty, kpublictransport, krdc, krdp, krecorder, kreversi, krfb, krita, kruler, krunner, ksanecore, kscreen, kscreenlocker, kservice, kshisen, ksirk, ksmtp, ksnakeduel, kspaceduel, ksquares, ksshaskpass, ksudoku, ksystemlog, ksystemstats, ksystemstats-kdos, kteatime, ktextaddons, ktexteditor, ktextwidgets, ktimer, ktnef, ktorrent, ktouch, ktrip, ktuberling, kturtle, kubrick, kunifiedpush, kunitconversion, kup, kwallet, kwalletmanager, kwave, kweather, kweathercore, kwin, kwordquiz, kwrited, kxmlgui, labplot, libgravatar, libkcddb, libkdegames, libkdepim, libkeduvocdocument, libkleo, libkmahjongg, libkomparediff2, libksane, libksieve, libksysguard, libktorrent, libplasma, libreoffice, lokalize, lskat, mailcommon, mailimporter, marble, markdownpart, massif-visualizer, mbox-importer, merkuro, messagelib, milou, mimetreeparser, minuet, neochat, okular, oxygen, palapeli, parley, partitionmanager, picmi, pim-data-exporter, pim-sieve-editor, pimcommon, plasma-browser-integration, plasma-camera, plasma-desktop, plasma-disks, plasma-integration, plasma-keyboard, plasma-nm, plasma-pa, plasma-phonebook, plasma-sdk, plasma-setup, plasma-systemmonitor, plasma-thunderbolt, plasma-vault, plasma-welcome, plasma-workspace, plasma5support, plasmatube, plasmoid-kdos-checklist, plasmoid-kdos-privacy, polkit-kde-agent-1, powerdevil, print-manager, purpose, qmlkonsole, qrca, rkward, rocs, sddm-kcm, skanlite, skanpage, skladnik, spectacle, step, svgpart, sweeper, systemsettings, telly-skout, tokodon, umbrello, xdg-desktop-portal-kde, yakuake, zanshin.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install ki18n'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/kf6/ki18n.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/kf6/ki18n
echo '9fa271c7a33b856451de1ed3ff105626c2763fbd3b11d3210b02cb30de43f2ba  ki18n-6.31.0.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/ki18n
SRC=$SRC_ROOT/ki18n-6.31.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf ki18n-6.31.0.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_TESTING=OFF \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D KF_SKIP_PO_PROCESSING=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/ki18n, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf ki18n-6.31.0-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/ki18n, and runs the triggers its paths call for.

Contents

Installed libraries: libKF6I18n.so, libKF6I18nLocaleData.so, libKF6I18nQml.so.

Installed directories: /usr/include/KF6/KI18n, /usr/include/KF6/KI18nLocaleData, /usr/lib/cmake/KF6I18n, /usr/lib/qt6/qml/org/kde/i18n, /usr/lib/qt6/qml/org/kde/ki18n, /usr/share/licenses/ki18n.

Notes

iso-codes is a run-time dependency: the locale-data library reads its JSON files under /usr/share/iso-codes and keeps compact caches of them in ~/.cache/org.kde.ki18n/iso-codes/. Without it a program gets no country or subdivision names, and nothing fails at build time.

python3 is required by the configure, which writes the interpreter’s path into the installed KF6I18nMacros.cmake as the fallback when a later build finds no python3 on its own. A KDE project that installs translation scripts runs ts-pmap-compile.py with that interpreter.