Skip to content

fix(i18n): replace missing provider delete tooltip lookup - #371

Merged
diegosouzapw merged 1 commit into
cheaper-inference:mainfrom
kfiramar:fix/provider-delete-tooltip-i18n
Mar 14, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:mainfrom
kfiramar:fix/provider-delete-tooltip-i18n

Conversation

@kfiramar

Copy link
Copy Markdown
Contributor

Summary

  • replace the provider detail page's missing providers.deleteConnection lookup with the existing providers.delete label
  • keep the fix to a single call site instead of adding a redundant translation key across all locales

Problem

The provider detail page was requesting t("deleteConnection") from the providers namespace.

That key does not exist in the locale files. The namespace already defines:

  • delete
  • deleteConnectionConfirm

but not deleteConnection.

As a result, opening the provider detail page emitted a runtime i18n error instead of rendering a valid tooltip label for the delete button.

Root Cause

This was a bad message-key lookup in the UI, not missing locale content.

The page needed the short button label for the delete icon tooltip, but it was asking for a non-existent key instead of reusing the existing providers.delete string that already matches the intended UI text.

Why This Fix

Adding a new deleteConnection key to every locale would only duplicate an existing concept.

The tooltip is just the delete action label, so the smallest correct fix is to reuse providers.delete at the call site.

Proof

I verified the bug directly on unpatched origin/main:

  • src/app/(dashboard)/dashboard/providers/[id]/page.tsx requests t("deleteConnection")
  • src/i18n/messages/en.json contains providers.delete and providers.deleteConnectionConfirm, but not providers.deleteConnection
  • opening /dashboard/providers/codex on unpatched origin/main reproduced the exact runtime error:
    MISSING_MESSAGE: providers.deleteConnection

I also verified the patched branch:

  • the page renders the delete buttons with title="Delete"
  • the MISSING_MESSAGE: providers.deleteConnection error no longer appears in a fresh browser session

Verification

  • built the branch with PORT=20131 npm run build
  • verified the provider detail page in a fresh browser session after login
  • confirmed the delete button tooltip resolves to the existing providers.delete message
  • confirmed the prior MISSING_MESSAGE: providers.deleteConnection error reproduces on unpatched origin/main and disappears with this patch

Replace a missing deleteConnection message lookup with the
existing delete label to avoid the provider-page runtime i18n
overlay.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical internationalization issue on the provider detail page. It resolves a runtime error caused by an incorrect translation key lookup for the delete button's tooltip. By simply reusing an already defined and appropriate translation key, the change ensures the UI renders correctly and consistently, improving the overall user experience and system stability without introducing new, redundant translation strings.

Highlights

  • Internationalization (i18n) Fix: Replaced a missing providers.deleteConnection i18n lookup with the existing providers.delete label on the provider detail page.
  • Runtime Error Resolution: Eliminated a runtime i18n error that occurred when opening the provider detail page due to the non-existent translation key.
  • Code Reusability: Opted to reuse an existing translation key (providers.delete) instead of adding a redundant new key across all locales, ensuring consistency and reducing translation overhead.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/app/(dashboard)/dashboard/providers/[id]/page.tsx
    • Updated the i18n key used for the delete button's tooltip from deleteConnection to delete.
Activity
  • No human activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a bug where a missing translation key for a delete button's tooltip was causing a runtime error. The fix correctly replaces the reference to the non-existent providers.deleteConnection key with the existing providers.delete key. This change is a direct and effective solution to the problem described.

@kilo-code-bot

kilo-code-bot Bot commented Mar 14, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • src/app/(dashboard)/dashboard/providers/[id]/page.tsx - No issues

Review Notes

The PR correctly fixes a missing translation key issue:

  1. Change Analysis: The PR changes the button's title attribute from t("deleteConnection") to t("delete") on line 2543.

  2. Verification:

    • deleteConnection key does NOT exist in any translation file (would cause undefined translation)
    • providers.delete key DOES exist (accessible via t("delete") when using useTranslations("providers"))
  3. Conclusion: This is a valid bug fix that resolves a runtime i18n error by using an existing, properly defined translation key.

