Skip to content

Commit 54a6350

Browse files
authored
realization of internationalization of data processing (#324)
* feature: initial realization of internationalization of data processing * fix: whether the code in the return body is equal to 200 is not used as a sign to determine whether the interface response is successful. * fix: improving the internationalization of data cleaning * fix: improving the internationalization of data cleaning * fix: improving the internationalization of data cleaning * fix: improving the internationalization of data cleaning * fix: improving the internationalization of data cleaning
1 parent 9034bc3 commit 54a6350

25 files changed

+767
-323
lines changed

frontend/src/hooks/useTagConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function useTagConfig(includeLabelingOnly: boolean = true): UseTagConfigR
2929
setError(null);
3030
try {
3131
const response = await getTagConfigUsingGet();
32-
if (response.code === 200 && response.data) {
32+
if (response.data) {
3333
const tagConfig: LabelStudioTagConfig = response.data;
3434
setConfig(tagConfig);
3535

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

Lines changed: 230 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@
422422
"edgeTypeSynthesis": "Data Synthesis",
423423
"edgeTypeRatio": "Data Ratio",
424424
"edgeTypeDefault": "Processing Flow",
425-
"edgeTypeDefaultLabel": "Processing Flow",
426425
"detailBasicInfo": "Basic Information",
427426
"detailId": "ID:",
428427
"detailName": "Name:",
@@ -580,9 +579,6 @@
580579
"actions": {
581580
"createTask": "Create Task"
582581
},
583-
"table": {
584-
"file": "files"
585-
},
586582
"placeholders": {
587583
"empty": "-"
588584
},
@@ -999,20 +995,20 @@
999995
"moreActions": "More Actions"
1000996
},
1001997
"confirm": {
1002-
"deleteTaskTitle": "Confirm delete annotation task '{name}'?",
998+
"deleteTaskTitle": "Confirm delete annotation task '{{name}}'?",
1003999
"deleteTaskContent1": "Deleting the annotation task will not delete the corresponding dataset.",
10041000
"deleteTaskContent2": "If you want to keep current annotation results, please sync before deleting.",
1005-
"deleteAutoTaskTitle": "Confirm delete auto annotation task '{name}'?",
1001+
"deleteAutoTaskTitle": "Confirm delete auto annotation task '{{name}}'?",
10061002
"deleteAutoTaskContent": "After deleting the task, the generated annotation results will not be deleted.",
10071003
"deleteOkText": "Delete",
10081004
"deleteCancelText": "Cancel",
1009-
"syncTitle": "Confirm sync annotation task '{name}'?",
1005+
"syncTitle": "Confirm sync annotation task '{{name}}'?",
10101006
"syncContent1": "The file list in the annotation project will be consistent with the dataset, and differences will be corrected.",
10111007
"syncContent2": "Labels in the annotation project will be merged with labels in the dataset, conflicts will be based on the latest content.",
10121008
"syncOkText": "Sync",
10131009
"syncCancelText": "Cancel",
1014-
"batchSyncTitle": "Confirm sync {count} selected annotation tasks?",
1015-
"batchDeleteTitle": "Confirm delete {count} selected annotation tasks?"
1010+
"batchSyncTitle": "Confirm sync {{count}} selected annotation tasks?",
1011+
"batchDeleteTitle": "Confirm delete {{count}} selected annotation tasks?"
10161012
},
10171013
"messages": {
10181014
"deleteSuccess": "Mapping deleted successfully",
@@ -1032,7 +1028,7 @@
10321028
"autoTaskNotFound": "Corresponding auto annotation task not found",
10331029
"taskNotFound": "Corresponding annotation task not found",
10341030
"fetchAutoTasksFailed": "Failed to fetch auto annotation tasks",
1035-
"syncToDbTitle": "Confirm sync '{name}' annotations from Label Studio to database?",
1031+
"syncToDbTitle": "Confirm sync '{{name}}' annotations from Label Studio to database?",
10361032
"syncToDbContent1": "This operation will override current file tags and annotation information based on task data in Label Studio.",
10371033
"syncToDbContent2": "After sync, you can view latest tags and annotations in dataset file details.",
10381034
"syncToDbLoading": "Syncing annotations from Label Studio to database...",
@@ -1061,7 +1057,7 @@
10611057
"manualAnnotation": "Manual Annotation",
10621058
"autoAnnotation": "Auto Annotation",
10631059
"allCategories": "All Categories",
1064-
"categoriesCount": "{count} categories",
1060+
"categoriesCount": "{{count}} categories",
10651061
"editDataset": "Edit Dataset",
10661062
"editTask": "Edit Task"
10671063
},
@@ -1087,8 +1083,8 @@
10871083
"selectTemplate": "Please select annotation template",
10881084
"noTemplatesFound": "No matching templates found, please create templates in 'Annotation Templates' page",
10891085
"selectDatasetAndFiles": "Select Dataset and Files",
1090-
"currentDataset": "Current dataset: {name} - Selected {count} files",
1091-
"currentDatasetImages": "Current dataset: {name} - Selected {count} image files",
1086+
"currentDataset": "Current dataset: {{name}} - Selected {{count}} files",
1087+
"currentDatasetImages": "Current dataset: {{name}} - Selected {{count}} image files",
10921088
"modelSize": "Model Size",
10931089
"modelSizeRequired": "Please select model size",
10941090
"confThreshold": "Confidence Threshold",
@@ -1190,7 +1186,7 @@
11901186
"moreActions": "More Actions"
11911187
},
11921188
"confirm": {
1193-
"deleteTitle": "Confirm delete auto annotation task '{name}'?",
1189+
"deleteTitle": "Confirm delete auto annotation task '{{name}}'?",
11941190
"deleteContent": "After deleting the task, the generated annotation results will not be deleted.",
11951191
"deleteOkText": "Delete",
11961192
"deleteCancelText": "Cancel"
@@ -1210,7 +1206,7 @@
12101206
"editDataset": {
12111207
"title": "Edit Dataset",
12121208
"description": "Modify dataset files for this task",
1213-
"selectedCount": "Selected {count} files",
1209+
"selectedCount": "Selected {{count}} files",
12141210
"cancel": "Cancel",
12151211
"save": "Save",
12161212
"loading": "Saving...",
@@ -1271,5 +1267,224 @@
12711267
"reviewCount": "Pending Review"
12721268
}
12731269
}
1270+
},
1271+
"dataCleansing": {
1272+
"title": "Data Processing",
1273+
"tabs": {
1274+
"taskList": "Task List",
1275+
"templateManagement": "Template Management"
1276+
},
1277+
"actions": {
1278+
"createTask": "Create Task",
1279+
"createTemplate": "Create Template",
1280+
"updateTask": "Execute Task",
1281+
"updateTemplate": "Update Template",
1282+
"startTask": "Execute Task",
1283+
"pauseTask": "Pause Task",
1284+
"deleteTask": "Delete Task",
1285+
"deleteTemplate": "Delete Template",
1286+
"refreshTask": "Refresh Task",
1287+
"refreshTemplate": "Refresh Template",
1288+
"cancel": "Cancel",
1289+
"confirm": "Confirm",
1290+
"back": "Back",
1291+
"previous": "Previous",
1292+
"next": "Next",
1293+
"clear": "Clear",
1294+
"save": "Save",
1295+
"start": "Start",
1296+
"pause": "Pause",
1297+
"compare": "Compare",
1298+
"download": "Download",
1299+
"delete": "Delete",
1300+
"batchDownload": "Batch Download",
1301+
"edit": "Edit",
1302+
"selectAll": "Select All",
1303+
"search": "Search",
1304+
"reset": "Reset",
1305+
"config": "Parameter Configuration",
1306+
"selectOperatorConfig": "Please select an operator for parameter configuration"
1307+
},
1308+
"steps": {
1309+
"basicInfo": "Basic Info",
1310+
"operatorOrchestration": "Operator Orchestration"
1311+
},
1312+
"task": {
1313+
"columns": {
1314+
"taskName": "Task Name",
1315+
"taskId": "Task ID",
1316+
"srcDataset": "Source Dataset",
1317+
"destDataset": "Target Dataset",
1318+
"status": "Status",
1319+
"progress": "Progress",
1320+
"processedFiles": "Processed Files",
1321+
"totalFiles": "Total Files",
1322+
"duration": "Duration",
1323+
"startTime": "Start Time",
1324+
"endTime": "End Time",
1325+
"createdAt": "Created At",
1326+
"dataSizeChange": "Data Size Change",
1327+
"actions": "Actions"
1328+
},
1329+
"form": {
1330+
"name": "Name",
1331+
"namePlaceholder": "Enter task name",
1332+
"description": "Description",
1333+
"descriptionPlaceholder": "Describe the task goals and requirements",
1334+
"srcDataset": "Source Dataset",
1335+
"srcDatasetPlaceholder": "Please select source dataset",
1336+
"destDatasetName": "Target Dataset Name",
1337+
"destDatasetNamePlaceholder": "Enter or select target dataset name",
1338+
"destDatasetType": "Target Dataset Type",
1339+
"destDatasetTypeRequired": "Please select target dataset type"
1340+
},
1341+
"sections": {
1342+
"taskInfo": "Task Info",
1343+
"dataSourceSelection": "Data Source Selection"
1344+
},
1345+
"messages": {
1346+
"taskCreated": "Task created successfully",
1347+
"taskStarted": "Task started successfully",
1348+
"taskPaused": "Task paused successfully",
1349+
"taskDeleted": "Task deleted successfully",
1350+
"taskDetailFailed": "Failed to fetch task details",
1351+
"fetchTaskResultFailed": "Failed to fetch task results",
1352+
"fetchTaskLogFailed": "Failed to fetch task logs"
1353+
}
1354+
},
1355+
"template": {
1356+
"columns": {
1357+
"templateName": "Template Name",
1358+
"templateId": "Template ID",
1359+
"operatorCount": "Operator Count"
1360+
},
1361+
"form": {
1362+
"name": "Template Name",
1363+
"namePlaceholder": "Enter template name",
1364+
"nameRequired": "Please enter template name",
1365+
"description": "Template Description",
1366+
"descriptionPlaceholder": "Describe the template purpose and features"
1367+
},
1368+
"messages": {
1369+
"templateCreated": "Template created successfully",
1370+
"templateUpdated": "Template updated successfully",
1371+
"templateDeleted": "Template deleted successfully",
1372+
"templateDetailFailed": "Failed to fetch task details"
1373+
}
1374+
},
1375+
"detail": {
1376+
"tabs": {
1377+
"basicInfo": "Basic Info",
1378+
"operators": "Operators",
1379+
"files": "Files",
1380+
"logs": "Logs"
1381+
},
1382+
"statistics": {
1383+
"totalDuration": "Total Duration",
1384+
"successFiles": "Success Files",
1385+
"failedFiles": "Failed Files",
1386+
"successRate": "Success Rate",
1387+
"operatorCount": "Operator Count"
1388+
},
1389+
"fileTable": {
1390+
"fileName": "File Name",
1391+
"processedFileName": "Processed File Name",
1392+
"fileType": "File Type",
1393+
"processedFileType": "Processed File Type",
1394+
"beforeSize": "Before Size",
1395+
"afterSize": "After Size",
1396+
"status": "Status",
1397+
"actions": "Actions",
1398+
"searchFileName": "Search file name",
1399+
"searchFileType": "Search file type",
1400+
"selectFiles": "{{count}} files selected",
1401+
"notCompleted": "Not Completed",
1402+
"downloadNotAvailable": "Not Available Yet",
1403+
"compareDialogTitle": "File Comparison - {{fileName}}",
1404+
"beforeProcessing": "Before Processing",
1405+
"afterProcessing": "After Processing",
1406+
"originalFilePreview": "Original File Preview",
1407+
"processedFilePreview": "Processed File Preview",
1408+
"size": "Size",
1409+
"fileFormat": "File Format",
1410+
"processingEffect": "Processing Effect Comparison",
1411+
"sizeOptimization": "File Size Optimization",
1412+
"reduced": "Reduced by {{percent}}%"
1413+
},
1414+
"logTable": {
1415+
"selectRun": "Select Run",
1416+
"currentDisplay": "Current Display: {{num}}th Run",
1417+
"nthRun": "{{num}}th Run",
1418+
"noLogs": "No logs available for this task"
1419+
},
1420+
"operatorTable": {
1421+
"serialNumber": "Serial Number",
1422+
"operatorName": "Operator Name",
1423+
"startTime": "Start Time",
1424+
"endTime": "End Time",
1425+
"duration": "Duration",
1426+
"processedFiles": "Processed Files",
1427+
"successRate": "Success Rate",
1428+
"status": "Status",
1429+
"searchOperatorName": "Search operator name",
1430+
"completed": "Completed",
1431+
"failed": "Failed",
1432+
"running": "Running",
1433+
"title": "Operator Execution Report",
1434+
"description": "Detailed execution status of each operator"
1435+
},
1436+
"basicInfo": {
1437+
"executionSummary": "Execution Summary",
1438+
"basicInformation": "Basic Information",
1439+
"processingProgress": "Processing Progress",
1440+
"taskId": "Task ID",
1441+
"taskName": "Task Name",
1442+
"srcDataset": "Source Dataset",
1443+
"destDataset": "Target Dataset",
1444+
"startTime": "Start Time",
1445+
"description": "Task Description",
1446+
"endTime": "End Time",
1447+
"retryCount": "Retry Count",
1448+
"completed": "Completed: {{count}}",
1449+
"processing": "Processing: {{count}}",
1450+
"failed": "Failed: {{count}}"
1451+
},
1452+
"breadcrumb": {
1453+
"dataProcessing": "Data Processing",
1454+
"taskDetail": "Task Detail",
1455+
"templateDetail": "Template Detail"
1456+
}
1457+
},
1458+
"operatorLibrary": {
1459+
"title": "Operator Library",
1460+
"searchPlaceholder": "Search operator name...",
1461+
"selectCategory": "Select Category",
1462+
"showFavoritesOnly": "Show Favorites Only",
1463+
"selectAll": "Select All",
1464+
"noMatchFound": "No matching operators found"
1465+
},
1466+
"operatorOrchestration": {
1467+
"title": "Operator Orchestration",
1468+
"clear": "Clear",
1469+
"selectTemplate": "Select Template",
1470+
"startBuilding": "Start building your operator workflow",
1471+
"dragTip": "Drag operators from the left library here, or click to add"
1472+
},
1473+
"placeholders": {
1474+
"searchTaskName": "Search task name, description",
1475+
"searchTemplateName": "Search template name, description"
1476+
},
1477+
"processFlow": {
1478+
"start": "Start",
1479+
"selectDataset": "Select Dataset",
1480+
"complete": "Complete"
1481+
},
1482+
"status": {
1483+
"completed": "Completed",
1484+
"failed": "Failed",
1485+
"running": "Running",
1486+
"pending": "Pending",
1487+
"stopped": "Stopped"
1488+
}
12741489
}
12751490
}

0 commit comments

Comments
 (0)