Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 22260)
+++ wp-includes/script-loader.php	(working copy)
@@ -63,7 +63,8 @@
 
 	$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
 	did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
-		'warnDelete' => __("You are about to permanently delete the selected items.\n  'Cancel' to stop, 'OK' to delete.")
+		'warnDelete' => __("You are about to permanently delete the selected items.\n  'Cancel' to stop, 'OK' to delete."),
+		'l10n_print_after' => wp_js_i18n_plural( 'commonL10n.testPlural', _n_noop( 'Singular', '%d Plural' ) )
 	) );
 
 	$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 );
@@ -874,6 +875,29 @@
 	}
 }
 
+function wp_js_i18n_plural( $variable, $n_noop ) {
+	if ( ! did_action( 'init' ) )
+		return;
+
+	$domain = $n_noop['domain'] ? $n_noop['domain'] : 'default';
+	$mo = get_translations_for_domain( $domain );
+
+	$entry = new Translation_Entry( array( 'singular' => $n_noop['singular'], 'plural' => $n_noop['plural'], 'context' => $n_noop['context'] ) );
+	if ( $translated = $mo->translate_entry( $entry ) ) {
+		$translations = $translated->translations;
+		list( $nplurals, $expression ) = $mo->nplurals_and_expression_from_header( $mo->get_header( 'Plural-Forms' ) );
+	} else {
+		$translations = array( $n_noop['singular'], $n_noop['plural'] );
+		$nplurals = 2;
+		$expression = 'n != 1';
+	}
+	$nplurals--;
+
+	return "$variable = function(n) {\n\tvar i = ($expression),\n\t\tt = " . json_encode( (object) $translations )
+		. ",\n\tstring;\n\tif (typeof i === 'boolean') i = i ? 1 : 0;\n\tstring = i > $nplurals ? t[$nplurals] : t[i];"
+		. "\n\treturn string.replace(/%(s|d)/, n);}";
+}
+
 add_action( 'wp_default_scripts', 'wp_default_scripts' );
 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
