project-nomad/admin/inertia/components/ProgressBar.tsx
Martin Seener 134d1642af
Added initial i18n framework and most german translations
- Add i18next, react-i18next, i18next-browser-languagedetector packages
- Configure i18n initialization with language detector in lib/i18n.ts
- Created en/de translation files and moved most hard-coded strings into the files and translated them
- Uses locale-aware date formatting where applicable
- Added language-specific Wikipedia content files (wikipedia.en.json, wikipedia.de.json) and updated download URLs
- Added NOMAD_REPO_URL env variable for fork-friendly URL resolution (easier testing and rollout independent of Crosstalk repo)
2026-03-24 13:21:31 +01:00

31 lines
834 B
TypeScript

import { useTranslation } from 'react-i18next'
const ProgressBar = ({ progress, speed }: { progress: number; speed?: string }) => {
const { t } = useTranslation()
if (progress >= 100) {
return (
<div className="flex items-center justify-between">
<span className="text-sm text-desert-green">{t('common.downloadComplete')}</span>
</div>
)
}
return (
<div className="flex flex-col">
<div className="relative w-full h-2 bg-border-subtle rounded">
<div
className="absolute top-0 left-0 h-full bg-desert-green rounded"
style={{ width: `${progress}%` }}
/>
</div>
{speed && (
<div className="mt-1 text-sm text-text-muted">
{t('common.estSpeed', { speed })}
</div>
)}
</div>
)
}
export default ProgressBar