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
Extract turns select option values into translation keys — risks rewriting value: 'x' into value: t('...') #7
gets its option VALUE ('other', a machine identifier persisted to the database via v-model) extracted as a translatable string — it landed in the base locale as Commons.text.other: "other", while the label correctly became Commons.text.other_2: "Other".
The replace phase did not rewrite it in our run, but the key map contains Commons|text|other, so a script-side string-literal replacement pass that matches
object property values could rewrite value: 'other' into value: t('Commons.text.other')
— which would silently change the data written by v-model and break stored records.
This makes every extract run on a codebase with inline option arrays a latent
data-corruption risk, not just a cosmetic false positive.
Expected
Exclude string literals assigned to common value-like property names
(value, id, key, slug, type?) from extraction — or apply the code validators
(validateText) to script object-literal property values, the same way the Blade path
lacks validators (see our earlier report).
Workaround used
Verbatim translation for the false-positive key (translation value == source string)
and per-batch diff review.
Environment
@ai-localizer/cli / @ai-localizer/core v0.1.1 (patched replacers; extractor unmodified
from HEAD 6d478b3), Windows 11, Node v24.20.0, Laravel 13 + Inertia 2 + Vue 3.5.
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 highlighting the data risk. #13 excludes common machine-value properties from Vue script extraction, while keeping display labels eligible for translation.
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 highlighting the data risk. #13 excludes common machine-value properties from Vue script extraction, while keeping display labels eligible for translation.
The fix is in the PR and has regression coverage. It’s awaiting merge, so it isn’t in a release yet.