FIX: correctly translate automation name (#1485)

* FIX: correctly translation automation name

The key is persona, not name.

* simplify
This commit is contained in:
Joffrey JAFFEUX 2025-07-04 05:01:45 +02:00 committed by GitHub
parent 2b9a4f9232
commit 0f904977a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 12 deletions

View File

@ -112,17 +112,9 @@ export default class AiLlmsListEditor extends Component {
} }
localizeUsage(usage) { localizeUsage(usage) {
if (usage.type === "ai_persona") { return i18n(`discourse_ai.llms.usage.${usage.type}`, {
return i18n("discourse_ai.llms.usage.ai_persona", { persona: usage.name,
persona: usage.name, });
});
} else if (usage.type === "automation") {
return i18n("discourse_ai.llms.usage.automation", {
name: usage.name,
});
} else {
return i18n("discourse_ai.llms.usage." + usage.type);
}
} }
<template> <template>

View File

@ -568,7 +568,7 @@ en:
ai_summarization: "Summarize" ai_summarization: "Summarize"
ai_embeddings_semantic_search: "AI search" ai_embeddings_semantic_search: "AI search"
ai_spam: "Spam" ai_spam: "Spam"
automation: "Automation (%{name})" automation: "Automation (%{persona})"
in_use_warning: in_use_warning:
one: "This model is currently used by %{settings}. If misconfigured, the feature won't work as expected." one: "This model is currently used by %{settings}. If misconfigured, the feature won't work as expected."
other: "This model is currently used by the following: %{settings}. If misconfigured, features won't work as expected. " other: "This model is currently used by the following: %{settings}. If misconfigured, features won't work as expected. "