You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Blade: <h1> extracted with kind "text" but replaced with kind "heading" — headings are never substituted #4
In the Blade rewriter (src/i18n/rewrite-i18n-blade.js), inferKindFromTagName()
maps h1–h6 to kind heading. But the extraction phase registered our <h1>
string under kind text — the base locale contains Errors.TurnstileMisconfigured.text.this_page_isn_t for <h1>This page isn't set up yet</h1>.
Replacement then builds ns|heading|This page isn't set up yet, which does not exist
in the key map (only ns|text|... does) → the heading is never replaced, even though
its key is present in the base locale.
Repro
extract on a view with <h1>This page isn't set up yet</h1> → key written under ...text.this_page_isn_t.
replace (Blade backend) → <h1> line unchanged; neighboring <p>/<strong>
lines (kind text) are replaced.
Expected
Consistent kind inference between the two phases (either the extractor tags headings
as heading, or the Blade key map adds a heading→text fallback the way replace-i18n.js does for the Vue/JS path).
Note
No retranslation needed once fixed: the keys are already in the base locale under text.
Environment
@ai-localizer/cli / @ai-localizer/core v0.1.1, Windows 11, Node v24.20.0.
Happy to contribute a PR (Apache-2.0).
Reported by @ViniMayerFontana via the Relief Inventory pt-BR localization effort (Apache-2.0, happy to PR).
Thanks for the example. #13 lets the Blade rewriter fall back from a heading key to the existing text key, so these headings don’t need to be translated again.
The fix is in the PR and has regression coverage. It’s awaiting merge, so it isn’t in a release yet.
Activity
xwiz commentedon Nov 14, 2026
Thanks for the example. #13 lets the Blade rewriter fall back from a heading key to the existing text key, so these headings don’t need to be translated again.
The fix is in the PR and has regression coverage. It’s awaiting merge, so it isn’t in a release yet.