Publishing 0.1.14: Slug styles for non-Latin titles and faster AI translation
Publishing 0.1.14 stops non-Latin titles from turning into “untitled” slugs, and translates posts with AI one language per background job.
A new Slug Style setting on the Publishing settings page chooses how titles become URLs. Transliterate is the default: Привет мир becomes privet-mir. Unicode keeps letters from any script, as in привет-мир. ASCII only strips everything else, as before. Slugs are capped at 200 characters.
AI translation used to run all languages in one job. Now each language gets its own job, so translating a post takes about as long as its slowest language. The source is always the primary language, never the one the editor happens to show, and a translation is written into the version it was read from. Translated slugs are made from the translated title in your slug style.
The editor uses the full page width, shows the public URL of a published post, and has the per-language URL Slug field back with a live preview.
Upgrading
Publishing 0.1.14 needs PhoenixKit 1.7.132 or later.
Full release notes: Publishing 0.1.14
0.1.14 · 7 June 2026
PR #21 + PR #22 — editor UX, configurable slug style, and parallel AI translation (one Oban job per language via the shared translation pipeline), plus a post-merge review sweep. Requires phoenix_kit ~> 1.7.132.
Added
- Configurable slug style (
publishing_slug_stylesetting + Settings dropdown). One style-awareSlugHelpers.slugify/2that every slug engine routes through:transliterate(default — Cyrillic → Latin,Привет мир→privet-mir),unicode(keep letters/numbers from any script,привет-мир), andascii(legacy strip). Non-Latin titles no longer collapse to “untitled”. Slugs are capped at 200 chars on a hyphen boundary. PhoenixKitPublishing.AITranslatable— adapter onto PhoenixKitAI’s generic AI-translation pipeline (PhoenixKitAI.{Translations,TranslateWorker}), registered viaai_translatables/0. The per-languageurl_slugis generated locally from the translated title (honoring the slug style, never trusting an AI-returned slug) with a group+language uniqueness guard that omits the slug on conflict.- Editor UX: full-width layout matching the catalogue, aligned header rows, the public URL shown under the action buttons on published posts, and the re-enabled per-language URL Slug field with live preview.
Changed
- AI translation now runs one Oban job per target language (
PhoenixKitAI.Translations.enqueue_all_missing/2) instead of translating every language sequentially in a single job — wall-clock drops from the sum of all languages to roughly the slowest one. The programmatictranslate_post_to_all_languages/3routes through the same pipeline. ai_translation_available?/0,list_ai_endpoints/0, andlist_ai_prompts/0delegate toPhoenixKitAI.Translationsinstead of re-deriving the{uuid, name}shape a third time (PR #21). Publishing keeps its own default endpoint/prompt resolution and itstranslate-publishing-postsprompt.- The
url_sluguniqueness check now excludes the current post in SQL. - Added/updated the
phoenix_kit_aidependency for the generic AI-translation pipeline this module plugs into.
Fixed
- Translation source is always the primary language, never the language the editor happens to be viewing — “translate this language” on a non-primary page no longer enqueues a language into itself, and “translate all/missing” no longer sources from a translation. Covers the
source_content_blank?/1blank-source confirmation warning. - Read/write version pinning in the translation adapter — a published-v1 + draft-v2 post no longer reads one version and writes the new language row onto another.
- The
url_sluginput gainedmaxlength="200"and a style-aware HTML5pattern, so a valid Unicode slug isn’t rejected client-side under theunicodestyle. - The in-flight translation query references the core worker module instead of a hardcoded string, and a dead
|| %{}guard on the always-a-mappost.metadatawas removed (Dialyzer).
Removed
- The legacy
Workers.TranslatePostWorkerand its tests — superseded by theAITranslatableadapter + PhoenixKitAI pipeline (net −1.3k LOC).
Publishing 0.1.14. Install or update: {:phoenix_kit_publishing, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.