From 0e2f6865c29d9b40e685cb9168a28d300fcc144f Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Fri, 24 Jan 2025 09:02:49 -0500 Subject: [PATCH 1/2] fix: translation format specifier Signed-off-by: Elizabeth Danzberger --- lib/Conversion/ConversionProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Conversion/ConversionProvider.php b/lib/Conversion/ConversionProvider.php index 072a02f5f6..b12c5a16e0 100644 --- a/lib/Conversion/ConversionProvider.php +++ b/lib/Conversion/ConversionProvider.php @@ -148,7 +148,10 @@ public function convertFile(File $file, string $targetMimeType): mixed { private function getMimeProvidersFor(array $inputMimeTypes, string $outputMimeType): array { $outputMimeInfo = $this->getMimeInfoFor($outputMimeType); if ($outputMimeInfo === null) { - $this->logger->error($this->l10n->t('Unable to fetch information on $s', [$outputMimeType])); + $this->logger->error( + $this->l10n->t('Unable to fetch information on %1$s', + [$outputMimeType] + )); throw new \Exception(); } From 319d65b7168c4f5917686ba3e1c3dc0a8fd15382 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Fri, 24 Jan 2025 10:45:32 -0500 Subject: [PATCH 2/2] feat: add more context for translators Signed-off-by: Elizabeth Danzberger --- lib/Conversion/ConversionProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Conversion/ConversionProvider.php b/lib/Conversion/ConversionProvider.php index b12c5a16e0..cf9499cb9c 100644 --- a/lib/Conversion/ConversionProvider.php +++ b/lib/Conversion/ConversionProvider.php @@ -149,6 +149,14 @@ private function getMimeProvidersFor(array $inputMimeTypes, string $outputMimeTy $outputMimeInfo = $this->getMimeInfoFor($outputMimeType); if ($outputMimeInfo === null) { $this->logger->error( + /* + * TRANSLATORS + * Shows the MIME type of the file (the file type) + * For example: + * - application/pdf (.pdf) + * - application/msword (.doc) + * - text/plain (.txt) + */ $this->l10n->t('Unable to fetch information on %1$s', [$outputMimeType] ));