Merge pull request 'fix(chatbot): forgot to actually translate internal/default chat messages, fixed' (#49) from dev/lion/chatbot into main

Reviewed-on: Targo/targo_frontend#49
This commit is contained in:
Nicolas 2026-01-12 14:25:36 -05:00
commit d59dd9b041

View File

@ -6,8 +6,9 @@
import MarkdownIt from 'markdown-it' import MarkdownIt from 'markdown-it'
import { useAuthStore } from 'src/stores/auth-store'; import { useAuthStore } from 'src/stores/auth-store';
import type { Message } from 'src/modules/chatbot/models/dialogue-message.model'; 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 auth_store = useAuthStore();
const { message } = defineProps<{ const { message } = defineProps<{
@ -34,6 +35,10 @@
// Compute parsed content // Compute parsed content
const parsedText = computed((): string => { const parsedText = computed((): string => {
const cleaned = cleanMarkdown(message.text || '') const cleaned = cleanMarkdown(message.text || '')
if (cleaned.includes('chatbot.')) {
const translated_message = t(message.text);
return md.render(translated_message);
}
return md.render(cleaned); return md.render(cleaned);
}) })
</script> </script>