Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Component/Gettext/PoItem.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Component/Gettext/PoItem.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/lib/Drupal/Component/Gettext/PoItem.php Thu May 09 15:33:08 2019 +0100 @@ -11,6 +11,15 @@ class PoItem { /** + * The delimiter used to split plural strings. + * + * This is the ETX (End of text) character and is used as a minimal means to + * separate singular and plural variants in source and translation text. It + * was found to be the most compatible delimiter for the supported databases. + */ + const DELIMITER = "\03"; + + /** * The language code this translation is in. * * @var string @@ -186,9 +195,9 @@ $this->setComment($values['comment']); } if (isset($this->source) && - strpos($this->source, LOCALE_PLURAL_DELIMITER) !== FALSE) { - $this->setSource(explode(LOCALE_PLURAL_DELIMITER, $this->source)); - $this->setTranslation(explode(LOCALE_PLURAL_DELIMITER, $this->translation)); + strpos($this->source, self::DELIMITER) !== FALSE) { + $this->setSource(explode(self::DELIMITER, $this->source)); + $this->setTranslation(explode(self::DELIMITER, $this->translation)); $this->setPlural(count($this->source) > 1); } }