Opened 10 years ago
Closed 10 years ago
#27738 closed defect (bug) (fixed)
Customizer: Make header image strings ready for translation
Reported by: | ocean90 | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Themes | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
Related: #21785
trunk/src/wp-includes/class-wp-customize-control.php@27985#L855
<?php // @todo translate (and look to custom-header.php for inspiration) echo ( 'Personalize your site with your own header image.' ) . ' '; if ( $width && $height ) { printf( ( 'While you can crop images to your liking after clicking <strong>Add new</strong>, your theme recommends a header size of <strong>%d × %d</strong> pixels.' ), $width, $height ); } elseif ( $width ) { printf( ( 'While you can crop images to your liking after clicking <strong>Add new</strong>, your theme recommends a header width of <strong>%d</strong> pixels.' ), $width ); } else { printf( ( 'While you can crop images to your liking after clicking <strong>Add new</strong>, your theme recommends a header height of <strong>%d</strong> pixels.' ), $height ); } ?>
Text in custom-header.php: trunk/src/wp-admin/custom-header.php@27985#L511
Attachments (1)
Change History (13)
#3
@
10 years ago
I would like to drop "Personalize your site with your own header image." No other customizer section has such an introduction and it feels out of place. The other strings are fine.
#4
@
10 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 28082:
#7
@
10 years ago
I came up with this simple version:
- There was a problem trying to load themes. Can’t communicate with WordPress.org.
Optionally could tack "Please try again." onto the end of that.
It's based on "'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>."
I'm fine with using more of this string... But we can't really mention server configuration, as this is all JS. Instead,
- An unexpected error occurred. Something may be wrong with WordPress.org. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.
Doesn't really matter to me.
#8
follow-up:
↓ 9
@
10 years ago
- Component changed from Appearance to Themes
Larger issue: I can't get that error to display. The JSONP request just hangs forever when my internet is disconnected. Perhaps we need to add a timeout of say 30000ms or something?
#9
in reply to:
↑ 8
;
follow-up:
↓ 10
@
10 years ago
Replying to nacin:
Larger issue: I can't get that error to display. The JSONP request just hangs forever when my internet is disconnected. Perhaps we need to add a timeout of say 30000ms or something?
That's JSONP, there is no real error handling. We can set the timeout
setting, but there are some issues with Firefox.
In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.
https://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings (Bug ticket)
But at least you will get the error message with the timeout
setting.
#10
in reply to:
↑ 9
@
10 years ago
Replying to ocean90:
But at least you will get the error message with the
timeout
setting.
Yes, let's add one. What should be the amount? 30 seconds seems a bit long.
See also trunk/src/wp-admin/theme-install.php?rev=27985#L52 (from [27610]).