wp/wp-includes/pomo/translations.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
--- a/wp/wp-includes/pomo/translations.php	Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-includes/pomo/translations.php	Tue Dec 15 13:49:49 2020 +0100
@@ -7,8 +7,8 @@
  * @subpackage translations
  */
 
-require_once dirname( __FILE__ ) . '/plural-forms.php';
-require_once dirname( __FILE__ ) . '/entry.php';
+require_once __DIR__ . '/plural-forms.php';
+require_once __DIR__ . '/entry.php';
 
 if ( ! class_exists( 'Translations', false ) ) :
 	class Translations {
@@ -113,7 +113,7 @@
 		 * Here, in the base Translations class, the common logic for English is implemented:
 		 *  0 if there is one element, 1 otherwise
 		 *
-		 * This function should be overridden by the sub-classes. For example MO/PO can derive the logic
+		 * This function should be overridden by the subclasses. For example MO/PO can derive the logic
 		 * from their headers.
 		 *
 		 * @param integer $count number of items
@@ -268,7 +268,7 @@
 		 */
 		function make_headers( $translation ) {
 			$headers = array();
-			// sometimes \ns are used instead of real new lines
+			// Sometimes \n's are used instead of real new lines.
 			$translation = str_replace( '\n', "\n", $translation );
 			$lines       = explode( "\n", $translation );
 			foreach ( $lines as $line ) {
@@ -287,7 +287,7 @@
 		 */
 		function set_header( $header, $value ) {
 			parent::set_header( $header, $value );
-			if ( 'Plural-Forms' == $header ) {
+			if ( 'Plural-Forms' === $header ) {
 				list( $nplurals, $expression )     = $this->nplurals_and_expression_from_header( $this->get_header( 'Plural-Forms' ) );
 				$this->_nplurals                   = $nplurals;
 				$this->_gettext_select_plural_form = $this->make_plural_form_function( $nplurals, $expression );