mirror of
https://github.com/Zproger/Aurum.git
synced 2026-11-18 08:02:49 +07:00
feat: add 4 default income categories, localize category display names
Fresh installs (this app is published on GitHub) only got Salary, Freelance, Investments, Gifts, Other Income by default — adds Business Income, Rental Income, Benefits, and Item Sales, rounding out the 8-slot categorical palette. Only affects new databases (seeding is a one-time no-op once any category exists). Also fixes CategoryList.tsx (added last commit) to run category names through translateCategoryName() like every other category display in the app, and registers the new defaults' translation keys. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Pencil, Trash2 } from "lucide-react";
|
||||
import { translateCategoryName } from "@/lib/categoryLabels";
|
||||
import { getCategoryIcon } from "@/lib/icons";
|
||||
import { useTranslation } from "@/lib/i18n";
|
||||
import type { Category } from "@/types";
|
||||
@@ -30,7 +31,7 @@ export function CategoryList({ items, onEdit, onDelete }: CategoryListProps) {
|
||||
<Icon size={15} />
|
||||
</span>
|
||||
<span className="flex min-w-0 flex-1 items-center gap-1.5 truncate text-sm font-medium text-text-primary">
|
||||
<span className="truncate">{category.name}</span>
|
||||
<span className="truncate">{translateCategoryName(category.name)}</span>
|
||||
{category.is_default && (
|
||||
<span className="shrink-0 rounded bg-surface-2 px-1 py-0.5 text-[10px] leading-none text-text-muted">
|
||||
{t("category.defaultBadge")}
|
||||
|
||||
Reference in New Issue
Block a user