fix(captain/hermes-builder): i18n keys no caminho correto
Convencao Chatwoot pra features Captain novas: keys no root level (CAPTAIN_HERMES_BUILDER, igual a CAPTAIN_ROLETA, CAPTAIN_FUNNEL etc) e nao como sub-key de CAPTAIN. Move CAPTAIN.HERMES_BUILDER -> CAPTAIN_HERMES_BUILDER em pt_BR e en. Atualiza referencias t() no Vue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
40fd0c8f50
commit
35358a42b1
@ -436,20 +436,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"CAPTAIN": {
|
"CAPTAIN": {
|
||||||
"HERMES_BUILDER": {
|
|
||||||
"TITLE": "Agent Builder",
|
|
||||||
"DESCRIPTION": "Create new Hermes agents through a guided chat with the Builder.",
|
|
||||||
"HEADER_TITLE": "Agent Builder",
|
|
||||||
"HEADER_DESCRIPTION": "Chat with the Builder to create a new Hermes agent. It asks questions and saves the spec as JSON for review at the end.",
|
|
||||||
"RESET": "Clear conversation",
|
|
||||||
"RESET_CONFIRM": "Clear current conversation with the Builder?",
|
|
||||||
"EMPTY_STATE": "Type \"hello\" to start. The Builder will guide you.",
|
|
||||||
"PLACEHOLDER": "Type and press Enter to send (Shift+Enter for new line)",
|
|
||||||
"SEND": "Send",
|
|
||||||
"SESSION_LABEL": "Session:",
|
|
||||||
"SEND_FAILED": "Send failed: {message}",
|
|
||||||
"RESET_FAILED": "Failed to clear session."
|
|
||||||
},
|
|
||||||
"BANNER": {
|
"BANNER": {
|
||||||
"RESPONSES": "You have used more than 80% of your responses limit. To continue using Captain AI, please upgrade.",
|
"RESPONSES": "You have used more than 80% of your responses limit. To continue using Captain AI, please upgrade.",
|
||||||
"DOCUMENTS": "Documents limit reached. Please upgrade to continue using Captain AI."
|
"DOCUMENTS": "Documents limit reached. Please upgrade to continue using Captain AI."
|
||||||
@ -905,5 +891,19 @@
|
|||||||
"RESERVATION_ID": "Reservation #"
|
"RESERVATION_ID": "Reservation #"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"CAPTAIN_HERMES_BUILDER": {
|
||||||
|
"TITLE": "Agent Builder",
|
||||||
|
"DESCRIPTION": "Create new Hermes agents through a guided chat with the Builder.",
|
||||||
|
"HEADER_TITLE": "Agent Builder",
|
||||||
|
"HEADER_DESCRIPTION": "Chat with the Builder to create a new Hermes agent. It asks questions and saves the spec as JSON for review at the end.",
|
||||||
|
"RESET": "Clear conversation",
|
||||||
|
"RESET_CONFIRM": "Clear current conversation with the Builder?",
|
||||||
|
"EMPTY_STATE": "Type \"hello\" to start. The Builder will guide you.",
|
||||||
|
"PLACEHOLDER": "Type and press Enter to send (Shift+Enter for new line)",
|
||||||
|
"SEND": "Send",
|
||||||
|
"SESSION_LABEL": "Session:",
|
||||||
|
"SEND_FAILED": "Send failed: {message}",
|
||||||
|
"RESET_FAILED": "Failed to clear session."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -437,20 +437,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"CAPTAIN": {
|
"CAPTAIN": {
|
||||||
"HERMES_BUILDER": {
|
|
||||||
"TITLE": "Construtor de Agentes",
|
|
||||||
"DESCRIPTION": "Crie novos agentes Hermes via chat guiado com o Construtor.",
|
|
||||||
"HEADER_TITLE": "Construtor de Agentes",
|
|
||||||
"HEADER_DESCRIPTION": "Converse com o Construtor pra criar um novo agente Hermes. Ele faz perguntas e ao final salva a especificação em JSON pra revisão.",
|
|
||||||
"RESET": "Limpar conversa",
|
|
||||||
"RESET_CONFIRM": "Limpar conversa atual com o Construtor?",
|
|
||||||
"EMPTY_STATE": "Mande \"olá\" pra começar. O Construtor vai te guiar.",
|
|
||||||
"PLACEHOLDER": "Escreva e Enter pra enviar (Shift+Enter pula linha)",
|
|
||||||
"SEND": "Enviar",
|
|
||||||
"SESSION_LABEL": "Sessão:",
|
|
||||||
"SEND_FAILED": "Erro ao enviar: {message}",
|
|
||||||
"RESET_FAILED": "Falha ao limpar sessão."
|
|
||||||
},
|
|
||||||
"BANNER": {
|
"BANNER": {
|
||||||
"RESPONSES": "Você usou mais de 80% do seu limite de respostas. Para continuar usando o Capitão IA, faça um upgrade.",
|
"RESPONSES": "Você usou mais de 80% do seu limite de respostas. Para continuar usando o Capitão IA, faça um upgrade.",
|
||||||
"DOCUMENTS": "Limite de documentos atingido. Faça um upgrade para continuar usando o Capitão IA."
|
"DOCUMENTS": "Limite de documentos atingido. Faça um upgrade para continuar usando o Capitão IA."
|
||||||
@ -906,5 +892,19 @@
|
|||||||
"RESERVATION_ID": "Reserva #"
|
"RESERVATION_ID": "Reserva #"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"CAPTAIN_HERMES_BUILDER": {
|
||||||
|
"TITLE": "Construtor de Agentes",
|
||||||
|
"DESCRIPTION": "Crie novos agentes Hermes via chat guiado com o Construtor.",
|
||||||
|
"HEADER_TITLE": "Construtor de Agentes",
|
||||||
|
"HEADER_DESCRIPTION": "Converse com o Construtor pra criar um novo agente Hermes. Ele faz perguntas e ao final salva a especificação em JSON pra revisão.",
|
||||||
|
"RESET": "Limpar conversa",
|
||||||
|
"RESET_CONFIRM": "Limpar conversa atual com o Construtor?",
|
||||||
|
"EMPTY_STATE": "Mande \"olá\" pra começar. O Construtor vai te guiar.",
|
||||||
|
"PLACEHOLDER": "Escreva e Enter pra enviar (Shift+Enter pula linha)",
|
||||||
|
"SEND": "Enviar",
|
||||||
|
"SESSION_LABEL": "Sessão:",
|
||||||
|
"SEND_FAILED": "Erro ao enviar: {message}",
|
||||||
|
"RESET_FAILED": "Falha ao limpar sessão."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ const sendMessage = async () => {
|
|||||||
await hermesBuilderApi.sendMessage(text);
|
await hermesBuilderApi.sendMessage(text);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
useAlert(
|
useAlert(
|
||||||
t('CAPTAIN.HERMES_BUILDER.SEND_FAILED', {
|
t('CAPTAIN_HERMES_BUILDER.SEND_FAILED', {
|
||||||
message: e.response?.data?.error || e.message || 'unknown',
|
message: e.response?.data?.error || e.message || 'unknown',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -79,12 +79,12 @@ const handleKeydown = e => {
|
|||||||
|
|
||||||
const resetSession = async () => {
|
const resetSession = async () => {
|
||||||
// eslint-disable-next-line no-alert
|
// eslint-disable-next-line no-alert
|
||||||
if (!window.confirm(t('CAPTAIN.HERMES_BUILDER.RESET_CONFIRM'))) return;
|
if (!window.confirm(t('CAPTAIN_HERMES_BUILDER.RESET_CONFIRM'))) return;
|
||||||
try {
|
try {
|
||||||
await hermesBuilderApi.reset();
|
await hermesBuilderApi.reset();
|
||||||
messages.value = [];
|
messages.value = [];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
useAlert(t('CAPTAIN.HERMES_BUILDER.RESET_FAILED'));
|
useAlert(t('CAPTAIN_HERMES_BUILDER.RESET_FAILED'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -108,23 +108,23 @@ watch(messages, () => nextTick().then(scrollToBottom), { deep: true });
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<PageLayout
|
<PageLayout
|
||||||
:title="t('CAPTAIN.HERMES_BUILDER.TITLE')"
|
:title="t('CAPTAIN_HERMES_BUILDER.TITLE')"
|
||||||
:description="t('CAPTAIN.HERMES_BUILDER.DESCRIPTION')"
|
:description="t('CAPTAIN_HERMES_BUILDER.DESCRIPTION')"
|
||||||
>
|
>
|
||||||
<div class="builder-wrapper">
|
<div class="builder-wrapper">
|
||||||
<header class="builder-header">
|
<header class="builder-header">
|
||||||
<div>
|
<div>
|
||||||
<h2>{{ t('CAPTAIN.HERMES_BUILDER.HEADER_TITLE') }}</h2>
|
<h2>{{ t('CAPTAIN_HERMES_BUILDER.HEADER_TITLE') }}</h2>
|
||||||
<p>{{ t('CAPTAIN.HERMES_BUILDER.HEADER_DESCRIPTION') }}</p>
|
<p>{{ t('CAPTAIN_HERMES_BUILDER.HEADER_DESCRIPTION') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<Button variant="ghost" size="sm" @click="resetSession">
|
<Button variant="ghost" size="sm" @click="resetSession">
|
||||||
{{ t('CAPTAIN.HERMES_BUILDER.RESET') }}
|
{{ t('CAPTAIN_HERMES_BUILDER.RESET') }}
|
||||||
</Button>
|
</Button>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section ref="scrollContainer" class="messages">
|
<section ref="scrollContainer" class="messages">
|
||||||
<div v-if="!messages.length" class="empty-state">
|
<div v-if="!messages.length" class="empty-state">
|
||||||
{{ t('CAPTAIN.HERMES_BUILDER.EMPTY_STATE') }}
|
{{ t('CAPTAIN_HERMES_BUILDER.EMPTY_STATE') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-for="(msg, idx) in messages"
|
v-for="(msg, idx) in messages"
|
||||||
@ -148,7 +148,7 @@ watch(messages, () => nextTick().then(scrollToBottom), { deep: true });
|
|||||||
<textarea
|
<textarea
|
||||||
v-model="input"
|
v-model="input"
|
||||||
rows="2"
|
rows="2"
|
||||||
:placeholder="t('CAPTAIN.HERMES_BUILDER.PLACEHOLDER')"
|
:placeholder="t('CAPTAIN_HERMES_BUILDER.PLACEHOLDER')"
|
||||||
:disabled="sending"
|
:disabled="sending"
|
||||||
@keydown="handleKeydown"
|
@keydown="handleKeydown"
|
||||||
/>
|
/>
|
||||||
@ -157,12 +157,12 @@ watch(messages, () => nextTick().then(scrollToBottom), { deep: true });
|
|||||||
:disabled="!input.trim() || sending"
|
:disabled="!input.trim() || sending"
|
||||||
@click="sendMessage"
|
@click="sendMessage"
|
||||||
>
|
>
|
||||||
{{ t('CAPTAIN.HERMES_BUILDER.SEND') }}
|
{{ t('CAPTAIN_HERMES_BUILDER.SEND') }}
|
||||||
</Button>
|
</Button>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<p v-if="sessionId" class="session-debug">
|
<p v-if="sessionId" class="session-debug">
|
||||||
{{ t('CAPTAIN.HERMES_BUILDER.SESSION_LABEL') }} {{ sessionId }}
|
{{ t('CAPTAIN_HERMES_BUILDER.SESSION_LABEL') }} {{ sessionId }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user