Skip to content

An open source alternative to Tableau. Embeddable visual analytic

fix: askviz placeholder

islxyqwe504767edca9a
diff --git a/packages/graphic-walker/src/components/askViz/index.tsx b/packages/graphic-walker/src/components/askViz/index.tsx
index b5e307a4..1d447bd9 100644
--- a/packages/graphic-walker/src/components/askViz/index.tsx
+++ b/packages/graphic-walker/src/components/askViz/index.tsx
@@ -6,6 +6,7 @@ import Spinner from '../spinner';
import { IViewField } from '../../interfaces';
import { VisSpecWithHistory } from '../../models/visSpecHistory';
import { visSpecDecoder, forwardVisualConfigs } from '../../utils/save';
+import { useTranslation } from 'react-i18next';
type VEGALite = any;
@@ -45,6 +46,7 @@ const AskViz: React.FC<{api?: string; headers?: Record<string, string>}> = (prop
const [query, setQuery] = useState<string>('');
const [loading, setLoading] = useState<boolean>(false);
const { vizStore } = useGlobalStore();
+ const {t} = useTranslation();
const allFields = vizStore.allFields;
@@ -66,7 +68,7 @@ const AskViz: React.FC<{api?: string; headers?: Record<string, string>}> = (prop
<input
type="text"
className="rounded-l-md px-4 block w-full border-0 py-1.5 text-gray-900 dark:text-gray-50 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 placeholder:text-gray-400 focus:ring-1 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 dark:bg-gray-900"
- placeholder="What visualization your want to draw from the dataset"
+ placeholder={t("main.tabpanel.askviz.placeholder")}
value={query}
onChange={(e) => setQuery(e.target.value)}
onKeyDown={(e) => {
diff --git a/packages/graphic-walker/src/locales/en-US.json b/packages/graphic-walker/src/locales/en-US.json
index 36ba24ee..fae160d8 100644
--- a/packages/graphic-walker/src/locales/en-US.json
+++ b/packages/graphic-walker/src/locales/en-US.json
@@ -159,6 +159,9 @@
"undo": "Undo",
"redo": "Redo"
},
+ "askviz":{
+ "placeholder": "What visualization your want to draw from the dataset"
+ },
"settings": {
"toggle": {
"aggregation": "Aggregation",
diff --git a/packages/graphic-walker/src/locales/ja-JP.json b/packages/graphic-walker/src/locales/ja-JP.json
index 24d075fe..54a0871f 100644
--- a/packages/graphic-walker/src/locales/ja-JP.json
+++ b/packages/graphic-walker/src/locales/ja-JP.json
@@ -148,6 +148,9 @@
"auto_title": "ビュー {{idx}}",
"chart_name": "ビュー名"
},
+ "askviz":{
+ "placeholder": "データセットから描画したい視覚化は何ですか?"
+ },
"tabpanel": {
"menubar": {
"undo": "元に戻す",
diff --git a/packages/graphic-walker/src/locales/zh-CN.json b/packages/graphic-walker/src/locales/zh-CN.json
index c14908a8..0363ea61 100644
--- a/packages/graphic-walker/src/locales/zh-CN.json
+++ b/packages/graphic-walker/src/locales/zh-CN.json
@@ -154,6 +154,9 @@
"auto_title": "图表 {{idx}}",
"chart_name": "图表名称"
},
+ "askviz":{
+ "placeholder": "想从数据集中绘制哪种可视化呢?"
+ },
"tabpanel": {
"menubar": {
"undo": "撤销",