Skip to content

Commit 87f4695

Browse files
authored
feature: initial realization of internationalization of the settings (#327)
* feature: initial realization of internationalization of the ModelConfig and SystemParam pages * fix: improving the internationalization of settings
1 parent 69c4ae1 commit 87f4695

File tree

6 files changed

+421
-106
lines changed

6 files changed

+421
-106
lines changed

frontend/src/i18n/locales/en/common.json

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@
577577
},
578578
"common": {
579579
"actions": {
580-
"createTask": "Create Task"
580+
"createTask": "Create Task",
581+
"actions": "Actions"
581582
},
582583
"placeholders": {
583584
"empty": "-"
@@ -1910,5 +1911,155 @@
19101911
"language": "Language",
19111912
"function": "Function"
19121913
}
1914+
},
1915+
"settings": {
1916+
"title": "Settings",
1917+
"tabs": {
1918+
"modelAccess": "Model Access",
1919+
"systemConfig": "System Config",
1920+
"webhook": "Webhook",
1921+
"notAvailable": "Not available yet"
1922+
},
1923+
"modelAccess": {
1924+
"title": "Model Access",
1925+
"addModel": "Add Model",
1926+
"searchPlaceholder": "Search model description...",
1927+
"columns": {
1928+
"modelName": "Model Name",
1929+
"createdAt": "Created At",
1930+
"updatedAt": "Updated At",
1931+
"provider": "Provider",
1932+
"type": "Type"
1933+
},
1934+
"filters": {
1935+
"provider": "Provider",
1936+
"type": "Type",
1937+
"all": "All"
1938+
},
1939+
"modal": {
1940+
"titleAdd": "Add Model",
1941+
"titleEdit": "Edit Model",
1942+
"form": {
1943+
"provider": "Service Provider",
1944+
"providerPlaceholder": "Select service provider",
1945+
"providerRequired": "Please select service provider",
1946+
"baseUrl": "API Endpoint",
1947+
"baseUrlPlaceholder": "Enter API endpoint, e.g.: https://api.openai.com",
1948+
"baseUrlRequired": "Please enter API endpoint",
1949+
"baseUrlInvalid": "Please enter a valid URL, must start with http:// or https://",
1950+
"modelName": "Model Name",
1951+
"modelNamePlaceholder": "Enter model name",
1952+
"modelNameRequired": "Please enter model name",
1953+
"modelNameTooltip": "Please enter model name",
1954+
"apiKey": "API Key",
1955+
"apiKeyPlaceholder": "Enter or generate API key",
1956+
"apiKeyRequired": "Please enter API key",
1957+
"type": "Model Type",
1958+
"typePlaceholder": "Select model type",
1959+
"typeRequired": "Please select model type",
1960+
"isDefault": "Set as Default",
1961+
"isDefaultTooltip": "When there is only one model service under the model type, it will be automatically set as default value."
1962+
}
1963+
},
1964+
"messages": {
1965+
"addSuccess": "Model added successfully",
1966+
"error": "{message}: {detail}"
1967+
}
1968+
},
1969+
"systemConfig": {
1970+
"title": "System Configuration",
1971+
"refresh": "Refresh",
1972+
"columns": {
1973+
"paramName": "Parameter Name",
1974+
"paramValue": "Parameter Value",
1975+
"description": "Description",
1976+
"isEnabled": "Enabled"
1977+
},
1978+
"placeholders": {
1979+
"selectValue": "Please select value"
1980+
}
1981+
},
1982+
"webhook": {
1983+
"title": "Webhook Configuration",
1984+
"addWebhook": "Add Webhook",
1985+
"events": {
1986+
"projectManagement": "Project Management",
1987+
"taskManagement": "Task Management",
1988+
"annotationManagement": "Annotation Management",
1989+
"modelManagement": "Model Management",
1990+
"predictionManagement": "Prediction Management"
1991+
},
1992+
"eventTypes": {
1993+
"projectCreated": {
1994+
"name": "Project Created",
1995+
"description": "Triggered when a new project is created"
1996+
},
1997+
"projectUpdated": {
1998+
"name": "Project Updated",
1999+
"description": "Triggered when project information is modified"
2000+
},
2001+
"projectDeleted": {
2002+
"name": "Project Deleted",
2003+
"description": "Triggered when a project is deleted"
2004+
},
2005+
"taskCreated": {
2006+
"name": "Task Created",
2007+
"description": "Triggered when a new task is created"
2008+
},
2009+
"taskUpdated": {
2010+
"name": "Task Updated",
2011+
"description": "Triggered when task status or content is updated"
2012+
},
2013+
"taskCompleted": {
2014+
"name": "Task Completed",
2015+
"description": "Triggered when a task is marked as completed"
2016+
},
2017+
"annotationCreated": {
2018+
"name": "Annotation Created",
2019+
"description": "Triggered when a new annotation is created"
2020+
},
2021+
"annotationUpdated": {
2022+
"name": "Annotation Updated",
2023+
"description": "Triggered when an annotation is modified"
2024+
},
2025+
"annotationDeleted": {
2026+
"name": "Annotation Deleted",
2027+
"description": "Triggered when an annotation is deleted"
2028+
},
2029+
"modelTrained": {
2030+
"name": "Model Training Completed",
2031+
"description": "Triggered when model training task is completed"
2032+
},
2033+
"predictionCreated": {
2034+
"name": "Prediction Generated",
2035+
"description": "Triggered when a new prediction result is generated"
2036+
}
2037+
},
2038+
"status": {
2039+
"active": "Active",
2040+
"inactive": "Disabled"
2041+
},
2042+
"details": {
2043+
"events": "Events:",
2044+
"secret": "Secret:",
2045+
"retry": "Retry:"
2046+
},
2047+
"modal": {
2048+
"title": "Add Webhook",
2049+
"form": {
2050+
"name": "Webhook Name",
2051+
"namePlaceholder": "Enter webhook name",
2052+
"retryCount": "Retry Count",
2053+
"url": "Webhook URL",
2054+
"urlPlaceholder": "https://your-domain.com/webhook",
2055+
"secret": "Secret Key",
2056+
"secretPlaceholder": "Key for verifying webhook requests",
2057+
"selectEvents": "Select Events"
2058+
}
2059+
},
2060+
"buttons": {
2061+
"create": "Create Webhook"
2062+
}
2063+
}
19132064
}
19142065
}

