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:
commit
d59dd9b041
|
|
@ -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