Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 19969)
+++ wp-includes/theme.php	(working copy)
@@ -187,60 +187,58 @@
 		'Description' => 'Description',
 		'Author' => 'Author',
 		'AuthorURI' => 'Author URI',
+		'TextDomain' => 'Text Domain',
+		'DomainPath' => 'Domain Path',
 		'Version' => 'Version',
 		'Template' => 'Template',
 		'Status' => 'Status',
 		'Tags' => 'Tags'
 		);
 
-	$themes_allowed_tags = array(
-		'a' => array(
-			'href' => array(),'title' => array()
-			),
-		'abbr' => array(
-			'title' => array()
-			),
-		'acronym' => array(
-			'title' => array()
-			),
-		'code' => array(),
-		'em' => array(),
-		'strong' => array()
-	);
-
 	$theme_data = get_file_data( $theme_file, $default_headers, 'theme' );
 
-	$theme_data['Name'] = $theme_data['Title'] = wp_kses( $theme_data['Name'], $themes_allowed_tags );
+	$allowed_tags = $allowed_tags_in_links = array(
+		'abbr'    => array( 'title' => true ),
+		'acronym' => array( 'title' => true ),
+		'code'    => true,
+		'em'      => true,
+		'strong'  => true,
+	);
+	$allowed_tags['a'] = array( 'href' => true, 'title' => true );
 
-	$theme_data['URI'] = esc_url( $theme_data['URI'] );
+	// Sanitized all displayed data.
 
-	$theme_data['Description'] = wptexturize( wp_kses( $theme_data['Description'], $themes_allowed_tags ) );
+	// Author and Name are marked up inside <a> tags. Don't allow these.
+	$theme_data['Author']      = wp_kses( $theme_data['Author'], $allowed_tags_in_links );
+	$theme_data['AuthorName']  = $theme_data['Author'];
 
-	$theme_data['AuthorURI'] = esc_url( $theme_data['AuthorURI'] );
+	$theme_data['Name']        = wp_kses( $theme_data['Name'],   $allowed_tags_in_links );
+	$theme_data['Title']       = $theme_data['Name'];
 
-	$theme_data['Template'] = wp_kses( $theme_data['Template'], $themes_allowed_tags );
+	$theme_data['Description'] = wp_kses( $theme_data['Description'], $allowed_tags );
+	$theme_data['Version']     = wp_kses( $theme_data['Version'],     $allowed_tags );
+	$theme_data['Template']    = wp_kses( $theme_data['Template'],    $allowed_tags );
+	$theme_data['Status']      = wp_kses( $theme_data['Status'],      $allowed_tags );
 
-	$theme_data['Version'] = wp_kses( $theme_data['Version'], $themes_allowed_tags );
-
-	if ( $theme_data['Status'] == '' )
+	if ( ! $theme_data['Status'] )
 		$theme_data['Status'] = 'publish';
-	else
-		$theme_data['Status'] = wp_kses( $theme_data['Status'], $themes_allowed_tags );
 
-	if ( $theme_data['Tags'] == '' )
+	$theme_data['URI']         = esc_url( $theme_data['URI'] );
+	$theme_data['AuthorURI']   = esc_url( $theme_data['AuthorURI'] );
+
+	if ( is_string( $theme_data['Tags'] ) )
+		$theme_data['Tags'] = array_map( 'trim', explode( ',', strip_tags( $theme_data['Tags'] ) ) );
+	elseif ( ! $theme_data['Tags'] )
 		$theme_data['Tags'] = array();
-	else
-		$theme_data['Tags'] = array_map( 'trim', explode( ',', wp_kses( $theme_data['Tags'], array() ) ) );
 
-	if ( $theme_data['Author'] == '' ) {
-		$theme_data['Author'] = $theme_data['AuthorName'] = __('Anonymous');
+	// Apply markup
+	$theme_data['Description'] = wptexturize( $theme_data['Description'] );
+
+	if ( $theme_data['Author'] ) {
+		if ( $theme_data['AuthorURI'] )
+			$theme_data['Author'] = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $theme_data['AuthorURI'], esc_attr__( 'Visit author homepage' ), $theme_data['Author'] );
 	} else {
-		$theme_data['AuthorName'] = wp_kses( $theme_data['Author'], $themes_allowed_tags );
-		if ( empty( $theme_data['AuthorURI'] ) ) {
-			$theme_data['Author'] = $theme_data['AuthorName'];
-		} else {
-			$theme_data['Author'] = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $theme_data['AuthorURI'], esc_attr__( 'Visit author homepage' ), $theme_data['AuthorName'] );
-		}
+		$theme_data['Author'] = $theme_data['AuthorName'] = __( 'Anonymous' );
 	}
 
 	return $theme_data;
