diff --git a/wp-includes/pomo/entry.php b/wp-includes/pomo/entry.php index 67f6719b2b..3e4bc3bdd5 100644 --- a/wp-includes/pomo/entry.php +++ b/wp-includes/pomo/entry.php @@ -69,8 +69,13 @@ class Translation_Entry { */ function key() { if (is_null($this->singular)) return false; - // prepend context and EOT, like in MO files - return is_null($this->context)? $this->singular : $this->context.chr(4).$this->singular; + + // Prepend context and EOT, like in MO files + $key = is_null($this->context)? $this->singular : $this->context.chr(4).$this->singular; + // Standardize on \n line endings + $key = str_replace( array( "\r\n", "\r" ), "\n", $key ); + + return $key; } /** diff --git a/wp-includes/pomo/translations.php b/wp-includes/pomo/translations.php index aaf9a35550..6008f4aa18 100644 --- a/wp-includes/pomo/translations.php +++ b/wp-includes/pomo/translations.php @@ -82,7 +82,6 @@ class Translations { */ function translate_entry(&$entry) { $key = $entry->key(); - $key = str_replace( "\r\n", "\n", $key ); return isset($this->entries[$key])? $this->entries[$key] : false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index b3ec5163a0..dc3566cc40 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta4-35685'; +$wp_version = '4.4-beta4-35686'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.