@diegosouzapw
diegosouzapw merged commit 5faeb58 into cheaper-inference:main Mar 14, 2026
diegosouzapw added a commit that referenced this pull request Mar 14, 2026
bug fixes (PRs #373, #371, #372, #369 by @kfiramar):
- fix(db): provider_connections.group column migration for existing DBs
- fix(i18n): replace missing deleteConnection key with delete in tooltip
- fix(auth): clear stale error metadata on genuine provider recovery
- fix(startup): unify env loading across npm/electron startup paths

code quality improvements (per kilo-code-bot review):
- docs: document result.success vs response.ok patterns in auth.ts
- refactor: normalize overridePath?.trim() in electron/main.js
- docs: explain preferredEnv merge order intent
prakersh pushed a commit to prakersh/OmniRoute that referenced this pull request Mar 26, 2026
…elete-tooltip-i18n

Thanks @kfiramar! Perfect minimal fix — `t("deleteConnection")` was requesting a non-existent key across all 30 locales, causing `MISSING_MESSAGE: providers.deleteConnection` runtime errors on every provider detail page load. Reusing the existing `providers.delete` key is the correct fix. Merged!
prakersh pushed a commit to prakersh/OmniRoute that referenced this pull request Mar 26, 2026
bug fixes (PRs cheaper-inference#373, cheaper-inference#371, cheaper-inference#372, cheaper-inference#369 by @kfiramar):
- fix(db): provider_connections.group column migration for existing DBs
- fix(i18n): replace missing deleteConnection key with delete in tooltip
- fix(auth): clear stale error metadata on genuine provider recovery
- fix(startup): unify env loading across npm/electron startup paths

code quality improvements (per kilo-code-bot review):
- docs: document result.success vs response.ok patterns in auth.ts
- refactor: normalize overridePath?.trim() in electron/main.js
- docs: explain preferredEnv merge order intent
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
…elete-tooltip-i18n

Thanks @kfiramar! Perfect minimal fix — `t("deleteConnection")` was requesting a non-existent key across all 30 locales, causing `MISSING_MESSAGE: providers.deleteConnection` runtime errors on every provider detail page load. Reusing the existing `providers.delete` key is the correct fix. Merged!
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
bug fixes (PRs cheaper-inference#373, cheaper-inference#371, cheaper-inference#372, cheaper-inference#369 by @kfiramar):
- fix(db): provider_connections.group column migration for existing DBs
- fix(i18n): replace missing deleteConnection key with delete in tooltip
- fix(auth): clear stale error metadata on genuine provider recovery
- fix(startup): unify env loading across npm/electron startup paths

code quality improvements (per kilo-code-bot review):
- docs: document result.success vs response.ok patterns in auth.ts
- refactor: normalize overridePath?.trim() in electron/main.js
- docs: explain preferredEnv merge order intent
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…elete-tooltip-i18n

Thanks @kfiramar! Perfect minimal fix — `t("deleteConnection")` was requesting a non-existent key across all 30 locales, causing `MISSING_MESSAGE: providers.deleteConnection` runtime errors on every provider detail page load. Reusing the existing `providers.delete` key is the correct fix. Merged!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
bug fixes (PRs cheaper-inference#373, cheaper-inference#371, cheaper-inference#372, cheaper-inference#369 by @kfiramar):
- fix(db): provider_connections.group column migration for existing DBs
- fix(i18n): replace missing deleteConnection key with delete in tooltip
- fix(auth): clear stale error metadata on genuine provider recovery
- fix(startup): unify env loading across npm/electron startup paths

code quality improvements (per kilo-code-bot review):
- docs: document result.success vs response.ok patterns in auth.ts
- refactor: normalize overridePath?.trim() in electron/main.js
- docs: explain preferredEnv merge order intent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants