Skip to content

Include translation function in model fetching dependencies#659

Merged
cristian-tamblay merged 1 commit into
developfrom
fix/models-language-update
May 29, 2026
Merged

Include translation function in model fetching dependencies#659
cristian-tamblay merged 1 commit into
developfrom
fix/models-language-update

Conversation

@Creylay
Copy link
Copy Markdown
Collaborator

@Creylay Creylay commented May 29, 2026

Summary

Model names and descriptions in the Models module were not updating when the language was changed via the language selector. The component had to be reloaded for the correct language to appear. This happened because fetchModels was missing t in its useCallback dependency array, so the API call was never re-triggered on language change. Adding t as a dependency causes a re-fetch whenever the language changes, returning the correct language from the backend via the Accept-Language header already set in the API interceptor.


Type of Change

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • DashAI/front/src/components/models/ModelsRightBar.jsx: Added t to the useCallback dependency array of fetchModels so the model list re-fetches when the language changes.

Testing (optional)

  1. Open the Models module with an active session.
  2. Change the language using the language selector.
  3. Verify that model names and descriptions update immediately without a page reload.

@cristian-tamblay cristian-tamblay merged commit 01631bb into develop May 29, 2026
19 checks passed
@cristian-tamblay cristian-tamblay deleted the fix/models-language-update branch May 29, 2026 20:44
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