Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update i18n of data source type (#9830)

boojack9a5c538e3a63
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 65ed8373f2..82f63202a2 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2160,7 +2160,9 @@
"read-replica-host": "Read-replica Host",
"read-replica-port": "Read-replica Port",
"delete-read-only-data-source": "Delete read-only data source",
- "connection-string-schema": "Connection String Schema"
+ "connection-string-schema": "Connection String Schema",
+ "admin": "Admin",
+ "read-only": "RO"
},
"setting": {
"project": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 2f6359ee35..4fee9bcffd 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2156,7 +2156,9 @@
"tunnel": "@:{'data-source.ssh.tunnel'}",
"tunnel-and-private-key": "@:{'data-source.ssh.tunnel'} + @:{'data-source.ssh.private-key'}",
"none": "Ninguno"
- }
+ },
+ "admin": "Admin",
+ "read-only": "Solo lectura"
},
"setting": {
"project": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 37be50e301..3b56f0ca68 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2155,7 +2155,9 @@
"read-replica-host": "只读副本 Host",
"read-replica-port": "只读副本端口",
"delete-read-only-data-source": "删除只读数据源",
- "connection-string-schema": "连接串模式"
+ "connection-string-schema": "连接串模式",
+ "admin": "主库",
+ "read-only": "从库"
},
"setting": {
"project": {
diff --git a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
index a43cad1ec6..6a74593623 100644
--- a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
@@ -32,6 +32,7 @@ import {
SelectRenderLabel,
} from "naive-ui";
import { computed, h, watch } from "vue";
+import { useI18n } from "vue-i18n";
import { useInstanceV1ByUID, useTabStore } from "@/store";
import { DataSource, DataSourceType } from "@/types/proto/v1/instance_service";
@@ -40,6 +41,7 @@ interface DataSourceSelectOption extends SelectOption {
dataSource: DataSource;
}
+const { t } = useI18n();
const tabStore = useTabStore();
const connection = computed(() => tabStore.currentTab.connection);
const selectedDataSourceId = computed(() => {
@@ -121,9 +123,9 @@ const handleDataSourceSelect = (dataSourceId?: string) => {
const readableDataSourceType = (type: DataSourceType): string => {
if (type === DataSourceType.ADMIN) {
- return "Admin";
+ return t("data-source.admin");
} else if (type === DataSourceType.READ_ONLY) {
- return "RO";
+ return t("data-source.read-only");
} else {
return "Unknown";
}