frontend/src/i18n/locales/zh/common.json

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@
577577
},
578578
"common": {
579579
"actions": {
580-
"createTask": "创建任务"
580+
"createTask": "创建任务",
581+
"actions": "操作"
581582
},
582583
"placeholders": {
583584
"empty": "-"
@@ -1910,5 +1911,155 @@
19101911
"language": "语言",
19111912
"function": "功能"
19121913
}
1914+
},
1915+
"settings": {
1916+
"title": "设置",
1917+
"tabs": {
1918+
"modelAccess": "模型接入",
1919+
"systemConfig": "参数配置",
1920+
"webhook": "Webhook",
1921+
"notAvailable": "暂未开放"
1922+
},
1923+
"modelAccess": {
1924+
"title": "模型接入",
1925+
"addModel": "添加模型",
1926+
"searchPlaceholder": "搜索模型描述...",
1927+
"columns": {
1928+
"modelName": "模型名称",
1929+
"createdAt": "创建时间",
1930+
"updatedAt": "更新时间",
1931+
"provider": "模型提供商",
1932+
"type": "模型类型"
1933+
},
1934+
"filters": {
1935+
"provider": "模型提供商",
1936+
"type": "模型类型",
1937+
"all": "全部"
1938+
},
1939+
"modal": {
1940+
"titleAdd": "添加模型",
1941+
"titleEdit": "编辑模型",
1942+
"form": {
1943+
"provider": "服务提供商",
1944+
"providerPlaceholder": "选择服务提供商",
1945+
"providerRequired": "请选择服务提供商",
1946+
"baseUrl": "接口地址",
1947+
"baseUrlPlaceholder": "输入接口地址,如:https://api.openai.com",
1948+
"baseUrlRequired": "请输入接口地址",
1949+
"baseUrlInvalid": "请输入有效的URL地址,必须以http://或https://开头",
1950+
"modelName": "模型名称",
1951+
"modelNamePlaceholder": "输入模型名称",
1952+
"modelNameRequired": "请输入模型名称",
1953+
"modelNameTooltip": "请输入模型名称",
1954+
"apiKey": "API密钥",
1955+
"apiKeyPlaceholder": "输入或生成API密钥",
1956+
"apiKeyRequired": "请输入API密钥",
1957+
"type": "模型类型",
1958+
"typePlaceholder": "选择模型类型",
1959+
"typeRequired": "请选择模型类型",
1960+
"isDefault": "设为默认",
1961+
"isDefaultTooltip": "当模型类型下仅有一个模型服务时,自动将其设为默认值。"
1962+
}
1963+
},
1964+
"messages": {
1965+
"addSuccess": "模型添加成功",
1966+
"error": "{message}:{detail}"
1967+
}
1968+
},
1969+
"systemConfig": {
1970+
"title": "系统参数配置",
1971+
"refresh": "刷新",
1972+
"columns": {
1973+
"paramName": "参数名",
1974+
"paramValue": "参数值",
1975+
"description": "描述",
1976+
"isEnabled": "是否启用"
1977+
},
1978+
"placeholders": {
1979+
"selectValue": "请选择值"
1980+
}
1981+
},
1982+
"webhook": {
1983+
"title": "Webhook 配置",
1984+
"addWebhook": "新增Webhook",
1985+
"events": {
1986+
"projectManagement": "项目管理",
1987+
"taskManagement": "任务管理",
1988+
"annotationManagement": "标注管理",
1989+
"modelManagement": "模型管理",
1990+
"predictionManagement": "预测管理"
1991+
},
1992+
"eventTypes": {
1993+
"projectCreated": {
1994+
"name": "项目创建",
1995+
"description": "新项目被创建时触发"
1996+
},
1997+
"projectUpdated": {
1998+
"name": "项目更新",
1999+
"description": "项目信息被修改时触发"
2000+
},
2001+
"projectDeleted": {
2002+
"name": "项目删除",
2003+
"description": "项目被删除时触发"
2004+
},
2005+
"taskCreated": {
2006+
"name": "任务创建",
2007+
"description": "新任务被创建时触发"
2008+
},
2009+
"taskUpdated": {
2010+
"name": "任务更新",
2011+
"description": "任务状态或内容被更新时触发"
2012+
},
2013+
"taskCompleted": {
2014+
"name": "任务完成",
2015+
"description": "任务被标记为完成时触发"
2016+
},
2017+
"annotationCreated": {
2018+
"name": "标注创建",
2019+
"description": "新标注被创建时触发"
2020+
},
2021+
"annotationUpdated": {
2022+
"name": "标注更新",
2023+
"description": "标注被修改时触发"
2024+
},
2025+
"annotationDeleted": {
2026+
"name": "标注删除",
2027+
"description": "标注被删除时触发"
2028+
},
2029+
"modelTrained": {
2030+
"name": "模型训练完成",
2031+
"description": "模型训练任务完成时触发"
2032+
},
2033+
"predictionCreated": {
2034+
"name": "预测生成",
2035+
"description": "新预测结果生成时触发"
2036+
}
2037+
},
2038+
"status": {
2039+
"active": "启用",
2040+
"inactive": "禁用"
2041+
},
2042+
"details": {
2043+
"events": "事件:",
2044+
"secret": "Secret:",
2045+
"retry": "重试:"
2046+
},
2047+
"modal": {
2048+
"title": "新增 Webhook",
2049+
"form": {
2050+
"name": "Webhook名称",
2051+
"namePlaceholder": "输入Webhook名称",
2052+
"retryCount": "重试次数",
2053+
"url": "Webhook URL",
2054+
"urlPlaceholder": "https://your-domain.com/webhook",
2055+
"secret": "Secret Key",
2056+
"secretPlaceholder": "用于验证Webhook请求的密钥",
2057+
"selectEvents": "选择事件"
2058+
}
2059+
},
2060+
"buttons": {
2061+
"create": "创建Webhook"
2062+
}
2063+
}
19132064
}
19142065
}

0 commit comments

Comments
 (0)