diff --git a/lib/public/Sharing/Property/ADateSharePropertyType.php b/lib/public/Sharing/Property/ADateSharePropertyType.php index be8fd67998dbc..0f1f6030ceb9b 100644 --- a/lib/public/Sharing/Property/ADateSharePropertyType.php +++ b/lib/public/Sharing/Property/ADateSharePropertyType.php @@ -50,11 +50,11 @@ public function validateValue(IFactory $l10nFactory, string $value): true|string } if (($minDate = $this->getMinDate()) instanceof DateTimeImmutable && $date->diff($minDate)->invert === 0) { - return $l10nFactory->get(Application::APP_ID)->t('Date needs to be after %s: %s', [$minDate->format(DateTimeInterface::ATOM), $value]); + return $l10nFactory->get(Application::APP_ID)->t('Date needs to be after %1$s: %2$s', [$minDate->format(DateTimeInterface::ATOM), $value]); } if (($maxDate = $this->getMaxDate()) instanceof DateTimeImmutable && $date->diff($maxDate)->invert === 1) { - return $l10nFactory->get(Application::APP_ID)->t('Date needs to be before %s: %s', [$maxDate->format(DateTimeInterface::ATOM), $value]); + return $l10nFactory->get(Application::APP_ID)->t('Date needs to be before %1$s: %2$s', [$maxDate->format(DateTimeInterface::ATOM), $value]); } return true; diff --git a/lib/public/Sharing/Property/AEnumSharePropertyType.php b/lib/public/Sharing/Property/AEnumSharePropertyType.php index 5c970f4361174..ce376ee3dc12f 100644 --- a/lib/public/Sharing/Property/AEnumSharePropertyType.php +++ b/lib/public/Sharing/Property/AEnumSharePropertyType.php @@ -37,7 +37,7 @@ public function validateValue(IFactory $l10nFactory, string $value): true|string return true; } - return $l10nFactory->get(Application::APP_ID)->t('Only %s are valid values: %s', [implode(', ', $validValues), $value]); + return $l10nFactory->get(Application::APP_ID)->t('Only %1$s are valid values: %2$s', [implode(', ', $validValues), $value]); } /** diff --git a/lib/public/Sharing/Property/AStringSharePropertyType.php b/lib/public/Sharing/Property/AStringSharePropertyType.php index 8db080d010308..34b7cc9bab03c 100644 --- a/lib/public/Sharing/Property/AStringSharePropertyType.php +++ b/lib/public/Sharing/Property/AStringSharePropertyType.php @@ -39,11 +39,11 @@ abstract public function getMaxLength(): ?int; #[\Override] public function validateValue(IFactory $l10nFactory, string $value): true|string { if (($minLength = $this->getMinLength()) !== null && mb_strlen($value) < $minLength) { - return $l10nFactory->get(Application::APP_ID)->t('Need at least %s characters: %s', [$minLength, $value]); + return $l10nFactory->get(Application::APP_ID)->t('Need at least %1$s characters: %2$s', [$minLength, $value]); } if (($maxLength = $this->getMaxLength()) !== null && mb_strlen($value) > $maxLength) { - return $l10nFactory->get(Application::APP_ID)->t('Provide %s characters at most: %s', [$maxLength, $value]); + return $l10nFactory->get(Application::APP_ID)->t('Provide %1$s characters at most: %2$s', [$maxLength, $value]); } return true;