Skip to content

Add full sentence translations to the pull push dialog to support languages with declinations - #1648

Merged
sejas merged 5 commits into
trunkfrom
update/stu-672-studio-add-full-sentence-translations-pull-push-dialog
Aug 7, 2025
Merged

Add full sentence translations to the pull push dialog to support languages with declinations#1648
sejas merged 5 commits into
trunkfrom
update/stu-672-studio-add-full-sentence-translations-pull-push-dialog

Conversation

@sejas

@sejas sejas commented Aug 6, 2025

Copy link
Copy Markdown
Member

Related issues

Proposed Changes

  • Add full string translations so the environment type will correctly appear in the pull/push dialog
  • Support only the four valid environment types (production, staging, development and local) other types will appear as Production.
  • Update and add tests

Testing Instructions

  • Modify your production or staging WPcom's environment_type to development in network admin settings tab.
  • Run npm start
  • Observe your site appears in Studio
  • Open the sync modal
  • Connect the site
  • Open the pull and push dialogs.
  • Observe the texts remain the same as before. Now it also supports Local, for that case I added "remote Local" to differentiate with Studio site.
Push Pull
Screenshot 2025-08-06 at 17 00 50 Screenshot 2025-08-06 at 17 00 48
Screenshot 2025-08-06 at 17 01 05 Screenshot 2025-08-06 at 17 01 02
Screenshot 2025-08-06 at 17 01 16 Screenshot 2025-08-06 at 17 01 14

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@sejas sejas self-assigned this Aug 6, 2025
@sejas
sejas requested a review from a team August 6, 2025 16:08
@sejas

sejas commented Aug 6, 2025

Copy link
Copy Markdown
Member Author

Badges are being updated in #1645

@ivan-ottinger

Copy link
Copy Markdown
Contributor

Badges are being updated in #1645

I think we could merge your PR first and I will then rebase mine. Going to review yours now. 🙂

@katinthehatsite

Copy link
Copy Markdown
Contributor

Modify your production or staging WPcom's environment_type to development in network admin settings tab.

I am a bit lost on this step. Does this need to be done on the Pressable site? Thanks 🙇

sejas commented Aug 7, 2025

Copy link
Copy Markdown
Member Author

It's in WPcom Network Admin. Let me send you the link.

@katinthehatsite katinthehatsite 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.

I did not spot any regressions and the changes worked as expected for me. I also saw all the versions of the dialog that were presented on the screenshots in the PR description 👍

return parsed.success ? parsed.data : 'production';
};

export const getEnvironmentLabel = ( type: string ): string => {

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.

I was going to mention that this also would need to be updated but I see that it is being implemented in https://github.com/Automattic/studio/pull/1645/files 👍

@ivan-ottinger ivan-ottinger 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.

Nice! Thank you for those changes, Antonio. The logic looks good and works as expected in all cases:

Pull Push
Markup on 2025-08-07 at 10:26:04 Markup on 2025-08-07 at 10:25:43
Markup on 2025-08-07 at 10:27:12 Markup on 2025-08-07 at 10:27:31
Markup on 2025-08-07 at 10:28:20 Markup on 2025-08-07 at 10:28:37
Markup on 2025-08-07 at 10:29:58 Markup on 2025-08-07 at 10:30:23

The Production was used for non-standard environment type as expected as well. 👍🏼

I left just one suggestion / consideration for a copy change in the inline comments below.


Modify your production or staging WPcom's environment_type to development in network admin settings tab.

This is a time-saver when it comes to testing environment_type changes. Thanks!

Comment thread src/modules/sync/hooks/use-sync-dialog-texts.tsx Outdated
Comment thread src/modules/sync/hooks/use-sync-dialog-texts.tsx Outdated
@sejas
sejas merged commit 77c4e57 into trunk Aug 7, 2025
12 checks passed
@sejas
sejas deleted the update/stu-672-studio-add-full-sentence-translations-pull-push-dialog branch August 7, 2025 10:32
local: {
title: __( 'Pull from remote Local' ),
description: __(
"Pulling will overwrite your Studio site's selected files and database with a copy from your remote site with local environment. Unchecked items will not be changed."

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.

This doesn't sound very clear.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We'll remove the remote local environment type from Studio in https://github.com/Automattic/studio/pull/1645/files#diff-afa3cab5af25735a5b33b66f73efe079aadcbc7ded98e89c72fbb2fcb5687eda
Thanks for the feedback.

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.

Thanks for linking those, makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants