Skip to content

Commit

Permalink
Refactor code: Removed setLanguage function and added i18n translatio…
Browse files Browse the repository at this point in the history
…n support
  • Loading branch information
smallstone committed Dec 28, 2023
1 parent c32fff3 commit 2a490be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/util/ideaBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,19 +271,6 @@ const JStoIdea = {

window.JSJavaBridge.callJava(JSON.stringify(params));
},
setLanguage: (message) => {
const params = {
action: "updateLanguage/request",
metadata: {
callback: "IdeaToJSMessage",
},
payload: {
language: message?.language || "en",
},
};
console.log("setLanguage params: ", params);
window.JSJavaBridge.callJava(JSON.stringify(params));
},
};

class IdeaBridge {
Expand Down
2 changes: 2 additions & 0 deletions src/views/components/MessageMarkdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ interface MessageMarkdownProps
className: string;
messageDone?: boolean;
temp?: boolean;
activeStep?: boolean;
}

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

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

0 comments on commit 2a490be

Please sign in to comment.