fix(i18n,api): backfill missing token-monitoring keys and fix JWT expiry tz

- i18n: add models.searchProviders, monitoring.tabs.tokens and the
  monitoring.tokens.* block (incl. bucket.hour/day) to es-ES, ja-JP,
  ru-RU, th-TH, vi-VN and zh-Hant, which were missing them and failed
  the Check i18n Keys CI.
- api: generate_jwt_token built 'exp' from a naive datetime.now(), which
  PyJWT validates against UTC — in any timezone ahead of UTC the token
  was already expired at issue time. Use datetime.now(timezone.utc).
This commit is contained in:
RockChinQ
2026-06-13 05:26:18 -04:00
parent a2c6c8201b
commit a97d2040bb
7 changed files with 157 additions and 1 deletions
+26
View File
@@ -266,6 +266,7 @@ const jaJP = {
selectProvider: 'プロバイダーを選択',
requester: 'プロバイダータイプ',
selectRequester: 'プロバイダータイプを選択',
searchProviders: 'プロバイダーを検索...',
langbotModelsDescription: 'LangBot Space が提供するクラウドモデル',
credits: 'クレジット',
loginWithSpace: 'Space でログイン',
@@ -1210,6 +1211,7 @@ const jaJP = {
llmCalls: 'LLM呼び出し',
embeddingCalls: 'Embedding呼び出し',
modelCalls: 'モデル呼び出し',
tokens: 'トークン監視',
sessions: 'セッション分析',
feedback: 'ユーザーフィードバック',
errors: 'エラーログ',
@@ -1248,6 +1250,30 @@ const jaJP = {
avgDuration: '平均期間',
calls: '呼び出し',
},
tokens: {
totalTokens: '総トークン数',
inputTokens: '入力トークン',
outputTokens: '出力トークン',
avgPerCall: '平均 / 呼び出し',
throughput: 'スループット',
tokensPerSec: 'トークン/秒',
errorCalls: '失敗した呼び出し',
acrossCalls: '{{count}} 回の呼び出し',
ofTotal: '合計 {{count}} 回',
usageOverTime: 'トークン使用量の推移',
byModel: 'モデル別',
model: 'モデル',
calls: '呼び出し回数',
avgLatency: '平均レイテンシ',
noData: '選択した期間にトークン使用量がありません',
loadError: 'トークン統計の読み込みに失敗しました: {{error}}',
zeroTokenWarning:
'{{count}} 件の成功した呼び出しでトークン使用量が 0 と報告されました。通常これは上流プロバイダーが使用量情報を返さなかったことを意味します。モデルプロバイダーの設定を確認してください。',
bucket: {
hour: '時間単位',
day: '日単位',
},
},
embeddingCalls: {
title: 'Embedding呼び出し',
model: 'モデル',