fix(chatbot): forgot to actually translate internal/default chat messages, fixed
This commit is contained in:
parent
7114574ecf
commit
6a473fae0c
|
|
@ -6,8 +6,9 @@
|
|||
import MarkdownIt from 'markdown-it'
|
||||
import { useAuthStore } from 'src/stores/auth-store';
|
||||
import type { Message } from 'src/modules/chatbot/models/dialogue-message.model';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const {t}
|
||||
const { t } = useI18n();
|
||||
const auth_store = useAuthStore();
|
||||
|
||||
const { message } = defineProps<{
|
||||
|
|
@ -34,6 +35,10 @@
|
|||
// Compute parsed content
|
||||
const parsedText = computed((): string => {
|
||||
const cleaned = cleanMarkdown(message.text || '')
|
||||
if (cleaned.includes('chatbot.')) {
|
||||
const translated_message = t(message.text);
|
||||
return md.render(translated_message);
|
||||
}
|
||||
return md.render(cleaned);
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user