feat: soporte multi idioma en la web (infraestructura)
i18next + react-i18next con es-AR (fuente), es-419, pt-BR y en; el idioma sale del dispositivo (fallback a inglés) y se puede cambiar en Ajustes. La elección se guarda en localStorage y, para el profe, en users.locale. Las validaciones de shared pasan a claves y los errores de la API se traducen por code (con params para límites de plan y cupo). Migrados: layout, Ajustes, auth, PWA y lib/format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { Link } from '@tanstack/react-router'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Logo } from '../brand'
|
||||
import { Breadcrumb } from './Breadcrumb'
|
||||
import { ThemeToggle } from './ThemeToggle'
|
||||
import { UserMenu } from './UserMenu'
|
||||
|
||||
export function Header() {
|
||||
const { t } = useTranslation('layout')
|
||||
return (
|
||||
<header className="sticky top-0 z-40 h-16 w-full border-b border-border bg-background/90 backdrop-blur">
|
||||
<div className="mx-auto flex h-full w-full max-w-7xl items-center justify-between px-4 lg:px-6">
|
||||
@@ -12,7 +14,7 @@ export function Header() {
|
||||
{/* `Link` and not `<a>`: on mobile the logo is the only way back to the
|
||||
home screen and an anchor would reload the whole document, losing
|
||||
the in-memory state (React Query cache, install event). */}
|
||||
<Link to="/" className="flex items-center lg:hidden" aria-label="Gruperly inicio">
|
||||
<Link to="/" className="flex items-center lg:hidden" aria-label={t('homeLink')}>
|
||||
<Logo className="h-8" />
|
||||
</Link>
|
||||
<Breadcrumb />
|
||||
|
||||
Reference in New Issue
Block a user