- π©πͺGermany RobinCS
Recap from DrupalCon Lille 2023:
The functionallity of the latest patch #37 π Plurals are not exported correctly when exporting source translations Needs work looks fine. If the reroll of the patch passes, we put this back to Needs Review.
- last update
about 1 year ago Custom Commands Failed - @andypost opened merge request.
- π«π·France andypost
Moved last patch to MR and fixed following to make the test case to pass
- https://www.drupal.org/node/3168858 β
- https://www.drupal.org/node/3129738 β - π«π·France andypost
NW to add
-
+++ b/core/lib/Drupal/Component/Gettext/PoItem.php @@ -49,6 +49,13 @@ class PoItem { + * @var int ... + protected $pluralCount; +++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php @@ -62,6 +62,13 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface { + * @var int ... + protected $pluralCount = 2; +++ b/core/lib/Drupal/Component/Gettext/PoStreamWriter.php @@ -35,6 +35,13 @@ class PoStreamWriter implements PoWriterInterface, PoStreamInterface { + * @var int ... + protected $pluralCount = 2; +++ b/core/modules/locale/src/PoDatabaseReader.php @@ -34,6 +34,13 @@ class PoDatabaseReader implements PoReaderInterface { + * @var int ... + private $pluralCount = 2;
should be typed to int, so default value will be 0
-
+++ b/core/lib/Drupal/Component/Gettext/PoPluralCountAwareInterface.php @@ -0,0 +1,28 @@ + * @return self ... + public function setPluralCount(int $pluralCount); +++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php @@ -126,6 +133,21 @@ public function getHeader() { + public function setPluralCount(int $pluralCount) { +++ b/core/lib/Drupal/Component/Gettext/PoStreamWriter.php @@ -75,6 +82,21 @@ public function setLangcode($langcode) { + public function setPluralCount(int $pluralCount) {
Probably should return :self as of PHP 8.0 https://php.watch/versions/8.0/static-return-type
-