diff --git a/src/i18n.ts b/src/i18n.ts index f740d0d3..1a6e1766 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -26,6 +26,7 @@ export interface Translations { modelBreakdown: string; dailyBreakdown: string; monthlyBreakdown: string; + hourlyBreakdown: string; date: string; yesterday: string; dataDirectory: string; @@ -68,6 +69,7 @@ const translations: Record = { modelBreakdown: 'Model Usage', dailyBreakdown: 'Daily Usage', monthlyBreakdown: 'Monthly Usage', + hourlyBreakdown: 'Hourly Usage', date: 'Date', yesterday: 'Yesterday', dataDirectory: 'Data Directory', @@ -108,6 +110,7 @@ const translations: Record = { modelBreakdown: '模型使用量', dailyBreakdown: '每日使用量', monthlyBreakdown: '每月使用量', + hourlyBreakdown: '每小時使用量', date: '日期', yesterday: '昨日', dataDirectory: '資料目錄', @@ -148,6 +151,7 @@ const translations: Record = { modelBreakdown: '模型使用量', dailyBreakdown: '每日使用量', monthlyBreakdown: '每月使用量', + hourlyBreakdown: '每小时使用量', date: '日期', yesterday: '昨日', dataDirectory: '数据目录', @@ -188,6 +192,7 @@ const translations: Record = { modelBreakdown: 'モデル別使用量', dailyBreakdown: '日別使用量', monthlyBreakdown: '月別使用量', + hourlyBreakdown: '時間別使用量', date: '日付', yesterday: '昨日', dataDirectory: 'データディレクトリ', @@ -228,6 +233,7 @@ const translations: Record = { modelBreakdown: '모델별 사용량', dailyBreakdown: '일별 사용량', monthlyBreakdown: '월별 사용량', + hourlyBreakdown: '시간별 사용량', date: '날짜', yesterday: '어제', dataDirectory: '데이터 디렉토리', diff --git a/src/webview.ts b/src/webview.ts index dfbcf77c..e713d9e4 100644 --- a/src/webview.ts +++ b/src/webview.ts @@ -315,7 +315,7 @@ export class UsageWebviewProvider { }); hourlyBreakdown = '
' + - '

每小時使用量

' + + '

' + I18n.t.popup.hourlyBreakdown + '

' + '
' + '' + '' + @@ -1648,7 +1648,7 @@ function renderHourlyData(hourlyData, date) { } let html = '
'; - html += '

' + new Date(date).toLocaleDateString() + ' 每小時使用量

'; + html += '

' + new Date(date).toLocaleDateString() + ' ' + I18n.t.popup.hourlyBreakdown + '

'; // Chart tabs html += '
';