From c1d8e0003cff8cde9fc9bf4a215bddebded8e0c1 Mon Sep 17 00:00:00 2001 From: mdon Date: Sun, 9 Aug 2026 23:11:28 +0300 Subject: [PATCH] =?UTF-8?q?Pass=20transliterate:=20true=20=E2=80=94=20the?= =?UTF-8?q?=20arity-1=20call=20was=20a=20silent=20no-op?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Caught by the upstream review of phoenix_kit_dashboards#5, which found the same defect there and had to repair it after merge. PhoenixKit.Utils.Slug.slugify/2 defaults :transliterate to FALSE on every core released so far. So `Slug.slugify(text)` strips every non-ASCII character — exactly what the local pipeline this change replaced did. The delegation was correct and the behaviour was unchanged. My verification missed it because I tested against local core, where I had made transliteration the default. Against the core these modules actually resolve, it was inert. That is the difference between "the code is right" and "the shipped artifact is right", and only the second one matters. Forward-compatible: once core ships the locale-aware Slug, :transliterate is accepted and ignored, so this stays correct. The pinning tests are rewritten to assert only what holds at EVERY core version. Asserting output was the second half of the same mistake: each module resolves a different core (posts' lockfile pins 1.7.189, which predates the :transliterate option entirely), so a literal expected slug merges red. --- lib/phoenix_kit_document_creator/schemas/template.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/phoenix_kit_document_creator/schemas/template.ex b/lib/phoenix_kit_document_creator/schemas/template.ex index 5667ba5..b599d57 100644 --- a/lib/phoenix_kit_document_creator/schemas/template.ex +++ b/lib/phoenix_kit_document_creator/schemas/template.ex @@ -125,7 +125,7 @@ defmodule PhoenixKitDocumentCreator.Schemas.Template do # Core's rule, not a local copy. The pipeline this replaced deleted every # non-ASCII character, so a Cyrillic or Greek name produced an EMPTY slug and # German lost its umlauts. Slug.slugify/2 romanizes instead. - defp slugify(name), do: Slug.slugify(name) + defp slugify(name), do: Slug.slugify(name, transliterate: true) @doc "Changeset for upserting from Google Drive sync data." def sync_changeset(template, attrs) do