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
VueReplacer stops at the first inner </template> — near-zero coverage on slot-based SFCs #2
Laravel 13 + Inertia 2 + Vue 3.5 project (134 SFCs; most CRUD pages render a shared
form component through named slots — #header, #listactions, #thead, #tbody, #default). Running the extract/replace pipeline against one pilot page.
What happens
In @ai-localizer/coresrc/i18n/lib/replacers/vueReplacer.js, replace() isolates
the template with:
The [\s\S]*? is non-greedy, so the match ends at the first</template> —
which in slot-based components is an inner slot template (<template #header>...),
not the component's own template block. Everything after it is never processed.
Note the asymmetry: extraction scans the whole SFC (we got keys for strings that
live inside slots — e.g. a field label inside <template #default>), so the key map
already contains the strings the replacer then never looks at in that region.
Actual: only <Head title="Item Category Entry" /> is replaced (it sits before the
first inner </template>). 1 of 5 extracted strings rewritten; the other 4 —
including title="Item Category Management" and placeholder="Search by Category Name...", whose keys ARE in the base locale — stay hard-coded.
Expected: the whole outer template block is processed (match the outermost </template>, or parse top-level SFC blocks properly).
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 clear reproduction. #13 handles the full outer Vue template, including nested slots, and adds coverage for content after the first slot and component caption attributes.
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 clear reproduction. #13 handles the full outer Vue template, including nested slots, and adds coverage for content after the first slot and component caption attributes.
The fix is in the PR and has regression coverage. It’s awaiting merge, so it isn’t in a release yet.