You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate the server's i18n option, which nothing reads #154
ChatCopsServerConfig has an i18n option (packages/server/src/config.ts, line 15), and the setup docs show it in their example, but nothing in packages/server/src reads config.i18n. Passing it changes nothing. The widget's own text comes from its strings option, and the only language handling on the server is the "Respond in the user's language" line it adds to the system prompt when a request has a locale (packages/server/src/handler.ts, lines 114 to 117).
Removing the option outright would break the build for TypeScript users who pass it, so let's deprecate it first and remove it in a later minor release.
What to do
Mark i18n in ChatCopsServerConfig as deprecated with a JSDoc @deprecated tag that says the server ignores it and points to the widget's strings option.
In createChatHandler (packages/server/src/handler.ts, line 13), log one console.warn when config.i18n is set: once per handler, not on every request.
Docs: take the i18n block out of the example in website/src/content/docs/server/setup.mdx (lines 68 to 72) and mark it deprecated in the interface further down (line 96). In website/src/content/docs/widget/i18n.mdx, say it's deprecated where the page mentions it. docs: say which languages the widget ships #151 rewrites that page, so start from that version once it's merged.
Acceptance criteria
i18n has a @deprecated JSDoc note, and the type still accepts it
One warning when i18n is set and none when it isn't, with tests in packages/server/tests/handler.test.ts
The setup docs no longer suggest using it
Changeset for @chatcops/server (patch)
pnpm -r build, pnpm -r typecheck and pnpm test pass
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #154. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.
I'd like to take this one. I'll add a @deprecated note to i18n that points to the widget's strings, warn once in createChatHandler when it's set (with tests for both cases), drop it from the setup example and mark it in the interface docs, and add a patch changeset for the server. For widget/i18n.mdx I'll build on #151 once it's merged.
Hey @prakashNalla, it's yours, next to discord-bot #37. That plan covers it, and #151 is merged now, so widget/i18n.mdx on dev already has the new text to build on.
Activity
prakashNalla commentedon Oct 18, 2026
I'd like to take this one. I'll add a
@deprecatednote toi18nthat points to the widget'sstrings, warn once increateChatHandlerwhen it's set (with tests for both cases), drop it from the setup example and mark it in the interface docs, and add a patch changeset for the server. Forwidget/i18n.mdxI'll build on #151 once it's merged.anurag629 commentedon Oct 19, 2026
Hey @prakashNalla, it's yours, next to discord-bot #37. That plan covers it, and #151 is merged now, so
widget/i18n.mdxon dev already has the new text to build on.Let me know if you have any questions.