[GH-ISSUE #5142] refactor: wire up agent skills UI to use i18n translation keys #4936

Closed
opened 2026-06-05 14:50:59 -04:00 by yindo · 0 comments
Owner

Originally created by @angelplusultra on GitHub (Mar 4, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5142

Originally assigned to: @angelplusultra on GitHub.

Summary

The agent skills page (/settings/agents) has hardcoded English strings for skill titles and descriptions in frontend/src/pages/Admin/Agents/skills.js. The corresponding translation keys already exist in en/common.js under agent.skill.* but are not currently referenced anywhere in the frontend.

Problem

  • Skill titles and descriptions in skills.js are hardcoded strings, not translatable
  • Translation keys like agent.skill.rag.title, agent.skill.scrape.description, etc. exist in en/common.js but go unused
  • Users with non-English language preferences see English-only text on the agent skills page

Proposed Solution

Since skills.js is a plain JS config file (not a React component), the useTranslation() hook cannot be used directly. The recommended approach is Option 2: store translation keys in the config, resolve in the component:

  1. Add titleKey and descriptionKey fields to each skill entry in skills.js, pointing to the corresponding agent.skill.* translation key
  2. Keep the existing hardcoded title/description as fallbacks
  3. Update SkillList, DefaultSkillPanel, and GenericSkillPanel components to resolve keys via t() from useTranslation(), falling back to the raw string props when no key is provided

Files to modify

  • frontend/src/pages/Admin/Agents/skills.js — add titleKey/descriptionKey fields
  • frontend/src/pages/Admin/Agents/index.jsx — resolve titleKey in SkillList
  • frontend/src/pages/Admin/Agents/DefaultSkillPanel/index.jsx — resolve keys via t()
  • frontend/src/pages/Admin/Agents/GenericSkillPanel/index.jsx — resolve keys via t()

Notes

  • sql-agent has no existing translation key in en/common.js — one would need to be added
  • web-browsing has a titleKey but its AgentWebSearchSelection component manages its own title internally
Originally created by @angelplusultra on GitHub (Mar 4, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5142 Originally assigned to: @angelplusultra on GitHub. ## Summary The agent skills page (`/settings/agents`) has hardcoded English strings for skill titles and descriptions in `frontend/src/pages/Admin/Agents/skills.js`. The corresponding translation keys already exist in `en/common.js` under `agent.skill.*` but are not currently referenced anywhere in the frontend. ## Problem - Skill titles and descriptions in `skills.js` are hardcoded strings, not translatable - Translation keys like `agent.skill.rag.title`, `agent.skill.scrape.description`, etc. exist in `en/common.js` but go unused - Users with non-English language preferences see English-only text on the agent skills page ## Proposed Solution Since `skills.js` is a plain JS config file (not a React component), the `useTranslation()` hook cannot be used directly. The recommended approach is **Option 2: store translation keys in the config, resolve in the component**: 1. Add `titleKey` and `descriptionKey` fields to each skill entry in `skills.js`, pointing to the corresponding `agent.skill.*` translation key 2. Keep the existing hardcoded `title`/`description` as fallbacks 3. Update `SkillList`, `DefaultSkillPanel`, and `GenericSkillPanel` components to resolve keys via `t()` from `useTranslation()`, falling back to the raw string props when no key is provided ### Files to modify - `frontend/src/pages/Admin/Agents/skills.js` — add `titleKey`/`descriptionKey` fields - `frontend/src/pages/Admin/Agents/index.jsx` — resolve `titleKey` in `SkillList` - `frontend/src/pages/Admin/Agents/DefaultSkillPanel/index.jsx` — resolve keys via `t()` - `frontend/src/pages/Admin/Agents/GenericSkillPanel/index.jsx` — resolve keys via `t()` ### Notes - `sql-agent` has no existing translation key in `en/common.js` — one would need to be added - `web-browsing` has a `titleKey` but its `AgentWebSearchSelection` component manages its own title internally
yindo closed this issue 2026-06-05 14:50:59 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4936