Skip to content

Commit cbc3dbc

Browse files
committed
feat(i18n): update contact form status messages and field count display for localization
1 parent e5e2a43 commit cbc3dbc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/pages/contact.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,15 @@ const L = (path: string) => localizePath(path, locale)
279279
form.reset()
280280
Object.values(inputs).forEach(el => el.classList.remove('input-ok', 'input-bad'))
281281
Object.values(hints).forEach(el => { el.textContent = ''; })
282-
fieldCount.textContent = '0/3 campos'
283-
status.textContent = '✓ Mensaje enviado. Te respondo en menos de 24 horas.'
282+
fieldCount.textContent = interpolate(cf.fieldCount, { n: 0, total: 3 })
283+
status.textContent = cf.successStatus
284284
status.className = 'mt-4 text-[13px] font-mono text-cyan'
285285
} else {
286-
status.textContent = '✗ Error al enviar. Intenta de nuevo.'
286+
status.textContent = cf.errorStatus
287287
status.className = 'mt-4 text-[13px] font-mono text-ember'
288288
}
289289
} catch {
290-
status.textContent = '✗ Error de red. Intenta de nuevo.'
290+
status.textContent = cf.networkErrorStatus
291291
status.className = 'mt-4 text-[13px] font-mono text-ember'
292292
}
293293

0 commit comments

Comments
 (0)