diff --git a/core/lib/Drupal/Core/StringTranslation/PluralTranslatableString.php b/core/lib/Drupal/Core/StringTranslation/PluralTranslatableString.php index d21a143..8fcff78 100644 --- a/core/lib/Drupal/Core/StringTranslation/PluralTranslatableString.php +++ b/core/lib/Drupal/Core/StringTranslation/PluralTranslatableString.php @@ -47,7 +47,7 @@ class PluralTranslatableString extends TranslationWrapper { protected static $localeEnabled; /** - * Constructs a new class instance. + * Constructs a new PluralTranslatableString object. * * Parses values passed into this class through the format_plural() function * in Drupal and handles an optional context for the string. @@ -154,9 +154,9 @@ public function render() { $return = $translated_array[$index]; } else { - // If the index cannot be computed or there's no translation, use - // the second plural form as a fallback (which allows for most - // flexibility with the replaceable @count value). + // If the index cannot be computed or there's no translation, use the + // second plural form as a fallback (which allows for most flexibility + // with the replaceable @count value). $return = $translated_array[1]; } } diff --git a/core/modules/locale/src/Tests/LocalePluralFormatTest.php b/core/modules/locale/src/Tests/LocalePluralFormatTest.php index 32eb3b8..386cd5d 100644 --- a/core/modules/locale/src/Tests/LocalePluralFormatTest.php +++ b/core/modules/locale/src/Tests/LocalePluralFormatTest.php @@ -137,7 +137,7 @@ public function testGetPluralFormat() { // is designed to be used with *already* translated text like settings // from configuration. We use PHP translation here just because we have // the expected result data in that format. - $translated_string = \Drupal::translation()->translate('1 hour' . LOCALE_PLURAL_DELIMITER . '@count hours', array(), array('langcode' => $langcode)); + $translated_string = \Drupal::translation()->translate('1 hour' . PluralTranslatableString::DELIMITER . '@count hours', array(), array('langcode' => $langcode)); $plural = PluralTranslatableString::createFromTranslatedString($count, $translated_string, array(), array('langcode' => $langcode)); $this->assertIdentical($plural->render(), $expected_plural_string); }