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

I18n: Make preview popup loader strings translateable #3301

Closed
wants to merge 1 commit into from
Closed

I18n: Make preview popup loader strings translateable #3301

wants to merge 1 commit into from

Conversation

Soean
Copy link
Member

@Soean Soean commented Nov 1, 2017

Description

Adds translate functions to the text strings in the preview popup loader.

@aduth aduth mentioned this pull request Nov 2, 2017
3 tasks
@@ -76,8 +76,8 @@ export class PreviewButton extends Component {

const markup = `
<div>
<p>Please wait&hellip;</p>
<p>Generating preview.</p>
<p>${ __( '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.

Unlike with React, we don't get string escaping for free here, so there is a potential risk with inserting this into raw markup.

https://codex.wordpress.org/I18n_for_WordPress_Developers#HTML

We may need to consider patterns for sanitization.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

We could also generate this with wp.element.renderToStaticMarkup as an element.

Or just Lodash _.escape

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

@Soean Are you able to revisit this one? Should we just close it?

@@ -76,8 +76,8 @@ export class PreviewButton extends Component {

const markup = `
<div>
<p>Please wait&hellip;</p>
<p>Generating preview.</p>
<p>${ __( '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.

We could also generate this with wp.element.renderToStaticMarkup as an element.

Or just Lodash _.escape

@aduth aduth added [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. Internationalization (i18n) Issues or PRs related to internationalization efforts labels Mar 6, 2018
@tofumatt
Copy link
Member

tofumatt commented Jul 5, 2018

Looks like this PR has got stale, so closing it for now. If you can revisit it feel free to re-open this PR or open a new PR.

@tofumatt
Copy link
Member

tofumatt commented Jul 5, 2018

Closed this but filed #7725 to track this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants