Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make preview placeholder text translatable #10880

Merged
merged 6 commits into from
Oct 25, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/editor/src/components/post-preview-button/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { get } from 'lodash';
import { get, escape } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -90,8 +90,8 @@ export class PostPreviewButton extends Component {

const markup = `
<div class="editor-post-preview-button__interstitial-message">
<p>Please wait&hellip;</p>
<p>Generating preview.</p>
<p>${ escape( __( 'Please wait&hellip;' ) ) }</p>
Copy link
Member

Choose a reason for hiding this comment

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

The result of _.escape( 'Please wait&hellip;' ); is Please wait&amp;hellip;, which will effectively print to the screen as Please wait&hellip;.

<p>${ escape( __( 'Generating preview.' ) ) }</p>
</div>
<style>
body {
Expand Down