Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
415 changes: 248 additions & 167 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"framer-motion": "^12.6.3",
"i18next": "^25.3.2",
"i18next-browser-languagedetector": "^8.2.0",
"lodash": "^4.17.21",
"lucide-react": "^0.467.0",
"papaparse": "^5.4.1",
Expand All @@ -64,6 +66,7 @@
"react-dom": "^18.3.1",
"react-dropzone": "^14.3.8",
"react-hook-form": "^7.55.0",
"react-i18next": "^15.6.1",
"react-router-dom": "^7.5.2",
"recharts": "^2.15.3",
"tailwind-merge": "^3.2.0",
Expand Down Expand Up @@ -96,4 +99,4 @@
"vite": "^6.2.7",
"vitest": "^3.1.3"
}
}
}
4 changes: 3 additions & 1 deletion src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Icons } from '@/components/icons';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { Link, useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next';

interface ApplicationHeaderProps {
heading: string;
Expand All @@ -23,6 +24,7 @@ export function ApplicationHeader({
backUrl,
}: ApplicationHeaderProps) {
const navigate = useNavigate();
const { t } = useTranslation();
return (
<div className={cn('flex w-full items-center justify-between', className)}>
<div className="flex items-center gap-2">
Expand All @@ -49,7 +51,7 @@ export function ApplicationHeader({
</>
)}

<h1 className="font-heading text-xl font-bold tracking-tight">{heading}</h1>
<h1 className="font-heading text-xl font-bold tracking-tight">{t(heading)}</h1>
{text && <p className="ml-4 text-lg font-light text-muted-foreground">{text}</p>}
</div>
</div>
Expand Down
22 changes: 22 additions & 0 deletions src/i18n.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';

import zhTW from './locales/zh-TW/translation.json';
import zhCN from './locales/zh-CN/translation.json';
import en from './locales/en/translation.json';

i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
resources: {
'zh-TW': { translation: zhTW },
'zh-CN': { translation: zhCN },
en: { translation: en }
},
fallbackLng: 'zh-TW',
interpolation: { escapeValue: false }
});

export default i18n;
55 changes: 55 additions & 0 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"common": {
"settings": "Settings",
"general": "General",
"save": "Save",
"cancel": "Cancel",
"delete": "Delete",
"edit": "Edit",
"add": "Add",
"back": "Back",
"success": "Success",
"error": "Error"
},
"settings": {
"General": "General",
"general": {
"title": "General",
"description": "Manage the general application settings and preferences",
"language": "Language",
"language_description": "Choose your preferred language",
"language_selection": "Select Language",
"baseCurrency": "Base Currency",
"baseCurrency_description": "Choose your base currency"
},
"Accounts": "Accounts",
"Limits": "Limits",
"Goals": "Goals",
"Appearance": "Appearance",
"Data Export": "Data Export",
"Contribution Limits": "Contribution Limits",
"Manage your investment and saving accounts.": "Manage your investment and saving accounts.",
"Manage your contribution limits.": "Manage your contribution limits.",
"Manage your investment and saving goals.": "Manage your investment and saving goals.",
"Customize the appearance of the application.": "Customize the appearance of the application.",
"Export all your financial data with flexible export options.": "Export all your financial data with flexible export options.",
"Choose Your Preferred Format": "Choose Your Preferred Format"
},
"dashboard": {
"Dashboard": "Dashboard",
"portfolio": "Portfolio",
"holdings": "Holdings",
"activities": "Activities",
"performance": "Performance"
},
"Dashboard": "Dashboard",
"Holdings": "Holdings",
"Performance": "Performance",
"Income": "Income",
"Activities": "Activities",
"Settings": "Settings",
"Investment Income": "Investment Income",
"Portfolio Performance": "Portfolio Performance",
"No income data available": "No income data available",
"Add account": "Add account"
}
213 changes: 213 additions & 0 deletions src/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
{
"common": {
"settings": "设置",
"general": "通用",
"save": "保存",
"cancel": "取消",
"delete": "删除",
"edit": "编辑",
"add": "添加",
"back": "返回",
"success": "成功",
"error": "错误"
},
"settings": {
"General": "通用",
"general": {
"title": "通用",
"description": "管理应用程序的通用设置和偏好",
"language": "语言",
"language_description": "选择您的首选语言",
"language_selection": "选择语言",
"baseCurrency": "基础货币",
"baseCurrency_description": "选择您的基础货币"
},
"Accounts": "账户",
"Limits": "限制",
"Goals": "目标",
"Appearance": "外观",
"Data Export": "数据导出",
"Contribution Limits": "贡献限制",
"Manage your investment and saving accounts.": "管理您的投资和储蓄账户",
"Manage your contribution limits.": "管理您的贡献限制",
"Manage your investment and saving goals.": "管理您的投资和储蓄目标",
"Customize the appearance of the application.": "自定义应用程序的外观",
"Export all your financial data with flexible export options.": "使用灵活的导出选项导出所有您的财务数据",
"Choose Your Preferred Format": "选择您的首选格式"
},
"dashboard": {
"Dashboard": "仪表板",
"portfolio": "投资组合",
"holdings": "持仓",
"activities": "活动",
"performance": "表现"
},
"Dashboard": "仪表板",
"Holdings": "持仓",
"Performance": "表现",
"Income": "收入",
"Activities": "活动",
"Activity": "活动",
"Settings": "设置",
"Accounts": "账户",
"Limits": "限制",
"Goals": "目标",
"Appearance": "外观",
"Data Export": "数据导出",
"Investment Income": "投资收入",
"Portfolio Performance": "投资表现",
"No income data available": "没有可用的收入数据",
"There is no income data for the selected period. Try selecting a different time range or check back later.": "所选时间段没有可用的收入数据。请选择不同的时间段或稍后再试",
"Add account": "添加账户",
"Exchange Rates": "汇率",
"Add rate": "添加汇率",
"Manage exchange rates for currencies in your portfolio.": "管理投资组合中货币的汇率",
"Add limit": "添加限制",
"Current Year": "当前年份",
"Add goal": "添加目标",
"Add an goal": "添加一个目标",
"No goal added": "没有添加目标",
"Update preferences": "更新偏好",
"No exchange rates defined yet": "尚未定义任何汇率",
"Base Currency": "基础货币",
"Select your portfolio base currency.": "选择您的投资组合基础货币",
"Simple, widely compatible spreadsheet format": "简单,广泛兼容的电子表格格式",
"Structured data for easy programmatic access": "结构化数据,便于编程访问",
"Compact, self-contained database file": "紧凑,自我包含的数据库文件",
"Customize Your Export": "自定义您的导出",
"Portfolio History": "投资组合历史",
"Your financial accounts": "您的金融账户",
"Detailed transaction history and logs": "详细的交易历史和日志",
"Financial objectives and progress tracking": "金融目标和进度跟踪",
"Your portfolio's performance over time, including valuations, gains, and cash flow activities.": "您投资组合的表现,包括估值、收益和现金流量活动",
"Full Database Backup": "完整数据库备份",
"Complete, queryable SQLite database backup of all your information": "完整的,可查询的 SQLite 数据库备份,包括所有信息",
"Add a contribution limit": "添加贡献限制",
"By Sector": "按行业",
"By Class": "按类别",
"By Country": "按国家/地区",
"By Currency": "按货币",
"No holdings data": "没有持仓数据",
"There is no holdings data available for your portfolio.": "您的投资组合没有可用的持仓数据",
"Add Manually": "手动添加",
"Upload CSV": "上传 CSV",
"Wealthfolio": "财富组合",
"No class data": "没有类别数据",
"No currency data": "没有货币数据",
"No sector data": "没有行业数据",
"No country data": "没有国家/地区数据",
"There is no class data available for your holdings.": "您的持仓没有可用的类别数据",
"There is no currency data available for your holdings.": "您的持仓没有可用的货币数据",
"There is no sector data available for your holdings.": "您的持仓没有可用的行业数据",
"There is no country data available for your holdings.": "您的持仓没有可用的国家/地区数据",
"Analytics": "分析",
"Positions": "位置",
"No activity found.": "没有找到活动",
"Reset": "重置",
"Today's return": "今天的回报",
"Today's Price": "今天的价格",
"Total return": "总回报",
"Total Value": "总价值",
"Total cost": "总成本",
"Total gain": "总收益",
"Total loss": "总损失",
"Total cash flow": "总现金流量",
"Shares": "股数",
"Position": "位置",
"Fee": "费用",
"Date": "日期",
"Type": "类型",
"Name": "名称",
"Value": "价值",
"Account": "账户",
"Price/Amount": "价格/数量",
"Asc": "升序",
"Desc": "降序",
"Is Active": "是否激活",
"Default Account": "默认账户",
"Currency": "货币",
"Account Name": "账户名称",
"Account Group": "账户组",
"Account Type": "账户类型",
"Add Account": "添加账户",
"Update Account": "更新账户",
" Add an investment account to track.": "添加投资账户以跟踪",
"Update account information": "更新账户信息",
"Account display name": "账户显示名称",
"Retirement, 401K, RRSP, TFSA,...": "退休,401K,RRSP,TFSA,...",
"Select an account type": "选择账户类型",
"Securities": "证券",
"Cash": "现金",
"Crypto": "加密货币",
"Cancel": "取消",
"Update Contribution Limit": "更新贡献限制",
"Add Contribution Limit": "添加贡献限制",
"Update contribution limit information": "更新贡献限制信息",
" Add a new contribution limit.": "添加新的贡献限制",
"Group Name": "组名",
"Group name": "组名",
"Contribution Year": "贡献年份",
"Contribution year": "贡献年份",
"Limit Amount": "限制金额",
"Add Limit": "添加限制",
"Update Limit": "更新限制",
"Add Goal": "添加目标",
"Update Goal": "更新目标",
"Goal Name": "目标名称",
"Goal description": "目标描述",
"Target amount": "目标金额",
" Add an investment goal to track.": "添加投资目标以跟踪",
"Select account currency": "选择账户货币",
"Save": "保存",
"Set your preferred font family to use.": "设置您要使用的首选字体族",
"Set your preferred font size to use.": "设置您要使用的首选字体大小",
"Select your preferred theme for the application.": "选择您要使用的应用程序的首选主题",
"Light": "浅色",
"Dark": "深色",
"Holding Composition": "持仓构成",
"Cash Savings": "现金储蓄",
"Brokerage": "经纪商",
"Add Exchange Rate": "添加汇率",
"Add a new exchange rate to the system.": "向系统添加新的汇率",
"From Currency": "从货币",
"To Currency": "至货币",
"Exchange Rate": "汇率",
"File saved successfully.": "文件保存成功",
"Something went wrong.": "出了点问题",
"Cumulative Returns": "累计回报",
"Compare account performance over time": "比较账户表现",
"Saving Goals": "储蓄目标",
"No saving goals set": "未设置储蓄目标",
"Create a goal to start tracking your progress": "创建目标以开始跟踪您的进度",
"Progress": "进度",
"Current Value": "当前价值",
"Target Value": "目标价值",
"Theme": "主题",
"Font Family": "字体族",
"Font Size": "字体大小",
"Money-Weighted": "按金额加权",
"Time-Weighted": "按时间加权",
"No performance data": "没有表现数据",
"Select accounts to compare their performance over time": "选择账户以比较它们的表现",
"Update Portfolio": "更新投资组合",
"Updating portfolio...": "更新投资组合...",
"Portfolio recalculated successfully": "投资组合重新计算成功",
"Failed to recalculate portfolio": "投资组合重新计算失败",
"All Time": "全部时间",
"Last Year": "去年",
"Year to Date": "今年至今",
"All Time Income": "全部时间收入",
"Last Year Income": "去年收入",
"This Year Income": "今年收入",
"Year-over-year growth": "年增长率",
"Monthly Income": "每月收入",
"Previous Period": "上一时期",
"All Portfolio": "全部投资组合",
"You don&apos;t have any contribution limits for the current year. Start adding your contribution limits.": "您当前年份没有贡献限制。开始添加您的贡献限制",
"No contribution limits for": "没有贡献限制",
"You don&apos;t have any goal yet. Start adding your investment goals.": "您还没有目标。开始添加您的投资目标",
"Base currency updated successfully.": "基础货币更新成功",
"Settings updated successfully.": "设置已成功更新",
"Uh oh! Something went wrong.": "糟糕!出了点问题。",
"There was a problem updating your settings.": "更新设置时出现问题。"
}
Loading