Translate all Chinese comments and strings to English

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 20:03:19 +08:00
parent 7d5918837b
commit 1d621bf304
57 changed files with 499 additions and 499 deletions

View File

@@ -93,7 +93,7 @@ const contentClass = ref('!bg-neutral-100 border-t border-neutral-300 h-full');
const showTraceId = ref(null);
const infiniteData = ref(null);
const maxItems = ref(false);
const infiniteFinish = ref(true); // 無限滾動是否載入完成
const infiniteFinish = ref(true); // Whether infinite scroll loading is complete
const startNum = ref(0);
const processMap = ref({
nodes:[],
@@ -121,24 +121,24 @@ const traceList = computed(() => {
const caseData = computed(() => {
if(infiniteData.value !== null){
const data = JSON.parse(JSON.stringify(infiniteData.value)); // 深拷貝原始 cases 的內容
const data = JSON.parse(JSON.stringify(infiniteData.value)); // Deep copy the original cases data
data.forEach(item => {
item.facets.forEach((facet, index) => {
item[`fac_${index}`] = facet.value; // 建立新的 key-value pair
item[`fac_${index}`] = facet.value; // Create a new key-value pair
});
delete item.facets; // 刪除原本的 facets 屬性
delete item.facets; // Remove the original facets property
item.attributes.forEach((attribute, index) => {
item[`att_${index}`] = attribute.value; // 建立新的 key-value pair
item[`att_${index}`] = attribute.value; // Create a new key-value pair
});
delete item.attributes; // 刪除原本的 attributes 屬性
delete item.attributes; // Remove the original attributes property
})
return data;
}
});
const columnData = computed(() => {
const data = JSON.parse(JSON.stringify(props.cases)); // 深拷貝原始 cases 的內容
const data = JSON.parse(JSON.stringify(props.cases)); // Deep copy the original cases data
const facetName = facName => facName.trim().replace(/^(.)(.*)$/, (match, firstChar, restOfString) => firstChar.toUpperCase() + restOfString.toLowerCase());
const result = [
@@ -152,7 +152,7 @@ const columnData = computed(() => {
});
// watch
watch(() => props.listModal, (newValue) => { // 第一次打開 Modal 要繪圖
watch(() => props.listModal, (newValue) => { // Draw the chart when the modal is opened for the first time
if(newValue) createCy();
});
@@ -161,7 +161,7 @@ watch(() => props.taskSeq, (newValue) => {
});
watch(() => props.traceId, (newValue) => {
// 當 traceId 屬性變化時更新 showTraceId
// Update showTraceId when the traceId prop changes
showTraceId.value = newValue;
});
@@ -210,15 +210,15 @@ async function switchCaseData(id) {
if(props.category === 'issue') result = await conformanceStore.getConformanceTraceDetail(props.listNo, id, 0);
else if(props.category === 'loop') result = await conformanceStore.getConformanceLoopsTraceDetail(props.listNo, id, 0);
infiniteData.value = await result;
showTraceId.value = id; // getDetail 為了 case table 載入完再切換 showTraceId
showTraceId.value = id; // Set after getDetail so the case table finishes loading before switching showTraceId
}
/**
* Assembles the trace element nodes data for Cytoscape rendering.
*/
function setNodesData(){
// 避免每次渲染都重複累加
// Clear nodes to prevent accumulation on each render
processMap.value.nodes = [];
// 將 api call 回來的資料帶進 node
// Populate nodes with data returned from the API call
if(props.taskSeq !== null) {
props.taskSeq.forEach((node, index) => {
processMap.value.nodes.push({
@@ -252,7 +252,7 @@ function setEdgesData(){
});
});
};
// 關係線數量筆節點少一個
// The number of edges is one less than the number of nodes
processMap.value.edges.pop();
}
/**