Skip to content

Conversation

@amieiro
Copy link
Contributor

@amieiro amieiro commented Jul 31, 2023

Problem

When you see the strings to translate in a pattern, you don't have a live preview to be able to see the strings in context.

Solution

This PR adds the live preview for the patterns, using the filter and action added in GlotPress.

image

image

Responsive preview (under 1280 px)

image

Testing Instructions

You need to use this GlotPress branch (or the develop branch if this branch has been merged).

You need to add the &pattern_preview=true text in the URL to enable this preview.

To test this PR:

  1. Go to the patterns page in any language.
  2. Click on the link of a pattern to see the live preview.
  3. Click in another projects like WordPress.org, a theme or a plugin to be sure that the preview is only showed in the patterns.

@amieiro amieiro requested a review from akirk July 31, 2023 15:29
@akirk
Copy link
Member

akirk commented Sep 6, 2023

After some hiccups with getting the patch applied and realizing I need to append &pattern_preview=true, it works!

@amieiro
Copy link
Contributor Author

amieiro commented Sep 6, 2023

@akirk can you review this related GlotPress PR, so we can include it in the next GlotPress release?

Copy link
Member

@akirk akirk left a comment

Choose a reason for hiding this comment

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

GlotPress/GlotPress#1665 is already approved, we can move ahead with this one!

@amieiro
Copy link
Contributor Author

amieiro commented Sep 20, 2023

I have released this PR to production and I have informed to the community about this improvement. I close this PR.

@amieiro amieiro closed this Sep 20, 2023
outdoor2kode pushed a commit to outdoor2kode/wordpress.org that referenced this pull request Jan 28, 2024
@amieiro amieiro deleted the add-pattern-preview branch May 28, 2024 09:06
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