feat: add i18n internationalization support

- Add react-i18next, i18next with browser language detection
- Support Traditional Chinese (zh-TW) and English (en)
- Default language: zh-TW, stored in localStorage
- Create 10 translation namespaces (common, auth, dashboard, tasks, etc.)
- Add LanguageSwitcher component in header
- Translate pages: Login, Dashboard, Tasks, Spaces, Workload, Audit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
beabigegg
2026-01-08 23:18:41 +08:00
parent 1e31def7ba
commit 4bc3c24360
32 changed files with 1741 additions and 104 deletions

View File

@@ -0,0 +1,56 @@
{
"title": "Audit Log",
"subtitle": "Track all operations in the system",
"filters": {
"action": "Action Type",
"user": "User",
"entity": "Entity Type",
"dateRange": "Date Range",
"allActions": "All Actions",
"allUsers": "All Users",
"allEntities": "All Entities"
},
"actions": {
"create": "Create",
"update": "Update",
"delete": "Delete",
"login": "Login",
"logout": "Logout",
"assign": "Assign",
"unassign": "Unassign",
"statusChange": "Status Change",
"comment": "Comment",
"upload": "Upload",
"download": "Download"
},
"entities": {
"task": "Task",
"project": "Project",
"space": "Space",
"user": "User",
"comment": "Comment",
"attachment": "Attachment"
},
"columns": {
"timestamp": "Timestamp",
"user": "User",
"action": "Action",
"entity": "Entity",
"details": "Details",
"ipAddress": "IP Address"
},
"details": {
"before": "Before",
"after": "After",
"changes": "Changes"
},
"export": {
"title": "Export Log",
"csv": "Export as CSV",
"json": "Export as JSON"
},
"empty": {
"title": "No Audit Records",
"description": "No audit records match the current filters"
}
}

View File

@@ -0,0 +1,28 @@
{
"login": {
"title": "Login",
"subtitle": "Sign in to your account",
"email": "Email",
"emailPlaceholder": "Enter your email",
"password": "Password",
"passwordPlaceholder": "Enter your password",
"rememberMe": "Remember me",
"forgotPassword": "Forgot password?",
"submit": "Sign in",
"loggingIn": "Signing in...",
"noAccount": "Don't have an account?",
"signUp": "Sign up"
},
"errors": {
"invalidCredentials": "Invalid email or password",
"accountLocked": "Account is locked. Please contact administrator.",
"emailRequired": "Email is required",
"passwordRequired": "Password is required",
"invalidEmail": "Please enter a valid email address",
"loginFailed": "Login failed. Please try again later."
},
"welcome": {
"title": "Project Control Center",
"subtitle": "Manage your projects, tasks, and teams"
}
}

View File

@@ -0,0 +1,102 @@
{
"buttons": {
"save": "Save",
"cancel": "Cancel",
"delete": "Delete",
"edit": "Edit",
"create": "Create",
"close": "Close",
"confirm": "Confirm",
"back": "Back",
"next": "Next",
"previous": "Previous",
"submit": "Submit",
"reset": "Reset",
"search": "Search",
"filter": "Filter",
"export": "Export",
"import": "Import",
"refresh": "Refresh",
"add": "Add",
"remove": "Remove",
"view": "View",
"download": "Download",
"upload": "Upload"
},
"labels": {
"loading": "Loading...",
"noData": "No data",
"required": "Required",
"optional": "Optional",
"all": "All",
"none": "None",
"yes": "Yes",
"no": "No",
"active": "Active",
"inactive": "Inactive",
"enabled": "Enabled",
"disabled": "Disabled",
"actions": "Actions",
"details": "Details",
"description": "Description",
"name": "Name",
"title": "Title",
"status": "Status",
"type": "Type",
"date": "Date",
"time": "Time",
"createdAt": "Created at",
"updatedAt": "Updated at",
"createdBy": "Created by",
"assignee": "Assignee",
"selectAssignee": "Select assignee...",
"searchUsers": "Search users...",
"noUsersFound": "No users found",
"typeToSearch": "Type to search users"
},
"messages": {
"success": "Operation successful",
"error": "Operation failed",
"confirmDelete": "Are you sure you want to delete? This action cannot be undone.",
"unsavedChanges": "You have unsaved changes. Are you sure you want to leave?",
"networkError": "Network error. Please try again later.",
"sessionExpired": "Session expired. Please log in again.",
"permissionDenied": "You do not have permission to perform this action.",
"notFound": "The requested resource was not found."
},
"validation": {
"required": "This field is required",
"email": "Please enter a valid email address",
"minLength": "Minimum {{min}} characters required",
"maxLength": "Maximum {{max}} characters allowed",
"invalidFormat": "Invalid format"
},
"nav": {
"dashboard": "Dashboard",
"spaces": "Spaces",
"projects": "Projects",
"tasks": "Tasks",
"workload": "Workload",
"health": "Project Health",
"audit": "Audit Log",
"settings": "Settings",
"logout": "Logout"
},
"language": {
"switch": "Switch language",
"zhTW": "繁體中文",
"en": "English"
},
"notifications": {
"title": "Notifications",
"markAllRead": "Mark all as read",
"noNotifications": "No notifications",
"viewAll": "View all"
},
"pagination": {
"page": "Page {{page}}",
"of": "of {{total}}",
"showing": "Showing {{from}}-{{to}} of {{total}}",
"itemsPerPage": "Items per page"
}
}

