Translate action description and import per-action#67
Translate action description and import per-action#67Ramon-Jimenez wants to merge 4 commits intodevelopmentfrom
Conversation
Include description in the action translation export/import flow so it can be translated alongside the name. Move the "Import JSON translations" entry from the global toolbar to a per-row action, mirroring "Export JSON translations" and pre-selecting the row's action in the import dialog.
BundleMonNo change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Hi @Ramon-Jimenez! This action selection in the import dialog always bothered me 😅
Moving the action from global to each row makes more sense. Domain changes are fine, but I think we can clean up the component further and get rid of the action selection in this dialog entirely.
We can parallel the implementation in LandingPageListTable to “stash” the selected actionId in ActionListTable itself when the import row action is clicked, right before calling startImport() with no args.
That lets us drop:
- The action picker
<Select>inImportTranslationDialog selectedAction/presetActionId/effectiveActionIdstate- The
actions/translatereads fromuseAppContext - The
typeprop (no longer needed to gate the picker) - The
keyargument fromonSaveandstartImport
Result: ImportTranslationDialog becomes a generic “pick a language + upload JSON” component, reusable as-is across actions, landing pages, and notifications.
Each parent owns the key it cares about (landingPageId, actionId, or none for notifications).
|
@gqcorneby Please, proceed with the changes you are recommending at your convenience |
Drop the action picker and `type` prop from ImportTranslationDialog. Callers now pass the target id at click time (ActionListTable stores the clicked row id; LandingPageListTable already closed over its landingPageId). The dialog becomes purely "pick language + upload JSON" and its onSave no longer takes a key.
|
Hi @Ramon-Jimenez! I applied the changes and tested. I don't know why I can't add you as reviewer 😅 |
Closes: https://app.clickup.com/t/869d697pd
Summary
name, soaction-descriptionnever appeared in the exported JSON and was ignored on import).Test plan
action-nameandaction-descriptionkeys.description, export still works and import does not throw.🤖 Generated with Claude Code