From 8a9dc1159056e255262f49d20c3cd793b1609317 Mon Sep 17 00:00:00 2001 From: atimmer Date: Thu, 28 Jun 2018 02:24:43 +0000 Subject: [PATCH] Docs: Improve JSDoc for `language-chooser.js`. Props ireneyoast, manuelaugustin. Fixes #43950. Built from https://develop.svn.wordpress.org/trunk@43334 git-svn-id: http://core.svn.wordpress.org/trunk@43162 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/language-chooser.js | 12 +++++++++--- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/wp-admin/js/language-chooser.js b/wp-admin/js/language-chooser.js index 628b8a81fb..9ca3ea679a 100644 --- a/wp-admin/js/language-chooser.js +++ b/wp-admin/js/language-chooser.js @@ -1,5 +1,8 @@ jQuery( function($) { - +/* + * Set the correct translation to the continue button and show a spinner + * when downloading a language. + */ var select = $( '#language' ), submit = $( '#language-continue' ); @@ -8,6 +11,10 @@ if ( ! $( 'body' ).hasClass( 'language-chooser' ) ) { } select.focus().on( 'change', function() { + /* + * When a language is selected, set matching translation to continue button + * and attach the language attribute. + */ var option = select.children( 'option:selected' ); submit.attr({ value: option.data( 'continue' ), @@ -16,8 +23,7 @@ select.focus().on( 'change', function() { }); $( 'form' ).submit( function() { - // Don't show a spinner for English and installed languages, - // as there is nothing to download. + // Show spinner for languages that need to be downloaded. if ( ! select.children( 'option:selected' ).data( 'installed' ) ) { $( this ).find( '.step .spinner' ).css( 'visibility', 'visible' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 6beb0d8dd0..89dddda583 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43333'; +$wp_version = '5.0-alpha-43334'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.