Translate remaining Chinese JSDoc and CSS comments to English

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 20:53:00 +08:00
parent d16cc46604
commit 8d358516b8
9 changed files with 48 additions and 51 deletions

View File

@@ -296,7 +296,7 @@ function handleScroll(event) {
</script>
<style scoped>
@reference "../../../assets/tailwind.css";
/* 進度條顏色 */
/* Progress bar color */
:deep(.p-progressbar .p-progressbar-value) {
@apply bg-primary
}
@@ -311,7 +311,7 @@ function handleScroll(event) {
:deep(.p-datatable .p-datatable-tbody > tr > td) {
@apply border-neutral-500 !border-t-0 text-center
}
/* 標題置中 */
/* Center header title */
:deep(.p-column-header-content) {
@apply justify-center
}

View File

@@ -396,7 +396,7 @@ onMounted(() => {
overflow-wrap: break-word;
word-wrap: break-word;
}
/* datatable head 置中 */
/* Center datatable header */
:deep(.p-column-header-content) {
@apply justify-center
}

View File

@@ -292,7 +292,7 @@ async function fetchData() {
<style scoped>
@reference "../../../assets/tailwind.css";
/* 進度條顏色 */
/* Progress bar color */
:deep(.p-progressbar .p-progressbar-value) {
@apply bg-primary
}
@@ -313,7 +313,7 @@ async function fetchData() {
overflow-wrap: break-word;
word-wrap: break-word;
}
/* datatable head 置中 */
/* Center datatable header */
:deep(.p-column-header-content) {
@apply justify-center
}

View File

@@ -42,7 +42,7 @@ export const useCompareStore = defineStore('compareStore', {
},
/**
* fetch discover api, get stats.
* @param {string} type 'log' | 'filter',可傳入 'log' 'filter'
* @param {string} type - The file type ('log' or 'filter').
* @param {number} id log or filter ID
*/
async getStateData(type, id) {

View File

@@ -227,7 +227,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
},
/**
* Creates a new temporary check for a log.
* @param {object} data 送給後端的 data
* @param {object} data - The request payload for the backend.
*/
async addConformanceCheckId(data) {
const logId = this.conformanceLogId;
@@ -256,7 +256,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
},
/**
* Get the Temporary Log Conformance Report
* @param {boolean} getRouteFile 是否為了取得 route file 而呼叫?使用在非 Conformance page
* @param {boolean} getRouteFile - Whether called to get the route file (used outside the Conformance page).
*/
async getConformanceReport(getRouteFile = false) {
const logTempCheckId = this.conformanceLogTempCheckId;
@@ -291,7 +291,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
},
/**
* Get the detail of a temporary log conformance issue.
* @param {number} issueNo Issues 編號
* @param {number} issueNo - The issue number.
*/
async getConformanceIssue(issueNo) {
const logTempCheckId = this.conformanceLogTempCheckId;
@@ -323,9 +323,9 @@ export const useConformanceStore = defineStore('conformanceStore', {
},
/**
* Get the Trace Details of a Temporary Log Conformance lssue.
* @param {number} issueNo Issues 編號
* @param {number} traceId, Trace 編號
* @param {number} start Trace 要從哪個編號開始載入
* @param {number} issueNo - The issue number.
* @param {number} traceId - The trace ID.
* @param {number} start - The starting index for loading traces.
*/
async getConformanceTraceDetail(issueNo, traceId, start) {
const logTempCheckId = this.conformanceLogTempCheckId;
@@ -363,7 +363,7 @@ export const useConformanceStore = defineStore('conformanceStore', {
},
/**
* Get the Details of a Temporary Log Conformance Loop.
* @param {number} loopNo loop 編號
* @param {number} loopNo - The loop number.
*/
async getConformanceLoop(loopNo) {
const logTempCheckId = this.conformanceLogTempCheckId;
@@ -387,9 +387,9 @@ export const useConformanceStore = defineStore('conformanceStore', {
},
/**
* Get the Trace Details of a Temporary Log Conformance Loops.
* @param {number} loopNo loop 編號
* @param {number} traceId, Trace 編號
* @param {number} start Trace 要從哪個編號開始載入
* @param {number} loopNo - The loop number.
* @param {number} traceId - The trace ID.
* @param {number} start - The starting index for loading traces.
*/
async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
const logTempCheckId = this.conformanceLogTempCheckId;

View File

@@ -39,10 +39,10 @@ export const useCytoscapeStore = defineStore('cytoscapeStore', {
}),
actions: {
/**
* 儲存或更新單個節點的位置資訊。
* @param {string} id
* @param {object} position {x, y} position有兩個值x與y
* @param {string} direction 'TB' 'LR'
* Saves or updates the position of a single node.
* @param {string} id - The node ID.
* @param {{x: number, y: number}} position - The node position.
* @param {string} direction - Layout direction ('TB' or 'LR').
*/
saveNodePosition(nodeId: string, position: Position, direction: string) {
// 若是資訊曾經存在這張圖於localStorage中
@@ -64,8 +64,8 @@ export const useCytoscapeStore = defineStore('cytoscapeStore', {
this.savePositionsToStorage();
},
/**
* 從本地存儲中加載節點位置資訊。
* @param {string} direction 'TB' TopBotom; 'LR' LeftRight
* Loads node positions from local storage.
* @param {string} direction - Layout direction ('TB' or 'LR').
*/
loadPositionsFromStorage(direction: string) {
if (localStorage.getItem(SAVE_KEY_NAME) &&
@@ -76,7 +76,7 @@ export const useCytoscapeStore = defineStore('cytoscapeStore', {
}
},
/**
* 將節點位置資訊儲存到本地存儲中。
* Saves node positions to local storage.
*/
savePositionsToStorage() {
localStorage.setItem(SAVE_KEY_NAME, JSON.stringify(this.nodePositions));

View File

@@ -117,8 +117,8 @@ export const useFilesStore = defineStore('filesStore', {
};
},
/**
* Uploads a CSV log file. 第一階段上傳
* @param {Object} fromData 傳給後端的 Data
* Uploads a CSV log file (first stage).
* @param {Object} fromData - The form data to send to the backend.
*/
async upload(fromData) {
const api = '/api/logs/csv-uploads';
@@ -164,8 +164,8 @@ export const useFilesStore = defineStore('filesStore', {
}
},
/**
* Add a Log from an Uploaded CSV Log File. 第二階段上傳
* @param {Object} data 傳給後端的 Data
* Adds a log from an uploaded CSV log file (second stage).
* @param {Object} data - The request payload for the backend.
*/
async uploadLog(data) {
const uploadId = this.uploadId;
@@ -193,9 +193,9 @@ export const useFilesStore = defineStore('filesStore', {
},
/**
* Rename a Log
* @param { string } type log | filter | log-check | filter-check,傳入以上任一個。
* @param { number } id 檔案 ID
* @param { string } name file's name
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
* @param {number} id - The file ID.
* @param {string} name - The file name.
*/
async rename(type, id, fileName) {
// 先判斷有沒有 uploadLogId有就設定 id 和 type再判斷檔案型別。
@@ -232,8 +232,8 @@ export const useFilesStore = defineStore('filesStore', {
},
/**
* Get the Dependents of the files
* @param { string } type log | filter | log-check | filter-check
* @param { number } id 檔案 ID
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
* @param {number} id - The file ID.
*/
async getDependents(type, id) {
let api;
@@ -261,8 +261,8 @@ export const useFilesStore = defineStore('filesStore', {
},
/**
* Delete file
* @param { string } type log | filter | log-check | filter-check
* @param { number } id 檔案 ID
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
* @param {number} id - The file ID.
*/
async deleteFile(type, id) {
let api;
@@ -298,8 +298,8 @@ export const useFilesStore = defineStore('filesStore', {
}
},
/**
* Remove a Deletion Record,真刪除被 Admin 或被其他帳號刪除的檔案
* @param {number} id 檔案 ID
* Removes a deletion record permanently.
* @param {number} id - The file ID.
*/
async deletionRecord(id) {
let api = '';
@@ -317,9 +317,9 @@ export const useFilesStore = defineStore('filesStore', {
},
/**
* Download file as CSV
* @param { string } type log | filter | log-check | filter-check
* @param { number } id 檔案 ID
* @param { string } fileName file's name
* @param {string} type - The file type ('log', 'filter', 'log-check', or 'filter-check').
* @param {number} id - The file ID.
* @param {string} fileName - The file name.
*/
async downloadFileCSV(type, id, fileName) {
let api;

View File

@@ -133,8 +133,11 @@ export const useMapPathStore = defineStore('mapPathStore', {
this.insights = { ...insights };
await this.matchGraphPathWithInsightsPath();
},
/** 從start節點開始建立所有的path
* 於第二個參數逐漸推入節點,於第三個參數逐漸推入線段
/**
* Builds all paths from the start node using depth-first search.
* @param node - The current node.
* @param currentPathByNode - Accumulated nodes along the path.
* @param curPathByEdge - Accumulated edges along the path.
*/
depthFirstSearchCreatePath(node, currentPathByNode, curPathByEdge) {
const outgoingEdges = node.outgoers('edge');
@@ -155,14 +158,8 @@ export const useMapPathStore = defineStore('mapPathStore', {
}
},
/**
* 比對兩條Paths是否相等。
* 第一條path是透過depthFirstSearchCreatePath所建立
* 而第二條path是從後端給的insights物件而來其資料結構是簡單的array而已。
* 在每條path沿路據節點上的label之
* 字串來匹配這個path是屬於insights物件的哪一條path
* 其中用curButton去記憶住insights[INSIGHTS_FIELDS_AND_LABELS[i][0]]內文
* 而curButton[listIndex][nodeIndex]是用來確認是否跟depthFirstSearchCreatePath內的
* node.data('label')字串完全相等,也就是 activity 節點的文字
* Matches graph paths with insights paths by comparing
* node labels along each path to the insights data arrays.
*/
matchGraphPathWithInsightsPath() {
for (let whichPath = 0; whichPath < this.allPaths.length; whichPath++) {

View File

@@ -34,8 +34,8 @@ export const usePerformanceStore = defineStore('performanceStore', {
actions: {
/**
* Get Performance
* @param {string} type 'log' | 'filter',可傳入以上任一。
* @param {*} id 檔案 ID
* @param {string} type - The file type ('log' or 'filter').
* @param {number} id - The file ID.
*/
async getPerformance(type, id) {
let api = '';