View File

@@ -0,0 +1,47 @@
{
"title": "Dashboard",
"welcome": "Welcome back, {{name}}",
"stats": {
"myTasks": "My Tasks",
"overdueTasks": "Overdue Tasks",
"completedTasks": "Completed Tasks",
"activeProjects": "Active Projects",
"teamMembers": "Team Members",
"totalTasks": "Total Tasks",
"pendingReview": "Pending Review"
},
"sections": {
"recentActivity": "Recent Activity",
"upcomingDeadlines": "Upcoming Deadlines",
"myAssignedTasks": "Tasks Assigned to Me",
"projectOverview": "Project Overview",
"quickActions": "Quick Actions"
},
"activity": {
"taskCreated": "Created task \"{{task}}\"",
"taskCompleted": "Completed task \"{{task}}\"",
"taskAssigned": "Assigned task \"{{task}}\" to {{assignee}}",
"commentAdded": "Added a comment on task \"{{task}}\"",
"projectCreated": "Created project \"{{project}}\"",
"noRecentActivity": "No recent activity"
},
"deadlines": {
"today": "Due today",
"tomorrow": "Due tomorrow",
"thisWeek": "Due this week",
"overdue": "Overdue",
"noUpcoming": "No upcoming deadlines"
},
"quickActions": {
"createTask": "Create Task",
"createProject": "Create Project",
"viewAllTasks": "View All Tasks",
"viewWorkload": "View Workload"
},
"widgets": {
"tasksByStatus": "Tasks by Status",
"tasksByPriority": "Tasks by Priority",
"projectProgress": "Project Progress",
"teamWorkload": "Team Workload"
}
}

View File

@@ -0,0 +1,48 @@
{
"title": "Project Health",
"subtitle": "Monitor the overall health of projects",
"overall": {
"title": "Overall Health",
"healthy": "Healthy",
"atRisk": "At Risk",
"critical": "Critical"
},
"metrics": {
"schedule": "Schedule",
"budget": "Budget",
"scope": "Scope",
"quality": "Quality",
"resources": "Resources"
},
"status": {
"onTrack": "On Track",
"delayed": "Delayed",
"ahead": "Ahead",
"overBudget": "Over Budget",
"underBudget": "Under Budget"
},
"indicators": {
"title": "Health Indicators",
"taskCompletion": "Task Completion Rate",
"onTimeDelivery": "On-time Delivery Rate",
"blockedTasks": "Blocked Tasks",
"overdueRate": "Overdue Rate",
"velocityTrend": "Velocity Trend"
},
"risks": {
"title": "Risks",
"high": "High Risk",
"medium": "Medium Risk",
"low": "Low Risk",
"mitigated": "Mitigated"
},
"actions": {
"viewDetails": "View Details",
"exportReport": "Export Report",
"setAlert": "Set Alert"
},
"empty": {
"title": "No Health Data",
"description": "The project needs more data to display health metrics"
}
}

View File

