GTKX 1.5
August 27, 2026
GTKX 1.5 adds @gtkx/forms, which connects React Hook Form to Adwaita controls, and @gtkx/i18n, which connects React translation APIs to GNU gettext. Form controls are typed against the application's values. Translations use PO catalogs, with CLI support for extraction, types, compilation, desktop metadata, and packaging. Read the changelog for the full list of changes.

The tutorial task editor now uses React Hook Form for its native title and importance controls.
React Hook Form, rendered by Adwaita
@gtkx/forms re-exports React Hook Form's hooks, providers, controllers, and types. GTKX supplies native controls that integrate with its value, validation, focus, blur, disabled, dirty, reset, and submission behavior:
EntryRowandPasswordEntryRowbind string fields toAdwEntryRowandAdwPasswordEntryRow.SwitchRowbinds a boolean field toAdwSwitchRow.SpinRowbinds a number field toAdwSpinRow.ComboRowbinds a string field to an Adwaita combo row.
The form's value type restricts each row's name to a compatible field path. A text row cannot accidentally bind a boolean, and a nested path is checked against the same object that handleSubmit returns:
import { EntryRow, FormProvider, SwitchRow, useForm } from "@gtkx/forms";
import { AdwPreferencesGroup } from "@gtkx/jsx/adw";
type TaskFields = {
important: boolean;
title: string;
};
const TaskForm = () => {
const form = useForm<TaskFields>({
defaultValues: { important: false, title: "" },
});
return (
<FormProvider {...form}>
<AdwPreferencesGroup>
<EntryRow<TaskFields>
name="title"
title="Title"
rules={{ required: "Enter a title" }}
/>
<SwitchRow<TaskFields> name="important" title="Important" />
</AdwPreferencesGroup>
</FormProvider>
);
};Validation is native too. An invalid row gains Adwaita's error style, exposes GTK's accessible invalid state, and can show the rule message as its tooltip. React Hook Form's setFocus, focus-on-first-error, reset, resetField, and setValue reach the GTK widget. Native event handlers still run after the form receives a real user edit, so an application can persist a switch immediately or submit an entry from its Apply button without taking ownership of the controlled value.
The forms guide covers validation, disabled fields, custom controls, selection, and programmatic updates. The tutorial task editor puts the adapter in a complete application with navigation and persisted state.
react-i18next with gettext storage
@gtkx/i18n registers a backend on the default i18next singleton and re-exports react-i18next. Hooks, translation components, providers, and context use the upstream implementations. The direct t and init exports share the configured singleton. Catalog lookup uses the process-wide locale; GTKX does not provide a browser or server renderer.
The storage model follows the Linux desktop. Source messages become a gettext POT template, translators edit PO files, builds compile MO catalogs, and GLib performs the runtime lookup. Interpolation keeps i18next's {{name}} syntax, while an explicit singular and plural pair becomes one gettext plural entry:
import { t, useTranslation } from "@gtkx/i18n";
import { AdwStatusPage } from "@gtkx/jsx/adw";
const SearchState = ({ query }: { query: string }) => {
const { t } = useTranslation();
return <AdwStatusPage description={t("No tasks match “{{query}}”", { query })} />;
};
const age = (count: number) => t("{{count}} day ago", "{{count}} days ago", { count });Context and plural selection use gettext's own rules. The locale is process-wide, like the GLib and libc APIs underneath it, so an application selects its locale before startup rather than swapping an in-memory JSON resource store while it runs.

One French PO catalog drives the application UI and the metadata installed with it.
Strict messages, generated from the application
In 1.5, codegen follows t bindings through direct imports, hooks, HOCs, render callbacks, aliases, ESM, and CommonJS. It extracts statically recoverable messages and writes application-specific declarations in node_modules/.gtkx/i18n.d.ts.
That declaration narrows literal keys and records their contract. TypeScript rejects an unknown literal, a missing or misspelled interpolation variable, a plural without a numeric count, and a contextual call without the matching literal context. The strict translator flows through direct t, useTranslation, withTranslation, and the Translation render callback; there is no registry for an application author to maintain.
Extraction is equally automatic. The project chooses locales in po/LINGUAS and translates their msgstr values. gtkx codegen, gtkx dev, and gtkx build generate POTFILES.in, refresh the POT, initialize missing PO files, merge source changes, and regenerate the TypeScript contract. Development and production builds also compile the catalogs they need. PO updates are staged and only replace existing catalogs after every locale succeeds, so one malformed catalog cannot leave the PO set half-updated.
One localization lifecycle through deploy
gtkx deploy extends that same pass to the name, summary, descriptions, keywords, MIME descriptions, screenshot captions, and release notes in gtkx.config.ts. It validates and compiles the catalogs, writes localized desktop entries and AppStream XML, and stages the locale tree once for every target.
The generated launcher finds that tree relative to the installed application. Deb and RPM packages use /usr/share/locale, Flatpak uses /app/share/locale, and AppImage uses the image's runtime mount point. Source-mode Flatpak builds carry the same inputs. There is no format-specific locale path in application code and no second set of metadata translations.
The internationalization tutorial adds translation calls and a French catalog to Tasks, checks a translated message in an integration test, and packages the catalogs with the app. It starts with LINGUAS and uses the CLI to generate and update catalog files.
Also in 1.5
The MCP and test socket transports now reject malformed strings, cap incoming messages and queued writes, buffer messages split across read chunks, keep draining valid messages after a parse error, and fail promptly when the socket path is unwritable or a session bus hangs. Headless display startup reports compositor failures at their source instead of timing out later.
CSS rule insertion now drops rules containing raw newlines inside quoted values without corrupting later rules, while preserving escaped continuations and comments. The release also removes duplicated behavior code across React elements, components, CSS, settings, testing, MCP, and headless test infrastructure while retaining the observable APIs.
Upgrading
GTKX 1.5 has no application-facing breaking changes. Upgrade the GTKX packages together, then install @gtkx/forms or @gtkx/i18n only in applications that use them:
npm install @gtkx/cli@^1.5.0 @gtkx/react@^1.5.0
npm install @gtkx/forms@^1.5.0 @gtkx/i18n@^1.5.0Forms require generated Adw-1 bindings. Internationalization requires GNU gettext command-line tools anywhere codegen, development, builds, or deploys run; installed applications consume the compiled catalog and do not need those authoring tools. Add po/LINGUAS, run the usual GTKX command, and let the generated template and catalogs become ordinary versioned project files.
What's next
Forms and internationalization complete the remaining items on the original roadmap. Further work is tracked on the project board and issue tracker.