I18N: Add translator context to all 'Preview' strings#11700
I18N: Add translator context to all 'Preview' strings#11700wppoland wants to merge 16 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
`Preview` is a single English token that lands in translations as a verb (button labels), a noun (preview panes, table headers), or an iframe title. Without a translator context, all 14 in-tree occurrences collapsed onto one entry in `default.po`, forcing translators to choose a single rendering that fit poorly somewhere. This commit gives each occurrence a context that names both the part of speech and the surface it appears on, covering: * Post row action and post-lock dialog button (`verb, ...`). * Submit meta box preview button (`verb, action button to preview the post`). * Theme install list-table action and theme-install template buttons (`verb, ...`). * Theme preview iframe title (`noun, ...`). * Customizer toggle and takeover dialog (`verb`/`noun`, ...). * Header image and background image preview rows (`noun, ...`). * Classic-editor (TinyMCE) toolbar button (`verb, ...`). Extends the scope of WordPressGH-11407 and WordPressGH-11408, which only covered four of these spots. See #64986.
|
Thanks for the PR! There might be some confusion here, we don't really need a separate context for each of these strings, that would be redundant and increase the workload for translators. As noted on the ticket already, just |
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
Co-authored-by: Aaron Jorbin <aaronjorbin@users.noreply.github.com>
t-hamano
left a comment
There was a problem hiding this comment.
I have applied all of @aaronjorbin's suggestions. The changes look good.
Trac ticket: https://core.trac.wordpress.org/ticket/64986
Previewis a single English token that lands in translations as a verb (button labels), a noun (preview panes, table headers), or an iframe title. Without translator context, all 14 in-tree occurrences collapsed onto one entry indefault.po, forcing translators to choose a single rendering that fit poorly somewhere.This PR gives each occurrence a context that names both the part of speech and the surface it appears on:
verb, ...)verb, action button to preview the post)verb, ...)noun, ...)verb/noun, ...)noun, ...)verb, ...)Extends the scope of GH-11407 and GH-11408, which only covered four of these spots and used less specific context strings.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.