mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-01 14:39:24 +02:00
Implementa infraestrutura de i18n com suporte inicial a English e Português (Brasil). Seletor de idioma em Settings > System > Preferences. - Instala react-i18next e i18next - Cria arquivos de tradução (en, pt-BR) para common, home, settings, layout - Traduz layout (sidebar, header, footer), home e settings/system - Persiste idioma via localStorage + KVStore (ui.language) - DiskAlertBanner integrado com i18n Closes #486
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { useState } from 'react'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { usePage } from '@inertiajs/react'
|
|
import { UsePageProps } from '../../types/system'
|
|
import ThemeToggle from '~/components/ThemeToggle'
|
|
import { IconBug } from '@tabler/icons-react'
|
|
import DebugInfoModal from './DebugInfoModal'
|
|
|
|
export default function Footer() {
|
|
const { t } = useTranslation('layout')
|
|
const { appVersion } = usePage().props as unknown as UsePageProps
|
|
const [debugModalOpen, setDebugModalOpen] = useState(false)
|
|
|
|
return (
|
|
<footer>
|
|
<div className="flex items-center justify-center gap-3 border-t border-border-subtle py-4">
|
|
<p className="text-sm/6 text-text-secondary">
|
|
{t('footer.version', { version: appVersion })}
|
|
</p>
|
|
<span className="text-gray-300">|</span>
|
|
<button
|
|
onClick={() => setDebugModalOpen(true)}
|
|
className="text-sm/6 text-gray-500 hover:text-desert-green flex items-center gap-1 cursor-pointer"
|
|
>
|
|
<IconBug className="size-3.5" />
|
|
{t('footer.debugInfo')}
|
|
</button>
|
|
<ThemeToggle />
|
|
</div>
|
|
<DebugInfoModal open={debugModalOpen} onClose={() => setDebugModalOpen(false)} />
|
|
</footer>
|
|
)
|
|
}
|