fix(admin): add copy action for Original translations on translations edit page#14943
fix(admin): add copy action for Original translations on translations edit page#14943LukasKri wants to merge 8 commits intomedusajs:developfrom
Conversation
… TranslationsForm to avoid variable name duplication - fixes TS errors: - "'TranslationsFormSchema' is already defined." - "'EntityTranslationsSchema' is already defined."
…rence for better type clarity and fix TS error of "Type '{ [x: string]: unknown; id: string; }[]' is not assignable to type '{ [key: string]: string; id: string; }[]'.
Type '{ [x: string]: unknown; id: string; }' is not assignable to type '{ [key: string]: string; id: string; }'.
'string' index signatures are incompatible.
Type 'unknown' is not assignable to type 'string'."
|
|
@LukasKri is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
.../translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx
Show resolved
Hide resolved
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
Thank you for your contribution! After reviewing this PR, we need a few things addressed before we can move forward: Required changes:
Concerns: The How section of the PR description states "Route-scoped change only in translations edit form (no shared DataGrid changes)", but the diff includes changes to two shared DataGrid files:
Could you clarify what was changed in these files and why? If those changes are necessary for the feature, please update the PR description to reflect them accurately. |

Summary
What — What changes are introduced in this PR?
packages/admin/dashboard/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsxCopyfrom@medusajs/uiinside theoriginalcolumn cell renderer.Why — Why are these changes relevant or necessary?
How — How have these changes been implemented?
originalValuesafely,<Copy variant="mini" content={originalValue} className="cursor-pointer" />.Additional TypeScript cleanup included
EntityTranslationsSchema(type alias) →EntityTranslationsTranslationsFormSchema(type alias) →TranslationsFormreferences:TranslationReference({ id: string; [key: string]: unknown })Testing — How have these changes been tested, or how can the reviewer test the feature?
@medusajs/dashboardbuild with local admin setup):/app/settings/translations/edit?reference=product.Closes #14942
Note
Low Risk
Low risk UI-only change within the translations edit grid; main risk is minor layout/typing regressions in this route component.
Overview
Adds a copy-to-clipboard action to the Original column in the translations edit DataGrid, rendering a mini
Copybutton next to non-empty source text.Includes small TypeScript cleanup in the same component: renames inferred schema types to avoid naming collisions and broadens
referencestyping via a newTranslationReferencetype, updating related function/prop signatures accordingly.Written by Cursor Bugbot for commit c4b6e71. This will update automatically on new commits. Configure here.