diff --git a/wp-includes/comment.php b/wp-includes/comment.php
index 16adcdd9e0..0b36043596 100644
--- a/wp-includes/comment.php
+++ b/wp-includes/comment.php
@@ -252,8 +252,10 @@ function get_comments( $args = '' ) {
function get_comment_statuses( ) {
$status = array(
'hold' => __('Unapproved'),
- 'approve' => _c('Approved|adjective'),
- 'spam' => _c('Spam|adjective'),
+ /* translators: comment status */
+ 'approve' => _x('Approved', 'adjective'),
+ /* translators: comment status */
+ 'spam' => _x('Spam', 'adjective'),
);
return $status;
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index f32bf9302c..6fb5a6a419 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -2214,9 +2214,12 @@ function wp_sprintf_l($pattern, $args) {
// Translate and filter the delimiter set (avoid ampersands and entities here)
$l = apply_filters('wp_sprintf_l', array(
- 'between' => _c(', |between list items'),
- 'between_last_two' => _c(', and |between last two list items'),
- 'between_only_two' => _c(' and |between only two list items'),
+ /* translators: used between list items, there is a space after the coma */
+ 'between' => __(', '),
+ /* translators: used between list items, there is a space after the and */
+ 'between_last_two' => __(', and '),
+ /* translators: used between only two list items, there is a space after the and */
+ 'between_only_two' => __(' and '),
));
$args = (array) $args;
diff --git a/wp-includes/js/tinymce/langs/wp-langs.php b/wp-includes/js/tinymce/langs/wp-langs.php
index af6d6d80e6..8e9ae2cd31 100644
--- a/wp-includes/js/tinymce/langs/wp-langs.php
+++ b/wp-includes/js/tinymce/langs/wp-langs.php
@@ -179,7 +179,7 @@ desc:"' . mce_escape( __('Insert page break.') ) . '"
}}});
tinyMCE.addI18n("' . $language . '.advanced",{
-style_select:"' . mce_escape( __('Styles') ) . '",
+style_select:"' . mce_escape( /* translators: TinyMCE font styles */ _x('Styles', 'TinyMCE font styles') ) . '",
font_size:"' . mce_escape( __('Font size') ) . '",
fontdefault:"' . mce_escape( __('Font family') ) . '",
block:"' . mce_escape( __('Format') ) . '",
diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php
index 3237655214..e1b00b78c4 100644
--- a/wp-includes/l10n.php
+++ b/wp-includes/l10n.php
@@ -176,7 +176,7 @@ function __ngettext() {
function _n($single, $plural, $number, $domain = 'default') {
$translations = &get_translations_for_domain( $domain );
$translation = $translations->translate_plural( $single, $plural, $number );
- return apply_filters( 'ngettext', $translation, $single, $plural, $number );
+ return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
}
/**
@@ -191,7 +191,7 @@ function _nc( $single, $plural, $number, $domain = 'default' ) {
function _nx($single, $plural, $number, $context, $domain = 'default') {
$translations = &get_translations_for_domain( $domain );
$translation = $translations->translate_plural( $single, $plural, $number, $context );
- return apply_filters( 'ngettext_with_context ', $translation, $single, $plural, $number, $context );
+ return apply_filters( 'ngettext_with_context ', $translation, $single, $plural, $number, $context, $domain );
}
/**
@@ -340,4 +340,17 @@ function get_translations_for_domain( $domain ) {
return isset($l10n[$domain])? $l10n[$domain] : $empty;
}
+/**
+ * Translates role name. Since the role names are in the database and
+ * not in the source there are dummy gettext calls to get them into the POT
+ * file and this function properly translates them back.
+ *
+ * The before_last_bar() call is needed, because older installs keep the roles
+ * using the old context format: 'Role name|User role' and just skipping the
+ * content after the last bar is easier than fixing them in the DB. New installs
+ * won't suffer from that problem.
+ */
+function translate_user_role( $name ) {
+ return before_last_bar( translate_with_gettext_context( $name, 'User role' ) );
+}
?>