feat: replace all hardcoded en-US and $ formatting with locale-aware helpers

This commit is contained in:
Your Name
2026-02-17 23:39:31 +02:00
parent fe0b20f247
commit 519bdabe61
7 changed files with 23 additions and 53 deletions

View File

@@ -40,7 +40,7 @@
</div>
<div>
<p class="text-[0.6875rem] text-text-tertiary uppercase tracking-[0.08em] mb-1">Earnings</p>
<p class="text-[1.25rem] font-[family-name:var(--font-heading)] text-accent-text font-medium">${{ reportData.totalEarnings?.toFixed(2) || '0.00' }}</p>
<p class="text-[1.25rem] font-[family-name:var(--font-heading)] text-accent-text font-medium">{{ formatCurrency(reportData.totalEarnings || 0) }}</p>
</div>
<div>
<p class="text-[0.6875rem] text-text-tertiary uppercase tracking-[0.08em] mb-1">Projects</p>
@@ -80,7 +80,7 @@
</div>
<div class="flex items-center gap-4">
<span class="text-[0.75rem] font-mono text-accent-text">{{ formatHours(projectData.total_seconds) }}</span>
<span class="text-[0.75rem] font-mono text-text-secondary">${{ ((projectData.total_seconds / 3600) * getProjectRate(projectData.project_id)).toFixed(2) }}</span>
<span class="text-[0.75rem] font-mono text-text-secondary">{{ formatCurrency((projectData.total_seconds / 3600) * getProjectRate(projectData.project_id)) }}</span>
</div>
</div>
<div class="w-full bg-bg-elevated rounded-full h-[2px]">
@@ -120,6 +120,7 @@ import {
} from 'chart.js'
import { useEntriesStore } from '../stores/entries'
import { useProjectsStore } from '../stores/projects'
import { formatCurrency } from '../utils/locale'
// Register Chart.js components
ChartJS.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend)