Skip to content

Translate action description and import per-action#67

Open
Ramon-Jimenez wants to merge 4 commits intodevelopmentfrom
feat/action-translate-description
Open

Translate action description and import per-action#67
Ramon-Jimenez wants to merge 4 commits intodevelopmentfrom
feat/action-translate-description

Conversation

@Ramon-Jimenez
Copy link
Copy Markdown
Contributor

@Ramon-Jimenez Ramon-Jimenez commented May 5, 2026

Closes: https://app.clickup.com/t/869d697pd

Summary

  • Include action description in the JSON translation export/import flow (was silently limited to name, so action-description never appeared in the exported JSON and was ignored on import).
  • Move Import JSON translations from the global toolbar to a per-row action (next to "Export JSON translations") and pre-select that row's action in the import dialog. The global entry is removed.

Test plan

  • Open an action with a non-empty description, run Export JSON translations: the JSON inside the ZIP contains both action-name and action-description keys.
  • Translate the file, then on the same row click Import JSON translations, pick the language, confirm: both name and description are stored as translations and rendered in that locale.
  • On a legacy action without a stored description, export still works and import does not throw.
  • The global "Import JSON translations" button no longer appears; the per-row entry does.

🤖 Generated with Claude Code

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.
@bundlemon
Copy link
Copy Markdown

bundlemon Bot commented May 5, 2026

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
1.3MB (-41B 0%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@Ramon-Jimenez Ramon-Jimenez requested a review from gqcorneby May 6, 2026 07:54
Copy link
Copy Markdown
Contributor

@gqcorneby gqcorneby left a comment

Choose a reason for hiding this comment

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

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:

  1. The action picker <Select> in ImportTranslationDialog
  2. selectedAction / presetActionId / effectiveActionId state
  3. The actions / translate reads from useAppContext
  4. The type prop (no longer needed to gate the picker)
  5. The key argument from onSave and startImport

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).

@Ramon-Jimenez
Copy link
Copy Markdown
Contributor Author

@gqcorneby Please, proceed with the changes you are recommending at your convenience

gqcorneby added 3 commits May 6, 2026 20:44
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.
@gqcorneby gqcorneby self-requested a review May 6, 2026 12:47
@gqcorneby
Copy link
Copy Markdown
Contributor

Hi @Ramon-Jimenez! I applied the changes and tested. I don't know why I can't add you as reviewer 😅

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