@@ -0,0 +1,50 @@
{
"title": "Projects",
"createProject": "Create Project",
"editProject": "Edit Project",
"deleteProject": "Delete Project",
"projectSettings": "Project Settings",
"fields": {
"name": "Name",
"namePlaceholder": "Enter project name",
"description": "Description",
"descriptionPlaceholder": "Enter project description",
"status": "Status",
"startDate": "Start Date",
"endDate": "End Date",
"owner": "Project Owner",
"space": "Space"
},
"status": {
"planning": "Planning",
"active": "Active",
"on_hold": "On Hold",
"completed": "Completed",
"cancelled": "Cancelled"
},
"tabs": {
"overview": "Overview",
"tasks": "Tasks",
"members": "Members",
"settings": "Settings",
"files": "Files",
"activity": "Activity"
},
"stats": {
"totalTasks": "Total Tasks",
"completedTasks": "Completed",
"inProgress": "In Progress",
"overdue": "Overdue",
"progress": "Overall Progress"
},
"messages": {
"created": "Project created",
"updated": "Project updated",
"deleted": "Project deleted",
"confirmDelete": "Are you sure you want to delete this project? This will delete all related tasks."
},
"empty": {
"title": "No Projects",
"description": "Create your first project to start managing tasks"
}
}

View File

@@ -0,0 +1,73 @@
{
"title": "Settings",
"projectSettings": "Project Settings",
"tabs": {
"general": "General",
"members": "Members",
"customFields": "Custom Fields",
"notifications": "Notifications",
"integrations": "Integrations",
"danger": "Danger Zone"
},
"general": {
"title": "General Settings",
"projectName": "Project Name",
"description": "Description",
"status": "Status",
"visibility": "Visibility",
"public": "Public",
"private": "Private"
},
"members": {
"title": "Member Management",
"invite": "Invite Member",
"inviteByEmail": "Invite by email",
"emailPlaceholder": "Enter email address",
"role": "Role",
"changeRole": "Change Role",
"remove": "Remove Member",
"confirmRemove": "Are you sure you want to remove this member?"
},
"customFields": {
"title": "Custom Fields",
"add": "Add Field",
"edit": "Edit Field",
"delete": "Delete Field",
"fieldName": "Field Name",
"fieldType": "Field Type",
"required": "Required",
"types": {
"text": "Text",
"number": "Number",
"date": "Date",
"select": "Dropdown",
"multiSelect": "Multi-select",
"checkbox": "Checkbox"
}
},
"notifications": {
"title": "Notification Settings",
"email": "Email Notifications",
"inApp": "In-app Notifications",
"taskAssigned": "When a task is assigned to me",
"taskCompleted": "When a task is completed",
"commentAdded": "When a comment is added",
"dueDateApproaching": "When a due date is approaching"
},
"danger": {
"title": "Danger Zone",
"archive": "Archive Project",
"archiveDescription": "Archive this project. The project will become read-only.",
"delete": "Delete Project",
"deleteDescription": "Permanently delete this project and all its data. This action cannot be undone.",
"confirmArchive": "Are you sure you want to archive this project?",
"confirmDelete": "Are you sure you want to delete this project? Type the project name to confirm:",
"typeToConfirm": "Type \"{{name}}\" to confirm"
},
"messages": {
"saved": "Settings saved",
"memberInvited": "Invitation sent",
"memberRemoved": "Member removed",
"roleChanged": "Role changed"
}
}

View File

@@ -0,0 +1,39 @@
{
"title": "Spaces",
"createSpace": "Create Space",
"editSpace": "Edit Space",
"deleteSpace": "Delete Space",
"fields": {
"name": "Name",
"namePlaceholder": "Enter space name",
"description": "Description",
"descriptionPlaceholder": "Enter space description",
"icon": "Icon",
"color": "Color"
},
"members": {
"title": "Members",
"add": "Add Member",
"remove": "Remove Member",
"role": "Role",
"owner": "Owner",
"admin": "Admin",
"member": "Member",
"viewer": "Viewer"
},
"stats": {
"projects": "Projects",
"members": "Members",
"tasks": "Tasks"
},
"messages": {
"created": "Space created",
"updated": "Space updated",
"deleted": "Space deleted",
"confirmDelete": "Are you sure you want to delete this space? This will delete all related projects and tasks."
},
"empty": {
"title": "No Spaces",
"description": "Create your first space to organize projects"
}
}

View File

