diff --git src/wp-admin/js/language-chooser.js src/wp-admin/js/language-chooser.js
index 628b8a8..63f2ce6 100644
|
|
|
1 | 1 | jQuery( function($) { |
2 | | |
| 2 | /* |
| 3 | * Set the correct translation to the continue button and show a spinner |
| 4 | * when downloading a language. |
| 5 | */ |
3 | 6 | var select = $( '#language' ), |
4 | 7 | submit = $( '#language-continue' ); |
5 | 8 | |
… |
… |
if ( ! $( 'body' ).hasClass( 'language-chooser' ) ) { |
8 | 11 | } |
9 | 12 | |
10 | 13 | select.focus().on( 'change', function() { |
| 14 | /* |
| 15 | * When a language is selected, set matching translation to continue button |
| 16 | * and attach the language attribute. |
| 17 | */ |
11 | 18 | var option = select.children( 'option:selected' ); |
12 | 19 | submit.attr({ |
13 | 20 | value: option.data( 'continue' ), |
… |
… |
select.focus().on( 'change', function() { |
16 | 23 | }); |
17 | 24 | |
18 | 25 | $( 'form' ).submit( function() { |
19 | | // Don't show a spinner for English and installed languages, |
20 | | // as there is nothing to download. |
| 26 | // Only show spinner for not-installed languages as there is nothing to download. |
21 | 27 | if ( ! select.children( 'option:selected' ).data( 'installed' ) ) { |
22 | 28 | $( this ).find( '.step .spinner' ).css( 'visibility', 'visible' ); |
23 | 29 | } |