fix(details): translate the OAuth connect button's default label - #6225
Closed
pedrofrxncx wants to merge 1 commit into
Closed
fix(details): translate the OAuth connect button's default label#6225pedrofrxncx wants to merge 1 commit into
pedrofrxncx wants to merge 1 commit into
Conversation
Collaborator
Author
|
Closing as stale: this PR sat past the bot's 48h merge window, main has moved on, and its CI results no longer reflect the current base. This is a housekeeping close, not a rejection of the change — if the underlying problem still exists, the bot will find it again and open a fresh, rebased PR. [studio-bot:stale-close] |
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.
Bug found while working the MCP connections UI focus area (issue #5661).
OAuthAuthenticationState(apps/web/src/components/details/connection/settings-tab/index.tsx) defaults its button label to a hardcoded English string"Authenticate"when nobuttonTextprop is passed. This is exactly the path hit fromSettingsTab(settings-tab/index.tsx:230), so any pt-br user who opens the settings tab of a connection requiring OAuth and hasn't authenticated yet sees an untranslated English button, breaking the i18n rule that all user-facing UI strings go throught().Fix: added
details.settingsTab.authenticateto bothen/details.tsandpt-br/details.ts, and changed the component default tobuttonText ?? t("details.settingsTab.authenticate")instead of a hardcoded string literal. The one existing caller that already passes an explicitbuttonText(apps/web/src/components/details/tool.tsx) is unaffected.To confirm: open a connection's Settings tab for a connection requiring OAuth while not authenticated, with pt-br language selected — the button now reads "Autenticar" instead of "Authenticate".
Checks run locally:
bun run fmt,cd apps/web && bunx tsc --noEmit(clean),bunx oxlinton the three changed files (0 warnings/errors). Full CI validates the rest.Summary by cubic
Localizes the OAuth authenticate button’s default label. Previously it defaulted to the hardcoded English "Authenticate" when no
buttonTextwas provided; now it uses the i18n key "details.settingsTab.authenticate" so pt-br and other locales render correctly.apps/web/src/i18n/en/details.tsandapps/web/src/i18n/pt-br/details.ts.OAuthAuthenticationStateto uset("details.settingsTab.authenticate")only whenbuttonTextis not provided; callers that passbuttonTextare unchanged.Written for commit e7f6d6c. Summary will update on new commits.