Skip to content

Commit 2a490be

Browse files
author
smallstone
committed
Refactor code: Removed setLanguage function and added i18n translation support
1 parent c32fff3 commit 2a490be

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/util/ideaBridge.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,19 +271,6 @@ const JStoIdea = {
271271

272272
window.JSJavaBridge.callJava(JSON.stringify(params));
273273
},
274-
setLanguage: (message) => {
275-
const params = {
276-
action: "updateLanguage/request",
277-
metadata: {
278-
callback: "IdeaToJSMessage",
279-
},
280-
payload: {
281-
language: message?.language || "en",
282-
},
283-
};
284-
console.log("setLanguage params: ", params);
285-
window.JSJavaBridge.callJava(JSON.stringify(params));
286-
},
287274
};
288275

289276
class IdeaBridge {

src/views/components/MessageMarkdown/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ interface MessageMarkdownProps
3535
className: string;
3636
messageDone?: boolean;
3737
temp?: boolean;
38+
activeStep?: boolean;
3839
}
3940

4041
type Step = {
@@ -64,6 +65,7 @@ const MessageMarkdown = observer((props: MessageMarkdownProps) => {
6465
const lastNode = tree.children[tree.children.length - 1];
6566
const [chatmarkValues, setChatmarkValues] = useSetState({});
6667
const { classes } = useStyles();
68+
const { i18n, t } = useTranslation();
6769

6870
const handleExplain = (value: string | undefined) => {
6971
console.log(value);

0 commit comments

Comments
 (0)