fix(chatbot): forgot to actually translate internal/default chat messages, fixed

This commit is contained in:
Nicolas Drolet 2026-01-12 14:24:44 -05:00
parent 7114574ecf
commit 6a473fae0c

View File

@ -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>