@@ -287,7 +285,7 @@
 
 		$name        = $theme_data['Name'];
 		$title       = $theme_data['Title'];
-		$description = wptexturize($theme_data['Description']);
+		$description = $theme_data['Description'];
 		$version     = $theme_data['Version'];
 		$author      = $theme_data['Author'];
 		$template    = $theme_data['Template'];
@@ -437,6 +435,8 @@
 			'Tags' => $theme_data['Tags'],
 			'Theme Root' => $theme_root,
 			'Theme Root URI' => str_replace( WP_CONTENT_DIR, content_url(), $theme_root ),
+			'TextDomain' => $theme_data['TextDomain'],
+			'DomainPath' => $theme_data['DomainPath'],
 		);
 	}
 
Index: wp-content/themes/twentyten/style.css
===================================================================
--- wp-content/themes/twentyten/style.css	(revision 19962)
+++ wp-content/themes/twentyten/style.css	(working copy)
@@ -7,6 +7,8 @@
 License: GNU General Public License
 License URI: license.txt
 Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu
+Text Domain: twentyten
+Domain Path: /languages
 */
 
 
Index: wp-admin/includes/file.php
===================================================================
--- wp-admin/includes/file.php	(revision 19962)
+++ wp-admin/includes/file.php	(working copy)
@@ -34,9 +34,9 @@
 	'video.php' => __('Video Attachment Template'),
 	'audio.php' => __('Audio Attachment Template'),
 	'application.php' => __('Application Attachment Template'),
-	'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ),
 	'.htaccess' => __( '.htaccess (for rewrite rules )' ),
 	// Deprecated files
+	'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ),
 	'wp-layout.css' => __( 'Stylesheet' ),
 	'wp-comments.php' => __( 'Comments Template' ),
 	'wp-comments-popup.php' => __( 'Popup Comments Template' ),
@@ -51,21 +51,25 @@
  * @uses _cleanup_header_comment
  * @uses $wp_file_descriptions
  * @param string $file Filesystem path or filename
+ * @param array $theme_data Optional. Theme data
  * @return string Description of file from $wp_file_descriptions or basename of $file if description doesn't exist
  */
-function get_file_description( $file ) {
+function get_file_description( $file, $theme_data = null ) {
 	global $wp_file_descriptions;
 
-	if ( isset( $wp_file_descriptions[basename( $file )] ) ) {
-		return $wp_file_descriptions[basename( $file )];
-	}
-	elseif ( file_exists( $file ) && is_file( $file ) ) {
+	if ( isset( $wp_file_descriptions[ basename( $file ) ] ) ) {
+		return $wp_file_descriptions[ basename( $file ) ];
+	} elseif ( file_exists( $file ) && is_file( $file ) ) {
 		$template_data = implode( '', file( $file ) );
-		if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ))
-			return sprintf( __( '%s Page Template' ), _cleanup_header_comment($name[1]) );
+		if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) ) {
+			$page_template = _cleanup_header_comment( $name[1] );
+			if ( ! empty( $theme_data['TextDomain'] ) )
+				$page_template = translate( $page_template, $theme_data['TextDomain'] );
+			return sprintf( __( '%s Page Template' ), $page_template );
+		}
 	}
 
