mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-07 15:02:25 +00:00
FIX: correctly translate automation name (#1485)
* FIX: correctly translation automation name The key is persona, not name. * simplify
This commit is contained in:
parent
2b9a4f9232
commit
0f904977a4
@ -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>
|
||||||
|
@ -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. "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user