diff --git a/src/apps/officer-web/Screens/Dashboard/CapabilityPage.tsx b/src/apps/officer-web/Screens/Dashboard/CapabilityPage.tsx index a0ba5974..c803051d 100644 --- a/src/apps/officer-web/Screens/Dashboard/CapabilityPage.tsx +++ b/src/apps/officer-web/Screens/Dashboard/CapabilityPage.tsx @@ -278,12 +278,18 @@ export const CapabilityChat = ({ description, onResponseEnd, }: CapabilityChatProps) => { + const { t } = useTranslation(); const seedFile = `${kind.toUpperCase()}.md`; const genericPrefix = `\ninput file: ${filePath}\n${seedFile}: ${filePath}\ndir: ${resourceDir}\n\nBe aware of any extra files alongside the same dir as the ${kind} file we're handling, for possible extra context. You can also, if pertinent, create scripts or other files that will help you in the future.\n`; const promptFrontmatter = isNew ? (buildCreationPrefix(kind, filePath, resourceDir) ?? genericPrefix) : genericPrefix; + /* + The composer's PRE-FILLED text, which the reader sees and edits — so it is translated. The hidden + `promptFrontmatter` above is not: that one instructs the agent and carries file paths, and is + machine-facing rather than something anybody reads. + */ const defaultInput = isNew - ? (description ?? `Help me create the content for this new ${kind} file`) - : `Help me understand and improve this ${kind} file`; + ? (description ?? t('capability.createPrompt', { kind: kind.toLowerCase() })) + : t('capability.improvePrompt', { kind: kind.toLowerCase() }); const chat = useChat(undefined, undefined, { replaceUrl: false }); diff --git a/src/apps/officer-web/locales/en-GB.json b/src/apps/officer-web/locales/en-GB.json index 65ccfa52..f6d1e724 100644 --- a/src/apps/officer-web/locales/en-GB.json +++ b/src/apps/officer-web/locales/en-GB.json @@ -697,6 +697,8 @@ "searchPlaceholder": "Search {{kind}}…", "selectOne": "Select a {{kind}}", "selectToView": "Select a {{kind}} to view its contents", - "delete": "Delete" + "delete": "Delete", + "createPrompt": "Help me create the content for this new {{kind}} file", + "improvePrompt": "Help me understand and improve this {{kind}} file" } } diff --git a/src/apps/officer-web/locales/pt-PT.json b/src/apps/officer-web/locales/pt-PT.json index 809d35f7..53027a41 100644 --- a/src/apps/officer-web/locales/pt-PT.json +++ b/src/apps/officer-web/locales/pt-PT.json @@ -697,6 +697,8 @@ "searchPlaceholder": "Pesquisar {{kind}}…", "selectOne": "Selecione um {{kind}}", "selectToView": "Selecione um {{kind}} para ver o seu conteúdo", - "delete": "Eliminar" + "delete": "Eliminar", + "createPrompt": "Ajuda-me a criar o conteúdo deste novo ficheiro de {{kind}}", + "improvePrompt": "Ajuda-me a compreender e melhorar este ficheiro de {{kind}}" } }