feat(agent): export managed drivers for offline use

This commit is contained in:
Guoyu Su authored and GitHub committed 2026-08-22 15:41:21 +08:00
1 parent 6eb8b43701
commit 82e5756325
23 files changed
+3419 -40

No files matched your search

@@ -0,0 +1,51 @@
import { describe, expect, it } from "vitest";
import en from "../locales/en";
import es from "../locales/es";
import itLocale from "../locales/it";
import ja from "../locales/ja";
import ko from "../locales/ko";
import ptBR from "../locales/pt-BR";
import zhCN from "../locales/zh-CN";
import zhTW from "../locales/zh-TW";
type Messages = Record<string, unknown>;
const locales: Array<[string, Messages]> = [
["es", es],
["it", itLocale],
["ja", ja],
["ko", ko],
["pt-BR", ptBR],
["zh-CN", zhCN],
["zh-TW", zhTW],
];
function offlineExportEntries(locale: Messages): Map<string, string> {
const driverStore = locale.driverStore as Record<string, unknown>;
return new Map(
Object.entries(driverStore)
.filter(([key, value]) => key.startsWith("offlineExport") && typeof value === "string")
.map(([key, value]) => [key, value as string]),
);
}
function placeholders(message: string): string[] {
return [...new Set([...message.matchAll(/\{([^{}]+)\}/g)].map((match) => match[1]))].sort();
}
describe("offline Agent export i18n parity", () => {
const englishEntries = offlineExportEntries(en);
it("declares the complete English message set", () => {
expect(englishEntries.size).toBe(29);
});
it.each(locales)("%s declares matching keys and placeholders", (_name, locale) => {
const localeEntries = offlineExportEntries(locale);
expect([...localeEntries.keys()].sort()).toEqual([...englishEntries.keys()].sort());
for (const [key, englishMessage] of englishEntries) {
expect(placeholders(localeEntries.get(key) ?? ""), key).toEqual(placeholders(englishMessage));
}
});
});
+29
View File
@@ -6696,6 +6696,35 @@ export default {
jdbcDrivers: "JDBC Drivers",
importing: "Importing...",
importOfflinePackage: "Import offline package",
offlineExport: "Export offline package",
offlineExportTitle: "Export offline Agent package",
offlineExportDescription: "Select the DBX-managed Agent drivers to include. The package is compatible with the current platform only.",
offlineExportPlatform: "Platform",
offlineExportSelectedCount: "{selected} of {total} selected",
offlineExportSelectAll: "Select all",
offlineExportClear: "Clear",
offlineExportNoDrivers: "No eligible DBX-managed Agent drivers are installed.",
offlineExportArtifactJar: "Java JAR",
offlineExportArtifactNative: "Native",
offlineExportArtifactUnknown: "Unknown",
offlineExportPreparing: "Preparing export preview...",
offlineExportJreSummary: "{count} managed JRE(s) will be included automatically.",
offlineExportSecurityHint: "Only DBX-managed artifacts and required managed JREs are included. Local paths, settings, and external drivers are excluded.",
offlineExportStart: "Export {count} driver(s)",
offlineExporting: "Exporting...",
offlineExportPreviewFailed: "Unable to prepare the export: {error}",
offlineExportChooseDestination: "Save offline Agent package",
offlineExportSuccess: "Exported {file}: {drivers} driver(s), {jres} JRE(s), {size}.",
offlineExportFailed: "Offline package export failed: {error}",
offlineExportUnavailable_unmanagedInstall: "This artifact is not tracked as a DBX-managed installation.",
offlineExportUnavailable_localInstall: "Locally imported Agent builds are not included.",
offlineExportUnavailable_launchConfig: "Custom launch configurations are machine-specific.",
offlineExportUnavailable_missingArtifact: "The installed Agent artifact is missing.",
offlineExportUnavailable_invalidArtifact: "The installed Agent artifact is invalid or corrupt.",
offlineExportUnavailable_unsafeSource: "The artifact is outside the managed store or uses a symbolic link.",
offlineExportUnavailable_externalDriverRequired: "This Agent requires a user-provided external driver.",
offlineExportUnavailable_missingManagedJre: "The required DBX-managed JRE is not installed.",
offlineExportUnavailable_invalidManagedJre: "The required DBX-managed JRE is invalid or unsafe.",
refresh: "Refresh",
javaRuntime: "Java Runtime",
javaRuntimeManaged: "DBX managed JRE",
+29
View File
@@ -6407,6 +6407,35 @@ export default withEnglishFallback({
jdbcDrivers: "Drivers JDBC",
importing: "Importando...",
importOfflinePackage: "Importar paquete offline",
offlineExport: "Exportar paquete offline",
offlineExportTitle: "Exportar paquete de Agent offline",
offlineExportDescription: "Selecciona los drivers Agent administrados por DBX que se incluirán. El paquete solo es compatible con la plataforma actual.",
offlineExportPlatform: "Plataforma",
offlineExportSelectedCount: "{selected} de {total} seleccionados",
offlineExportSelectAll: "Seleccionar todo",
offlineExportClear: "Limpiar",
offlineExportNoDrivers: "No hay drivers Agent administrados por DBX que se puedan exportar.",
offlineExportArtifactJar: "JAR de Java",
offlineExportArtifactNative: "Nativo",
offlineExportArtifactUnknown: "Desconocido",
offlineExportPreparing: "Preparando la vista previa...",
offlineExportJreSummary: "Se incluirán automáticamente {count} JRE administrados.",
offlineExportSecurityHint: "Solo se incluyen artefactos administrados por DBX y los JRE necesarios. Se excluyen rutas locales, configuraciones y drivers externos.",
offlineExportStart: "Exportar {count} driver(s)",
offlineExporting: "Exportando...",
offlineExportPreviewFailed: "No se pudo preparar la exportación: {error}",
offlineExportChooseDestination: "Guardar paquete de Agent offline",
offlineExportSuccess: "Se exportó {file}: {drivers} driver(s), {jres} JRE, {size}.",
offlineExportFailed: "Error al exportar el paquete offline: {error}",
offlineExportUnavailable_unmanagedInstall: "El artefacto no está registrado como una instalación administrada por DBX.",
offlineExportUnavailable_localInstall: "Las compilaciones Agent importadas localmente no se incluyen.",
offlineExportUnavailable_launchConfig: "Las configuraciones de inicio personalizadas son específicas de este equipo.",
offlineExportUnavailable_missingArtifact: "Falta el artefacto Agent instalado.",
offlineExportUnavailable_invalidArtifact: "El artefacto Agent instalado no es válido o está dañado.",
offlineExportUnavailable_unsafeSource: "El artefacto está fuera del almacén administrado o usa un enlace simbólico.",
offlineExportUnavailable_externalDriverRequired: "Este Agent requiere un driver externo proporcionado por el usuario.",
offlineExportUnavailable_missingManagedJre: "El JRE administrado por DBX requerido no está instalado.",
offlineExportUnavailable_invalidManagedJre: "El JRE administrado por DBX requerido no es válido o no es seguro.",
refresh: "Actualizar",
javaRuntime: "Runtime Java",
javaRuntimeManaged: "JRE administrado por DBX",
+29
View File
@@ -6407,6 +6407,35 @@ export default withEnglishFallback({
jdbcDrivers: "Driver JDBC",
importing: "Importazione in corso...",
importOfflinePackage: "Importa pacchetto offline",
offlineExport: "Esporta pacchetto offline",
offlineExportTitle: "Esporta pacchetto Agent offline",
offlineExportDescription: "Seleziona i driver Agent gestiti da DBX da includere. Il pacchetto è compatibile solo con la piattaforma corrente.",
offlineExportPlatform: "Piattaforma",
offlineExportSelectedCount: "{selected} di {total} selezionati",
offlineExportSelectAll: "Seleziona tutto",
offlineExportClear: "Deseleziona",
offlineExportNoDrivers: "Non sono installati driver Agent gestiti da DBX idonei all'esportazione.",
offlineExportArtifactJar: "JAR Java",
offlineExportArtifactNative: "Nativo",
offlineExportArtifactUnknown: "Sconosciuto",
offlineExportPreparing: "Preparazione dell'anteprima...",
offlineExportJreSummary: "Verranno inclusi automaticamente {count} JRE gestiti.",
offlineExportSecurityHint: "Sono inclusi solo gli artefatti gestiti da DBX e i JRE necessari. Percorsi locali, impostazioni e driver esterni sono esclusi.",
offlineExportStart: "Esporta {count} driver",
offlineExporting: "Esportazione in corso...",
offlineExportPreviewFailed: "Impossibile preparare l'esportazione: {error}",
offlineExportChooseDestination: "Salva pacchetto Agent offline",
offlineExportSuccess: "Esportato {file}: {drivers} driver, {jres} JRE, {size}.",
offlineExportFailed: "Esportazione del pacchetto offline non riuscita: {error}",
offlineExportUnavailable_unmanagedInstall: "L'artefatto non è registrato come installazione gestita da DBX.",
offlineExportUnavailable_localInstall: "Le build Agent importate localmente non sono incluse.",
offlineExportUnavailable_launchConfig: "Le configurazioni di avvio personalizzate sono specifiche del computer.",
offlineExportUnavailable_missingArtifact: "L'artefatto Agent installato è mancante.",
offlineExportUnavailable_invalidArtifact: "L'artefatto Agent installato non è valido o è danneggiato.",
offlineExportUnavailable_unsafeSource: "L'artefatto è fuori dall'archivio gestito o usa un collegamento simbolico.",
offlineExportUnavailable_externalDriverRequired: "Questo Agent richiede un driver esterno fornito dall'utente.",
offlineExportUnavailable_missingManagedJre: "Il JRE gestito da DBX richiesto non è installato.",
offlineExportUnavailable_invalidManagedJre: "Il JRE gestito da DBX richiesto non è valido o sicuro.",
refresh: "Aggiorna",
javaRuntime: "Java Runtime",
javaRuntimeManaged: "JRE gestito da DBX",
+29
View File
@@ -6460,6 +6460,35 @@ export default withEnglishFallback({
jdbcDrivers: "JDBCドライバー",
importing: "インポート中...",
importOfflinePackage: "オフラインパッケージをインポート",
offlineExport: "オフラインパッケージをエクスポート",
offlineExportTitle: "Agentオフラインパッケージをエクスポート",
offlineExportDescription: "含めるDBX管理のAgentドライバーを選択します。パッケージは現在のプラットフォームでのみ使用できます。",
offlineExportPlatform: "対応プラットフォーム",
offlineExportSelectedCount: "{total}件中{selected}件を選択",
offlineExportSelectAll: "すべて選択",
offlineExportClear: "選択を解除",
offlineExportNoDrivers: "エクスポート可能なDBX管理のAgentドライバーがインストールされていません。",
offlineExportArtifactJar: "Java JAR",
offlineExportArtifactNative: "ネイティブ",
offlineExportArtifactUnknown: "不明",
offlineExportPreparing: "エクスポート内容を準備中...",
offlineExportJreSummary: "必要な管理対象JREを{count}件、自動的に含めます。",
offlineExportSecurityHint: "DBX管理の成果物と必要なJREのみを含めます。ローカルパス、設定、外部ドライバーは除外されます。",
offlineExportStart: "{count}件のドライバーをエクスポート",
offlineExporting: "エクスポート中...",
offlineExportPreviewFailed: "エクスポートを準備できませんでした: {error}",
offlineExportChooseDestination: "Agentオフラインパッケージを保存",
offlineExportSuccess: "{file} をエクスポートしました: ドライバー{drivers}件、JRE {jres}件、{size}。",
offlineExportFailed: "オフラインパッケージのエクスポートに失敗しました: {error}",
offlineExportUnavailable_unmanagedInstall: "この成果物はDBX管理のインストールとして記録されていません。",
offlineExportUnavailable_localInstall: "ローカルでインポートしたAgentビルドは含まれません。",
offlineExportUnavailable_launchConfig: "カスタム起動設定はこのマシン固有です。",
offlineExportUnavailable_missingArtifact: "インストール済みのAgent成果物が見つかりません。",
offlineExportUnavailable_invalidArtifact: "インストール済みのAgent成果物が無効または破損しています。",
offlineExportUnavailable_unsafeSource: "成果物が管理対象ストア外にあるか、シンボリックリンクを使用しています。",
offlineExportUnavailable_externalDriverRequired: "このAgentにはユーザー提供の外部ドライバーが必要です。",
offlineExportUnavailable_missingManagedJre: "必要なDBX管理JREがインストールされていません。",
offlineExportUnavailable_invalidManagedJre: "必要なDBX管理JREが無効または安全ではありません。",
refresh: "更新",
javaRuntime: "Javaランタイム",
javaRuntimeManaged: "DBX管理JRE",
+29
View File
@@ -6099,6 +6099,35 @@ export default withEnglishFallback({
jdbcDrivers: "JDBC 드라이버",
importing: "가져오는 중...",
importOfflinePackage: "오프라인 패키지 가져오기",
offlineExport: "오프라인 패키지 내보내기",
offlineExportTitle: "Agent 오프라인 패키지 내보내기",
offlineExportDescription: "포함할 DBX 관리 Agent 드라이버를 선택하세요. 패키지는 현재 플랫폼에서만 사용할 수 있습니다.",
offlineExportPlatform: "대상 플랫폼",
offlineExportSelectedCount: "{total}개 중 {selected}개 선택",
offlineExportSelectAll: "모두 선택",
offlineExportClear: "선택 해제",
offlineExportNoDrivers: "내보낼 수 있는 DBX 관리 Agent 드라이버가 설치되어 있지 않습니다.",
offlineExportArtifactJar: "Java JAR",
offlineExportArtifactNative: "네이티브",
offlineExportArtifactUnknown: "알 수 없음",
offlineExportPreparing: "내보내기 미리보기를 준비하는 중...",
offlineExportJreSummary: "필요한 관리 JRE {count}개가 자동으로 포함됩니다.",
offlineExportSecurityHint: "DBX 관리 아티팩트와 필요한 JRE만 포함됩니다. 로컬 경로, 설정 및 외부 드라이버는 제외됩니다.",
offlineExportStart: "드라이버 {count}개 내보내기",
offlineExporting: "내보내는 중...",
offlineExportPreviewFailed: "내보내기를 준비할 수 없습니다: {error}",
offlineExportChooseDestination: "Agent 오프라인 패키지 저장",
offlineExportSuccess: "{file} 내보내기 완료: 드라이버 {drivers}개, JRE {jres}개, {size}.",
offlineExportFailed: "오프라인 패키지 내보내기 실패: {error}",
offlineExportUnavailable_unmanagedInstall: "이 아티팩트는 DBX 관리 설치로 기록되어 있지 않습니다.",
offlineExportUnavailable_localInstall: "로컬에서 가져온 Agent 빌드는 포함되지 않습니다.",
offlineExportUnavailable_launchConfig: "사용자 지정 실행 설정은 이 컴퓨터에만 적용됩니다.",
offlineExportUnavailable_missingArtifact: "설치된 Agent 아티팩트가 없습니다.",
offlineExportUnavailable_invalidArtifact: "설치된 Agent 아티팩트가 유효하지 않거나 손상되었습니다.",
offlineExportUnavailable_unsafeSource: "아티팩트가 관리 저장소 밖에 있거나 심볼릭 링크를 사용합니다.",
offlineExportUnavailable_externalDriverRequired: "이 Agent에는 사용자가 제공하는 외부 드라이버가 필요합니다.",
offlineExportUnavailable_missingManagedJre: "필요한 DBX 관리 JRE가 설치되어 있지 않습니다.",
offlineExportUnavailable_invalidManagedJre: "필요한 DBX 관리 JRE가 유효하지 않거나 안전하지 않습니다.",
refresh: "새로고침",
javaRuntime: "Java 런타임",
javaRuntimeManaged: "DBX 관리 JRE",
+29
View File
@@ -6409,6 +6409,35 @@ export default withEnglishFallback({
jdbcDrivers: "Drivers JDBC",
importing: "Importando...",
importOfflinePackage: "Importar pacote offline",
offlineExport: "Exportar pacote offline",
offlineExportTitle: "Exportar pacote offline do Agent",
offlineExportDescription: "Selecione os drivers Agent gerenciados pelo DBX que serão incluídos. O pacote é compatível apenas com a plataforma atual.",
offlineExportPlatform: "Plataforma",
offlineExportSelectedCount: "{selected} de {total} selecionados",
offlineExportSelectAll: "Selecionar tudo",
offlineExportClear: "Limpar",
offlineExportNoDrivers: "Nenhum driver Agent gerenciado pelo DBX elegível está instalado.",
offlineExportArtifactJar: "JAR Java",
offlineExportArtifactNative: "Nativo",
offlineExportArtifactUnknown: "Desconhecido",
offlineExportPreparing: "Preparando a visualização...",
offlineExportJreSummary: "{count} JRE gerenciada(s) serão incluídas automaticamente.",
offlineExportSecurityHint: "Somente artefatos gerenciados pelo DBX e as JRE necessárias são incluídos. Caminhos locais, configurações e drivers externos são excluídos.",
offlineExportStart: "Exportar {count} driver(s)",
offlineExporting: "Exportando...",
offlineExportPreviewFailed: "Não foi possível preparar a exportação: {error}",
offlineExportChooseDestination: "Salvar pacote offline do Agent",
offlineExportSuccess: "{file} exportado: {drivers} driver(s), {jres} JRE, {size}.",
offlineExportFailed: "Falha ao exportar o pacote offline: {error}",
offlineExportUnavailable_unmanagedInstall: "O artefato não está registrado como uma instalação gerenciada pelo DBX.",
offlineExportUnavailable_localInstall: "Builds Agent importadas localmente não são incluídas.",
offlineExportUnavailable_launchConfig: "Configurações de inicialização personalizadas são específicas desta máquina.",
offlineExportUnavailable_missingArtifact: "O artefato Agent instalado está ausente.",
offlineExportUnavailable_invalidArtifact: "O artefato Agent instalado é inválido ou está corrompido.",
offlineExportUnavailable_unsafeSource: "O artefato está fora do armazenamento gerenciado ou usa um link simbólico.",
offlineExportUnavailable_externalDriverRequired: "Este Agent exige um driver externo fornecido pelo usuário.",
offlineExportUnavailable_missingManagedJre: "A JRE gerenciada pelo DBX necessária não está instalada.",
offlineExportUnavailable_invalidManagedJre: "A JRE gerenciada pelo DBX necessária é inválida ou insegura.",
refresh: "Atualizar",
javaRuntime: "Runtime do Java",
javaRuntimeManaged: "JRE gerenciada pelo DBX",
+29
View File
@@ -6681,6 +6681,35 @@ export default withEnglishFallback({
jdbcDrivers: "JDBC 驱动",
importing: "导入中...",
importOfflinePackage: "导入离线包",
offlineExport: "导出离线包",
offlineExportTitle: "导出 Agent 离线包",
offlineExportDescription: "选择要包含的 DBX 托管 Agent 驱动。离线包仅适用于当前平台。",
offlineExportPlatform: "适用平台",
offlineExportSelectedCount: "已选择 {selected}/{total}",
offlineExportSelectAll: "全选",
offlineExportClear: "清空",
offlineExportNoDrivers: "当前没有可导出的 DBX 托管 Agent 驱动。",
offlineExportArtifactJar: "Java JAR",
offlineExportArtifactNative: "原生程序",
offlineExportArtifactUnknown: "未知",
offlineExportPreparing: "正在准备导出预览...",
offlineExportJreSummary: "将自动包含 {count} 个所需的托管 JRE。",
offlineExportSecurityHint: "仅包含 DBX 托管的驱动产物及所需 JRE;本地路径、配置和外部驱动不会被导出。",
offlineExportStart: "导出 {count} 个驱动",
offlineExporting: "导出中...",
offlineExportPreviewFailed: "无法准备导出:{error}",
offlineExportChooseDestination: "保存 Agent 离线包",
offlineExportSuccess: "已导出 {file}:{drivers} 个驱动、{jres} 个 JRE,共 {size}。",
offlineExportFailed: "离线包导出失败:{error}",
offlineExportUnavailable_unmanagedInstall: "该产物未被记录为 DBX 托管安装。",
offlineExportUnavailable_localInstall: "本地导入的 Agent 构建不会被打包。",
offlineExportUnavailable_launchConfig: "自定义启动配置仅适用于当前机器。",
offlineExportUnavailable_missingArtifact: "已安装的 Agent 产物不存在。",
offlineExportUnavailable_invalidArtifact: "已安装的 Agent 产物无效或已损坏。",
offlineExportUnavailable_unsafeSource: "产物不在托管目录内,或使用了符号链接。",
offlineExportUnavailable_externalDriverRequired: "该 Agent 依赖用户自行提供的外部驱动。",
offlineExportUnavailable_missingManagedJre: "尚未安装所需的 DBX 托管 JRE。",
offlineExportUnavailable_invalidManagedJre: "所需的 DBX 托管 JRE 无效或不安全。",
refresh: "刷新",
javaRuntime: "Java 运行时",
javaRuntimeManaged: "DBX 托管 JRE",
+29
View File
@@ -5717,6 +5717,35 @@ export default withEnglishFallback({
jdbcDrivers: "JDBC 驅動程式",
importing: "匯入中……",
importOfflinePackage: "匯入離線包",
offlineExport: "匯出離線包",
offlineExportTitle: "匯出 Agent 離線包",
offlineExportDescription: "選擇要包含的 DBX 託管 Agent 驅動程式。離線包僅適用於目前平台。",
offlineExportPlatform: "適用平台",
offlineExportSelectedCount: "已選擇 {selected}/{total}",
offlineExportSelectAll: "全選",
offlineExportClear: "清除",
offlineExportNoDrivers: "目前沒有可匯出的 DBX 託管 Agent 驅動程式。",
offlineExportArtifactJar: "Java JAR",
offlineExportArtifactNative: "原生程式",
offlineExportArtifactUnknown: "未知",
offlineExportPreparing: "正在準備匯出預覽……",
offlineExportJreSummary: "將自動包含 {count} 個所需的託管 JRE。",
offlineExportSecurityHint: "僅包含 DBX 託管的驅動程式產物及所需 JRE;本機路徑、設定和外部驅動程式不會被匯出。",
offlineExportStart: "匯出 {count} 個驅動程式",
offlineExporting: "匯出中……",
offlineExportPreviewFailed: "無法準備匯出:{error}",
offlineExportChooseDestination: "儲存 Agent 離線包",
offlineExportSuccess: "已匯出 {file}:{drivers} 個驅動程式、{jres} 個 JRE,共 {size}。",
offlineExportFailed: "離線包匯出失敗:{error}",
offlineExportUnavailable_unmanagedInstall: "此產物未被記錄為 DBX 託管安裝。",
offlineExportUnavailable_localInstall: "本機匯入的 Agent 建置不會被打包。",
offlineExportUnavailable_launchConfig: "自訂啟動設定僅適用於目前機器。",
offlineExportUnavailable_missingArtifact: "已安裝的 Agent 產物不存在。",
offlineExportUnavailable_invalidArtifact: "已安裝的 Agent 產物無效或已損毀。",
offlineExportUnavailable_unsafeSource: "產物不在託管目錄內,或使用了符號連結。",
offlineExportUnavailable_externalDriverRequired: "此 Agent 依賴使用者自行提供的外部驅動程式。",
offlineExportUnavailable_missingManagedJre: "尚未安裝所需的 DBX 託管 JRE。",
offlineExportUnavailable_invalidManagedJre: "所需的 DBX 託管 JRE 無效或不安全。",
refresh: "重新整理",
javaRuntime: "Java 執行環境",
javaRuntimeManaged: "DBX 託管 JRE",