Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
The i18n page says the widget has 8 built-in locales. It has one:
packages/widget/src/i18n.tsonly registersen, andgetWidgetLocalefalls back to it for any other code. Sodata-locale="es"gives English buttons and placeholders without any warning. The 8 locale files live in@chatcops/core, and neither the widget nor the server uses them.widget/i18n.mdxnow says English is the only built-in language, shows how to translate the widget withstrings(that option already exists, nothing new here), lists onlyenin the table and links Add built-in translations to the widget #55 for built-in translations.i18nserver option with Spanish strings. The server never reads that option. What it does is add "Respond in the user's language. Current locale: es" to the system prompt (packages/server/src/handler.tsline 115), so the section says that now. Error messages the visitor sees come from the widget'sstrings.widget/configuration.mdx: the comment onlocalelisted 8 codes.server/setup.mdx: thei18nline in the example now says the server doesn't read it yet.README.md: the feature line said 8 built-in locales.Whether the unused
i18nserver option should go away or get wired up can be its own issue.How I tested this
pnpm buildinwebsite/passes, and I read the rendered i18n page in the build output.stringsexample from the page type-checks againstWidgetConfig.Checklist
dev