gettext comments. Props nbachiyski. see #9112
git-svn-id: http://svn.automattic.com/wordpress/trunk@10774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -984,8 +984,10 @@ function get_calendar($initial = true) {
|
||||
ORDER BY post_date ASC
|
||||
LIMIT 1");
|
||||
|
||||
/* translators: Calendar caption: 1: month name, 2: 4-digit year */
|
||||
$calendar_caption = _x('%1$s %2$s', 'calendar caption');
|
||||
echo '<table id="wp-calendar" summary="' . __('Calendar') . '">
|
||||
<caption>' . sprintf(_c('%1$s %2$s|Used as a calendar caption'), $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
|
||||
<caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
|
||||
<thead>
|
||||
<tr>';
|
||||
|
||||
@@ -1412,7 +1414,8 @@ function automatic_feed_links( $add = true ) {
|
||||
*/
|
||||
function feed_links( $args ) {
|
||||
$defaults = array(
|
||||
'seperator' => _c('»|Seperator character for feed titles in theme head'),
|
||||
/* translators: Separator between blog name and feed type in feed links */
|
||||
'separator' => _x('»', 'feed link'),
|
||||
'feedtitle' => __('%s Feed'),
|
||||
'comstitle' => __('%s Comments Feed'),
|
||||
);
|
||||
@@ -1432,11 +1435,17 @@ function feed_links( $args ) {
|
||||
*/
|
||||
function feed_links_extra( $args ) {
|
||||
$defaults = array(
|
||||
'seperator' => _c('»|Seperator character for feed titles in theme head'),
|
||||
/* translators: Separator between blog name and feed type in feed links */
|
||||
'separator' => _x('»', 'feed link'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: post title */
|
||||
'singletitle' => __('%1$s %2$s %3$s Comments Feed'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: category name */
|
||||
'cattitle' => __('%1$s %2$s %3$s Category Feed'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: tag name */
|
||||
'tagtitle' => __('%1$s %2$s %3$s Tag Feed'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: author name */
|
||||
'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
|
||||
'searchtitle' => __('%1$s %2$s Search Results for "%3$s" Feed'),
|
||||
);
|
||||
|
||||
@@ -1446,27 +1455,27 @@ function feed_links_extra( $args ) {
|
||||
$post = &get_post( $id = 0 );
|
||||
|
||||
if ( comments_open() || pings_open() || $post->comment_count > 0 ) {
|
||||
$title = attribute_escape(sprintf( $args['singletitle'], get_bloginfo('name'), $args['seperator'], wp_specialchars( get_the_title() ) ));
|
||||
$title = attribute_escape(sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], wp_specialchars( get_the_title() ) ));
|
||||
$href = get_post_comments_feed_link( $post->ID );
|
||||
}
|
||||
} elseif ( is_category() ) {
|
||||
$cat_id = intval( get_query_var('cat') );
|
||||
|
||||
$title = attribute_escape(sprintf( $args['cattitle'], get_bloginfo('name'), $args['seperator'], get_cat_name( $cat_id ) ));
|
||||
$title = attribute_escape(sprintf( $args['cattitle'], get_bloginfo('name'), $args['separator'], get_cat_name( $cat_id ) ));
|
||||
$href = get_category_feed_link( $cat_id );
|
||||
} elseif ( is_tag() ) {
|
||||
$tag_id = intval( get_query_var('tag_id') );
|
||||
$tag = get_tag( $tag_id );
|
||||
|
||||
$title = attribute_escape(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['seperator'], $tag->name ));
|
||||
$title = attribute_escape(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $tag->name ));
|
||||
$href = get_tag_feed_link( $tag_id );
|
||||
} elseif ( is_author() ) {
|
||||
$author_id = intval( get_query_var('author') );
|
||||
|
||||
$title = attribute_escape(sprintf( $args['authortitle'], get_bloginfo('name'), $args['seperator'], get_author_name( $author_id ) ));
|
||||
$title = attribute_escape(sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_author_name( $author_id ) ));
|
||||
$href = get_author_feed_link( $author_id );
|
||||
} elseif ( is_search() ) {
|
||||
$title = attribute_escape(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['seperator'], get_search_query() ));
|
||||
$title = attribute_escape(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query() ));
|
||||
$href = get_search_feed_link();
|
||||
}
|
||||
|
||||
|
||||
@@ -150,8 +150,8 @@ desc:"' . mce_escape( __('Toggle fullscreen mode') ) . ' (Alt+Shift+G)"
|
||||
},
|
||||
media:{
|
||||
desc:"' . mce_escape( __('Insert / edit embedded media') ) . '",
|
||||
delta_width:"' . mce_escape( _c('0| Extra width for the media popup in pixels') ) . '",
|
||||
delta_height:"' . mce_escape( _c('0| Extra height for the media popup in pixels') ) . '",
|
||||
delta_width:"' . /* translators: Extra width for the media popup in pixels */ mce_escape( _x('0', 'media popup width') ) . '",
|
||||
delta_height:"' . /* translators: Extra height for the media popup in pixels */ mce_escape( _x('0', 'media popup height') ) . '",
|
||||
edit:"' . mce_escape( __('Edit embedded media') ) . '"
|
||||
},
|
||||
fullpage:{
|
||||
@@ -213,12 +213,12 @@ indent_desc:"' . mce_escape( __('Indent') ) . '",
|
||||
undo_desc:"' . mce_escape( __('Undo') ) . ' (Ctrl+Z)",
|
||||
redo_desc:"' . mce_escape( __('Redo') ) . ' (Ctrl+Y)",
|
||||
link_desc:"' . mce_escape( __('Insert/edit link') ) . ' (Alt+Shift+A)",
|
||||
link_delta_width:"' . mce_escape( _c('0| Extra width for the link popup in pixels') ) . '",
|
||||
link_delta_height:"' . mce_escape( _c('0| Extra height for the link popup in pixels') ) . '",
|
||||
link_delta_width:"' . /* translators: Extra width for the link popup in pixels */ mce_escape( _x('0', 'link popup width') ) . '",
|
||||
link_delta_height:"' . /* translators: Extra height for the link popup in pixels */ mce_escape( _x('0', 'link popup height') ) . '",
|
||||
unlink_desc:"' . mce_escape( __('Unlink') ) . ' (Alt+Shift+S)",
|
||||
image_desc:"' . mce_escape( __('Insert/edit image') ) . ' (Alt+Shift+M)",
|
||||
image_delta_width:"' . mce_escape( _c('0| Extra width for the image popup in pixels') ) . '",
|
||||
image_delta_height:"' . mce_escape( _c('0| Extra height for the image popup in pixels') ) . '",
|
||||
image_delta_width:"' . /* translators: Extra width for the image popup in pixels */ mce_escape( _x('0', 'image popup width') ) . '",
|
||||
image_delta_height:"' . /* translators: Extra height for the image popup in pixels */ mce_escape( _x('0', 'image popup height') ) . '",
|
||||
cleanup_desc:"' . mce_escape( __('Cleanup messy code') ) . '",
|
||||
code_desc:"' . mce_escape( __('Edit HTML Source') ) . '",
|
||||
sub_desc:"' . mce_escape( __('Subscript') ) . '",
|
||||
@@ -242,8 +242,8 @@ path:"' . mce_escape( __('Path') ) . '",
|
||||
newdocument:"' . mce_escape( __('Are you sure you want to clear all contents?') ) . '",
|
||||
toolbar_focus:"' . mce_escape( __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X') ) . '",
|
||||
more_colors:"' . mce_escape( __('More colors') ) . '",
|
||||
colorpicker_delta_width:"' . mce_escape( _c('0| Extra width for the colorpicker popup in pixels') ) . '",
|
||||
colorpicker_delta_height:"' . mce_escape( _c('0| Extra height for the colorpicker popup in pixels') ) . '"
|
||||
colorpicker_delta_width:"' . /* translators: Extra width for the colorpicker popup in pixels */ mce_escape( _x('0', 'colorpicker popup width') ) . '",
|
||||
colorpicker_delta_height:"' . /* translators: Extra height for the colorpicker popup in pixels */ mce_escape( _x('0', 'colorpicker popup height') ) . '"
|
||||
});
|
||||
|
||||
tinyMCE.addI18n("' . $language . '.advanced_dlg",{
|
||||
|
||||
@@ -222,14 +222,22 @@ function __ngettext_noop() {
|
||||
* @since 2.5
|
||||
* @param $single Single form to be i18ned
|
||||
* @param $plural Plural form to be i18ned
|
||||
* @param $number Not used, here for compatibility with _n, optional
|
||||
* @param $domain Not used, here for compatibility with _n, optional
|
||||
* @return array array($single, $plural)
|
||||
*/
|
||||
function _n_noop( $single, $plural, $number = 1, $domain = 'default' ) {
|
||||
function _n_noop( $single, $plural ) {
|
||||
return array( $single, $plural );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register plural strings with context in POT file, but don't translate them.
|
||||
*
|
||||
* @see _n_noop()
|
||||
*/
|
||||
function _nx_noop( $single, $plural, $context ) {
|
||||
return array( $single, $plural, $context );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Loads MO file into the list of domains.
|
||||
*
|
||||
|
||||
@@ -178,13 +178,16 @@ class WP_Locale {
|
||||
// Numbers formatting
|
||||
// See http://php.net/number_format
|
||||
|
||||
$trans = _c('number_format_decimals|$decimals argument for http://php.net/number_format, default is 0');
|
||||
/* translators: $decimals argument for http://php.net/number_format, default is 0 */
|
||||
$trans = __('number_format_decimals');
|
||||
$this->number_format['decimals'] = ('number_format_decimals' == $trans) ? 0 : $trans;
|
||||
|
||||
$trans = _c('number_format_decimal_point|$dec_point argument for http://php.net/number_format, default is .');
|
||||
/* translators: $dec_point argument for http://php.net/number_format, default is . */
|
||||
$trans = __('number_format_decimal_point');
|
||||
$this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;
|
||||
|
||||
$trans = _c('number_format_thousands_sep|$thousands_sep argument for http://php.net/number_format, default is ,');
|
||||
/* translators: $thousands_sep argument for http://php.net/number_format, default is , */
|
||||
$trans = __('number_format_thousands_sep');
|
||||
$this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;
|
||||
|
||||
// Import global locale vars set during inclusion of $locale.php.
|
||||
|
||||
@@ -1193,9 +1193,12 @@ function wp_post_revision_title( $revision, $link = true ) {
|
||||
if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )
|
||||
return false;
|
||||
|
||||
$datef = _c( 'j F, Y @ G:i|revision date format');
|
||||
$autosavef = __( '%s [Autosave]' );
|
||||
$currentf = __( '%s [Current Revision]' );
|
||||
/* translators: revision date format, see http://php.net/date */
|
||||
$datef = _x( 'j F, Y @ G:i', 'revision date format');
|
||||
/* translators: 1: date */
|
||||
$autosavef = __( '%1$s [Autosave]' );
|
||||
/* translators: 1: date */
|
||||
$currentf = __( '%1$s [Current Revision]' );
|
||||
|
||||
$date = date_i18n( $datef, strtotime( $revision->post_modified_gmt . ' +0000' ) );
|
||||
if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
|
||||
@@ -1260,7 +1263,8 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) {
|
||||
break;
|
||||
}
|
||||
|
||||
$titlef = _c( '%1$s by %2$s|post revision 1:datetime, 2:name' );
|
||||
/* translators: post revision: 1: when, 2: author name */
|
||||
$titlef = _x( '%1$s by %2$s', 'post revision' );
|
||||
|
||||
if ( $parent )
|
||||
array_unshift( $revisions, $post );
|
||||
|
||||
@@ -231,7 +231,8 @@ function wp_default_scripts( &$scripts ) {
|
||||
'empty' => __('Strength indicator'),
|
||||
'short' => __('Very weak'),
|
||||
'bad' => __('Weak'),
|
||||
'good' => _c('Medium|password strength'),
|
||||
/* translators: password strength */
|
||||
'good' => _x('Medium', 'password strength'),
|
||||
'strong' => __('Strong'),
|
||||
'l10n_print_after' => 'try{convertEntities(pwsL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
@@ -1446,7 +1446,7 @@ function wp_widget_recent_comments($args) {
|
||||
<?php echo $before_title . $title . $after_title; ?>
|
||||
<ul id="recentcomments"><?php
|
||||
if ( $comments ) : foreach ( (array) $comments as $comment) :
|
||||
echo '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="' . clean_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
|
||||
echo '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . clean_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
|
||||
endforeach; endif;?></ul>
|
||||
<?php echo $after_widget; ?>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user