@@ -0,0 +1,134 @@
{
"title": "Tasks",
"createTask": "Create Task",
"editTask": "Edit Task",
"deleteTask": "Delete Task",
"taskDetails": "Task Details",
"fields": {
"title": "Title",
"titlePlaceholder": "Enter task title",
"description": "Description",
"descriptionPlaceholder": "Enter task description",
"status": "Status",
"priority": "Priority",
"assignee": "Assignee",
"dueDate": "Due Date",
"startDate": "Start Date",
"estimatedHours": "Estimated Hours",
"actualHours": "Actual Hours",
"progress": "Progress",
"tags": "Tags",
"parent": "Parent Task",
"subtasks": "Subtasks",
"attachments": "Attachments",
"comments": "Comments",
"watchers": "Watchers",
"blockers": "Blockers"
},
"status": {
"todo": "To Do",
"in_progress": "In Progress",
"review": "In Review",
"done": "Done",
"cancelled": "Cancelled",
"blocked": "Blocked"
},
"priority": {
"low": "Low",
"medium": "Medium",
"high": "High",
"urgent": "Urgent"
},
"views": {
"list": "List",
"kanban": "Kanban",
"calendar": "Calendar",
"gantt": "Gantt",
"timeline": "Timeline"
},
"filters": {
"all": "All Tasks",
"myTasks": "My Tasks",
"unassigned": "Unassigned",
"overdue": "Overdue",
"dueThisWeek": "Due This Week",
"highPriority": "High Priority",
"recentlyUpdated": "Recently Updated"
},
"sort": {
"sortBy": "Sort by",
"dueDate": "Due Date",
"priority": "Priority",
"status": "Status",
"title": "Title",
"createdAt": "Created At",
"updatedAt": "Updated At",
"ascending": "Ascending",
"descending": "Descending"
},
"actions": {
"assign": "Assign",
"reassign": "Reassign",
"changeStatus": "Change Status",
"changePriority": "Change Priority",
"addSubtask": "Add Subtask",
"addComment": "Add Comment",
"addAttachment": "Add Attachment",
"addWatcher": "Add Watcher",
"removeWatcher": "Remove Watcher",
"duplicate": "Duplicate Task",
"archive": "Archive",
"restore": "Restore",
"moveToProject": "Move to Project"
},
"subtasks": {
"title": "Subtasks",
"add": "Add Subtask",
"placeholder": "Enter subtask title",
"completed": "{{count}} / {{total}} completed",
"empty": "No subtasks"
},
"comments": {
"title": "Comments",
"add": "Add Comment",
"placeholder": "Write your comment...",
"edited": "edited",
"delete": "Delete Comment",
"confirmDelete": "Are you sure you want to delete this comment?",
"empty": "No comments yet",
"reply": "Reply"
},
"attachments": {
"title": "Attachments",
"add": "Add Attachment",
"upload": "Upload File",
"dragDrop": "Drag and drop files here or click to upload",
"maxSize": "Max file size: {{size}}MB",
"downloading": "Downloading...",
"empty": "No attachments"
},
"blockers": {
"title": "Blockers",
"add": "Add Blocker",
"blockedBy": "Blocked by",
"blocking": "Blocking",
"remove": "Remove blocker",
"empty": "No blockers"
},
"messages": {
"created": "Task created",
"updated": "Task updated",
"deleted": "Task deleted",
"statusChanged": "Status changed to \"{{status}}\"",
"assigned": "Assigned to {{assignee}}",
"unassigned": "Unassigned",
"commentAdded": "Comment added",
"attachmentUploaded": "Attachment uploaded",
"confirmDelete": "Are you sure you want to delete this task? This action cannot be undone."
},
"empty": {
"title": "No Tasks",
"description": "There are no tasks yet. Create your first task to get started!",
"filtered": "No tasks match your filters"
}
}

View File

@@ -0,0 +1,42 @@
{
"title": "Workload",
"subtitle": "View team member workload distribution",
"filters": {
"project": "Project",
"allProjects": "All Projects",
"dateRange": "Date Range",
"thisWeek": "This Week",
"thisMonth": "This Month",
"custom": "Custom"
},
"metrics": {
"totalHours": "Total Hours",
"assignedTasks": "Assigned Tasks",
"completedTasks": "Completed Tasks",
"overdueTasks": "Overdue Tasks",
"utilization": "Utilization"
},
"chart": {
"hoursPerDay": "Hours per Day",
"taskDistribution": "Task Distribution",
"byProject": "By Project",
"byPriority": "By Priority"
},
"team": {
"title": "Team Members",
"member": "Member",
"allocated": "Allocated",
"available": "Available",
"overloaded": "Overloaded",
"underutilized": "Underutilized"
},
"status": {
"balanced": "Balanced",
"overloaded": "Overloaded",
"underutilized": "Underutilized"
},
"empty": {
"title": "No Workload Data",
"description": "Not enough data to display workload"
}
}