Customize: Improve i18n for strings in hidden widget area notices.

Amends [40312].
Props westonruter, ocean90, swissspidy, SergeyBiryukov, michelleweber for copywriting.
See #33567, #33052.
Fixes #39087.

Built from https://develop.svn.wordpress.org/trunk@40330


git-svn-id: http://core.svn.wordpress.org/trunk@40237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter
2017-03-24 22:03:42 +00:00
parent 0d42f8549c
commit 8256ecfecb
4 changed files with 53 additions and 24 deletions

View File

@@ -1616,7 +1616,7 @@
* @returns {void}
*/
updateNotice = function() {
var activeSectionCount = getActiveSectionCount(), message, nonRenderedAreaCount, registeredAreaCount;
var activeSectionCount = getActiveSectionCount(), someRenderedMessage, nonRenderedAreaCount, registeredAreaCount;
noticeContainer.empty();
registeredAreaCount = api.Widgets.data.registeredSidebars.length;
@@ -1624,14 +1624,16 @@
if ( 0 !== activeSectionCount ) {
nonRenderedAreaCount = registeredAreaCount - activeSectionCount;
message = ( 1 === nonRenderedAreaCount ? l10n.someAreasShown.singular : l10n.someAreasShown.plural ).replace( '%d', nonRenderedAreaCount );
someRenderedMessage = l10n.someAreasShown[ nonRenderedAreaCount ];
} else {
message = ( 1 === registeredAreaCount ? l10n.noAreasShown.singular : l10n.noAreasShown.plural ).replace( '%d', registeredAreaCount );
someRenderedMessage = l10n.noAreasShown;
}
if ( someRenderedMessage ) {
noticeContainer.append( $( '<p></p>', {
text: someRenderedMessage
} ) );
}
noticeContainer.append( $( '<p></p>', {
text: message
} ) );
noticeContainer.append( $( '<p></p>', {
text: l10n.navigatePreview
} ) );

File diff suppressed because one or more lines are too long