diff --git a/src/components/StatsSection.astro b/src/components/StatsSection.astro index 6a91057..f802e7c 100644 --- a/src/components/StatsSection.astro +++ b/src/components/StatsSection.astro @@ -1,32 +1,36 @@ --- import type { TranslationKey } from '@/i18n/ui'; -import StatCounter from './StatCounter.astro'; interface Props { t: (key: TranslationKey) => string; + lang?: 'es' | 'en'; } -const { t } = Astro.props; +const { t, lang = 'es' } = Astro.props; const stats = [ - { value: '26+', label: 'Años de experiencia', sub: 'Desde el 2000' }, - { value: '100+', label: 'Proyectos hospedados', sub: 'Webs, e-commerce, infra' }, - { value: '4', label: 'Países', sub: 'Canadá, USA, Alemania, UY' }, - { value: 'Senior', label: 'Equipo senior', sub: 'SysAdmin / SRE' }, + { valueKey: 'stats.value1', labelKey: 'stats.label1' as TranslationKey, subKey: 'stats.sub1' as TranslationKey }, + { valueKey: 'stats.value2', labelKey: 'stats.label2' as TranslationKey, subKey: 'stats.sub2' as TranslationKey }, + { valueKey: 'stats.value3', labelKey: 'stats.label3' as TranslationKey, subKey: 'stats.sub3' as TranslationKey }, + { valueKey: 'stats.value4', labelKey: 'stats.label4' as TranslationKey, subKey: 'stats.sub4' as TranslationKey }, ]; + +const values = lang === 'en' + ? ['26+', '100+', '4', 'Senior'] + : ['26+', '100+', '4', 'Senior']; ---
- {stats.map((stat) => ( + {stats.map((stat, idx) => (
- {stat.value} + {values[idx]}
- {stat.label} + {t(stat.labelKey)}
- {stat.sub} + {t(stat.subKey)}
))} diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index 6bb4eb7..e83d902 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -16,6 +16,14 @@ export const ui = { 'hero.badgeUptime': 'Uptime 99.9%', 'hero.badgeSupport': 'Soporte humano', 'hero.badgeLocation': 'Maldonado, Uruguay', + 'stats.label1': 'Años de experiencia', + 'stats.sub1': 'Desde el 2000', + 'stats.label2': 'Proyectos hospedados', + 'stats.sub2': 'Webs, e-commerce, infra', + 'stats.label3': 'Países', + 'stats.sub3': 'Canadá, USA, Alemania, UY', + 'stats.label4': 'Equipo senior', + 'stats.sub4': 'SysAdmin / SRE', 'diff.eyebrow': 'La diferencia', 'diff.title': 'Por qué elegirnos', 'diff.subtitle': 'Tu proyecto merece un socio tecnológico, no solo un hosting.', @@ -74,6 +82,14 @@ export const ui = { 'hero.badgeUptime': '99.9% uptime', 'hero.badgeSupport': 'Human support', 'hero.badgeLocation': 'Maldonado, Uruguay', + 'stats.label1': 'Years of experience', + 'stats.sub1': 'Since 2000', + 'stats.label2': 'Projects hosted', + 'stats.sub2': 'Websites, e-commerce, infra', + 'stats.label3': 'Countries', + 'stats.sub3': 'Canada, USA, Germany, UY', + 'stats.label4': 'Senior team', + 'stats.sub4': 'SysAdmin / SRE', 'diff.eyebrow': 'The difference', 'diff.title': 'Why choose us', 'diff.subtitle': 'Your project deserves a technology partner, not just a hosting provider.', diff --git a/src/pages/en/index.astro b/src/pages/en/index.astro index 8b6b4d8..9f28923 100644 --- a/src/pages/en/index.astro +++ b/src/pages/en/index.astro @@ -26,7 +26,7 @@ const description = 'Cloud hosting, websites, e-commerce and infrastructure with - + diff --git a/src/pages/index.astro b/src/pages/index.astro index e0d8e51..32557b8 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -29,7 +29,7 @@ const description = lang === 'en' - +