From d3cab870d183d4d2ab4fd334b14f4cdd5eff9b26 Mon Sep 17 00:00:00 2001 From: rakekniven <2069590+rakekniven@users.noreply.github.com> Date: Thu, 19 Nov 2026 17:19:27 +0100 Subject: [PATCH] fix(files_sharing): Add translator context for the expire date error Translators asked at Transifex whether YYYY-MM-DD is a display format. It is the format the share API expects for expireDate. Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- apps/files_sharing/lib/Controller/ShareAPIController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 5a9317b772cc7..623a5fdba0d49 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1737,6 +1737,7 @@ private function parseDate(string $expireDate): \DateTime { // Make sure it expires at midnight in owner timezone $date->setTime(0, 0, 0); } catch (\Exception $e) { + // TRANSLATORS Error of the share API for an invalid expireDate parameter. YYYY-MM-DD is the technical format the API expects (year-month-day), not how dates are displayed. Keep this order. throw new \Exception($this->l->t('Invalid date. Format must be YYYY-MM-DD')); }