AI 0.19.0: The AI admin in Russian and Estonian
AI 0.19.0 translates the AI admin pages. The module now carries its own English, Russian and Estonian translations, so an admin who works in Russian or Estonian sees the AI pages in that language instead of English.
Its own translations
Until now the module’s pages looked up their texts in core’s translation catalogue, which did not contain them. Whatever language the admin used, the AI pages stayed in English, and a translator had nowhere to add their texts. The module now has its own translation backend with about 340 texts in each of English, Russian and Estonian. The labels of the AI tabs in the admin menu and in the permission matrix use it too.
A few texts could not be translated before, because English words were glued into them. The message after saving an endpoint had “created” or “updated” inserted as plain English, and the language picker of AI translation built its “language” and “languages” count with an English-only plural rule, so Russian’s three plural forms could never appear. Both are proper translatable texts now. Several tooltips and counts on the Endpoints and Prompts pages were not marked for translation at all and are now.
Fewer crashes when logging requests
Logging an AI request for an endpoint or a user that had since been deleted raised a database error out of create_request/1. The module looked for the wrong foreign key names, so its own checks never matched. It now uses the names core’s migrations give these keys, and such a request returns an ordinary changeset error instead of crashing.
For developers
The test suite reads PGDATABASE and PGPOOL from the environment, so it can run on a shared Postgres without a role that creates databases. Dependencies move to Phoenix 1.8.11 and newer xai and hackney releases.
Upgrading
No migration and no configuration. Update the dependency; the minimum PhoenixKit stays at 2.0. If your admin runs in Russian or Estonian, the AI pages switch to that language right away.
Full release notes: AI 0.19.0
0.19.0 · 12 August 2026
Added
- Per-module Gettext i18n (en/ru/et). This package now owns a
PhoenixKitAI.Gettextbackend and its own catalogues underpriv/gettext/(338 msgids per locale). Previouslyuse PhoenixKitWeb, :live_viewtransitively supplied core’s backend, so all 402gettextcalls here looked their msgids up in core’s catalogue — the interface rendered in English whatever the locale, with nowhere for a translator to add strings for this package. Tab and permission-matrix labels are wired throughgettext_backend/gettext_domain, andtranslatable_labels/0anchors the five labels declared as plain struct literals somix gettext.extractcan see them andmix gettext.mergestops deleting them (#17). PGDATABASE/PGPOOLoverrides for the test suite.config/test.exsreads both from the environment, falling back to the previous hardcoded database name andSystem.schedulers_online() * 2. Without them the only way to run the:integrationhalf of the suite was a Postgres role holdingCREATEDB— which a shared or managed instance withholds, so those ~545 tests silently excluded themselves and the run still exited 0. Same mechanism corephoenix_kitalready uses. CI and a plain localmix testare unaffected (#18).
Fixed
- Foreign-key violations on
phoenix_kit_ai_requestsescaped as raw exceptions.Request.changeset/2declaredforeign_key_constraint/2for:endpoint_uuidand:user_uuidwithout an explicit:name, so Ecto derivedphoenix_kit_ai_requests_<field>_fkey— but core’s migration chain names these constraintsfk_ai_requests_endpoint_uuidandfk_ai_requests_user_uuid. The derived names exist on no database, so neither declaration could ever match and both were dead code: logging a request against a since-deleted endpoint or user raisedEcto.ConstraintErrorout ofcreate_request/1instead of returning{:error, changeset}. Both constraints now pin core’s actual names, and a database-free test asserts no FK constraint on this changeset carries a derived*_fkeyname. - Two translated strings had raw English stitched into them, so no
catalogue could translate them: the endpoint save-flash interpolated the
literal
"created"/"updated", and the AI-translate scope picker interpolated"language"/"languages"through a hand-rolled pluraliser that hardcoded English’s two-form rule, making Russian’s three forms unreachable. Both now use realgettext/ngettextcalls (#17). - Several tooltips and count+noun fragments in the endpoints and prompts
templates were never wrapped in
gettext()at all, so they were invisible to extraction regardless of backend (#17).
Changed
- Dependency updates:
phoenix1.8.11,beamlab_ex_aws_sqs5.0.1,xai0.2.1,hackney4.7.4 and the transitive set.
AI 0.19.0. Install or update: {:phoenix_kit_ai, "~> 0.19"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.