-	return basename( $file );
+	return trim( basename( $file ) );
 }
 
 /**
Index: wp-admin/includes/theme.php
===================================================================
--- wp-admin/includes/theme.php	(revision 19962)
+++ wp-admin/includes/theme.php	(working copy)
@@ -177,6 +177,7 @@
 	$themes = get_themes();
 	$theme = get_current_theme();
 	$templates = $themes[$theme]['Template Files'];
+	$textdomain = $themes[$theme]['TextDomain'];
 	$page_templates = array();
 
 	if ( is_array( $templates ) ) {
@@ -194,13 +195,16 @@
 
 			$template_data = implode( '', file( $template ));
 
-			$name = '';
 			if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) )
-				$name = _cleanup_header_comment($name[1]);
+				$name = trim( _cleanup_header_comment( $name[1] ) );
+			else
+				continue;
 
-			if ( !empty( $name ) ) {
-				$page_templates[trim( $name )] = $basename;
-			}
+			if ( $textdomain )
+				$name = translate( $name, $textdomain );
+
+			if ( $name )
+				$page_templates[ $name ] = $basename;
 		}
 	}
 
Index: wp-admin/includes/class-wp-plugins-list-table.php
===================================================================
--- wp-admin/includes/class-wp-plugins-list-table.php	(revision 19962)
+++ wp-admin/includes/class-wp-plugins-list-table.php	(working copy)
@@ -345,7 +345,7 @@
 				$description = '<p><strong>' . $dropins[ $plugin_file ][0] . ' <span class="attention">' . __('Inactive:') . '</span></strong> ' . sprintf( __( 'Requires <code>%s</code> in <code>wp-config.php</code>.' ), "define('" . $dropins[ $plugin_file ][1] . "', true);" ) . '</p>';
 			}
 			if ( $plugin_data['Description'] )
-				$description .= '<p>' . $plugin_data['Description'] . '</p>';
+				$description .= '<p>' . wptexturize( $plugin_data['Description'] ) . '</p>';
 		} else {
 			$is_active_for_network = is_plugin_active_for_network($plugin_file);
 			if ( $screen->is_network )
@@ -389,7 +389,7 @@
 		$checkbox_id =  "checkbox_" . md5($plugin_data['Name']);
 		$checkbox = in_array( $status, array( 'mustuse', 'dropins' ) ) ? '' : "<input type='checkbox' name='checked[]' value='" . esc_attr( $plugin_file ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $plugin_data['Name'] . "</label>";
 		if ( 'dropins' != $context ) {
-			$description = '<p>' . ( $plugin_data['Description'] ? $plugin_data['Description'] : '&nbsp;' ) . '</p>';
+			$description = '<p>' . ( $plugin_data['Description'] ? wptexturize( $plugin_data['Description'] ) : '&nbsp;' ) . '</p>';
 			$plugin_name = $plugin_data['Name'];
 		}
 
Index: wp-admin/theme-editor.php
===================================================================
--- wp-admin/theme-editor.php	(revision 19962)
+++ wp-admin/theme-editor.php	(working copy)
@@ -138,7 +138,7 @@
  <div id="message" class="updated"><p><?php _e('File edited successfully.') ?></p></div>
 <?php endif;
 
-$description = get_file_description($file);
+$description = get_file_description( $file, $themes[ $theme ] );
 $desc_header = ( $description != $file_show ) ? "$description <span>($file_show)</span>" : $file_show;
 
 $is_child_theme = $themes[$theme]['Template'] != $themes[$theme]['Stylesheet'];
@@ -187,7 +187,7 @@
 		if ( $is_child_theme && strpos( $template_file, trailingslashit( $template_dir ) ) === 0 )
 			continue;
 
-		$description = trim( get_file_description($template_file) );
+		$description = get_file_description( $template_file, $themes[ $theme ] );
 		$template_show = basename($template_file);
 		$filedesc = ( $description != $template_file ) ? "$description<br /><span class='nonessential'>($template_show)</span>" : "$description";
 		$filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description<br /><span class='nonessential'>($template_show)</span></span>" : $filedesc;
@@ -209,7 +209,7 @@
 		if ( $is_child_theme && strpos( $style_file, trailingslashit( $template_dir ) ) === 0 )
 			continue;
 
-		$description = trim( get_file_description($style_file) );
+		$description = get_file_description( $style_file, $themes[ $theme ] );
 		$style_show = basename($style_file);
 		$filedesc = ( $description != $style_file ) ? "$description<br /><span class='nonessential'>($style_show)</span>" : "$description";
 		$filedesc = ( $style_file == $file ) ? "<span class='highlight'>$description<br /><span class='nonessential'>($style_show)</span></span>" : $filedesc;
Index: wp-admin/themes.php
===================================================================
--- wp-admin/themes.php	(revision 19962)
+++ wp-admin/themes.php	(working copy)
@@ -137,9 +137,20 @@
 	}
 	echo implode ( ' | ', $options );
 
-	if ( $ct->tags ) : ?>
-	<p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>
-	<?php endif; ?>
+	if ( $ct->tags )  {
+		$f = array();
+		$feature_list = get_theme_feature_list();
+		foreach ( $feature_list as $feature_group => $features ) {
+			foreach ( $features as $tag => $translated ) {
+				if ( in_array( $tag, $ct->tags ) )
+					$f[] = $translated;
+			}
+		}
+		/* translators: %l is a placeholder for wp_sprintf(). (Lowercase L.) */
+		echo '<p>' . wp_sprintf( __( 'Features: %l.' ), $f ) . '</p>';
+		unset( $f, $feature_list, $tag, $translated, $feature_group, $features );
+	}
+?>
 </div>
 <?php theme_update_available($ct); ?>
 

