[wp-trac] [WordPress Trac] #38762: Customizer "Hide Controls" Text Too long

WordPress Trac noreply at wordpress.org
Sat Nov 12 00:39:09 UTC 2016


#38762: Customizer "Hide Controls" Text Too long
--------------------------+------------------
 Reporter:  Ipstenu       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7
Component:  Customize     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  ui
--------------------------+------------------

Comment (by westonruter):

 The strings are located in `customize.php` at:

 {{{#!php
 <button type="button" class="collapse-sidebar button" aria-expanded="true"
 aria-label="<?php esc_attr_e( 'Hide Controls' ); ?>">
         <span class="collapse-sidebar-arrow"></span>
         <span class="collapse-sidebar-label"><?php _e( 'Hide Controls' );
 ?></span>
 </button>
 }}}

 And then in `script-loader.php`:

 {{{
         'collapseSidebar'    => __( 'Hide Controls' ),
         'expandSidebar'      => __( 'Show Controls' ),
 }}}

 The latter is used in `customize-controls.js` to override the `aria-label`
 in the `button`, while the `collapse-sidebar-label` actually isn't
 changed:

 {{{#!js
 if ( ! paneVisible ) {
         $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-
 label': api.l10n.expandSidebar });
 } else {
         $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-
 label': api.l10n.collapseSidebar });
 }
 }}}

 I should know better, but can the instance of “Hide Controls” in
 `customize.php` be translated differently than the “Hide Controls” that
 appears in `script-loader.php`? I'm not familiar with the specifics of how
 gettext does the lookups.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38762#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list