From f1fda940477ee05ec7cf8ff8c36b0b306123bec9 Mon Sep 17 00:00:00 2001 From: Will Gordon Date: Thu, 6 Aug 2026 11:39:08 -0400 Subject: [PATCH] fix(i18n): completes Vietnamese parity, fixes empty migration query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two more release/v3.8.50 base-red items, both surfaced while chasing CI failures on unrelated PRs: - vi.json was missing 8 keys that #9539 (NewAPI/Sub2API aggregator balance) added to en.json without a matching i18n:sync-ui run — pt-BR.json already had all 8, only Vietnamese drifted. Added translations for the 6 provider-settings strings, the feature-flag description, and the quota tooltip; verified against tests/unit/i18n-vi-completeness.test.ts (parity, placeholder preservation, ICU parse — all 5 assertions pass). - src/lib/db/migrations/120_interception_rules.sql was pure comments documenting a no-schema-change key_value namespace, with no executable SQL statement — the migration runner logged "FAILED: 120_interception_rules — Query contained no valid SQL statement" on every fresh DB init. 118_provider_param_filters.sql (same pattern, two migrations earlier) already ends with a bare `SELECT 1;` no-op for exactly this reason; 120 was just missing it. Verified directly against better-sqlite3 that the file now executes without error. --- src/i18n/messages/vi.json | 8 ++++++++ src/lib/db/migrations/120_interception_rules.sql | 1 + 2 files changed, 9 insertions(+) diff --git a/src/i18n/messages/vi.json b/src/i18n/messages/vi.json index f6333012d9..de7cbfc75d 100644 --- a/src/i18n/messages/vi.json +++ b/src/i18n/messages/vi.json @@ -5475,6 +5475,13 @@ "newApiUserIdLabel": "ID người dùng New-API", "newApiUserIdPlaceholder": "vd. 12345", "newApiUserIdHint": "Giá trị tiêu đề New-Api-User của AgentRouter, dùng cùng với khóa API console để lấy số dư hạn mức.", + "newApiAggregatorToggleLabel": "Cổng tổng hợp", + "newApiAggregatorToggleHint": "Bật tính năng phát hiện số dư cho các node tổng hợp New-API / One-API / Sub2API. Bảng điều khiển sẽ hiển thị huy hiệu số dư và định tuyến kiểm tra hạn mức trước sẽ bỏ qua các tài khoản đã hết hạn mức.", + "newApiAggregatorConsoleApiKeyHint": "Token truy cập hệ thống cho endpoint /api/user/self của bộ tổng hợp. Không phải là khóa API định tuyến.", + "newApiAggregatorUserIdHint": "Giá trị tiêu đề New-Api-User dùng để lấy số dư hạn mức của người dùng bộ tổng hợp.", + "newApiAggregatorQuotaPerUnitLabel": "Hạn mức trên mỗi đơn vị", + "newApiAggregatorQuotaPerUnitHint": "Số đơn vị tín dụng New-API trên mỗi $1 (mặc định: 500000). Ghi đè nếu bộ tổng hợp của bạn sử dụng tỷ lệ khác.", + "featureFlagNewApiAggregatorBalanceDescription": "Bật tính năng phát hiện số dư cho các node tương thích với bộ tổng hợp New-API / One-API / Sub2API", "cpaModeDisabledTitle": "Chế độ tương thích CLIProxyAPI đã bị tắt", "cpaModeEnabledTitle": "Chế độ tương thích CLIProxyAPI đã được bật", "customUserAgentHint": "Gợi ý User Agent tùy chỉnh", @@ -5590,6 +5597,7 @@ "tagGroupPlaceholder": "Nhập nhóm thẻ...", "testModel": "Kiểm tra mô hình", "testingModel": "Đang kiểm tra mô hình", + "modelTestQuotaTooltip": "Đã hết hạn mức — sẽ được đặt lại vào ngày mai hoặc cần nạp thêm", "toggleOffShort": "Tắt", "toggleOnShort": "Bật", "tokenExpiredBadge": "Nhãn token đã hết hạn", diff --git a/src/lib/db/migrations/120_interception_rules.sql b/src/lib/db/migrations/120_interception_rules.sql index d042a5f035..7e7e1593be 100644 --- a/src/lib/db/migrations/120_interception_rules.sql +++ b/src/lib/db/migrations/120_interception_rules.sql @@ -14,3 +14,4 @@ -- falls back to the existing native web-search-bypass defaults in webSearchFallback.ts). -- -- See: src/lib/db/interceptionRules.ts +SELECT 1;