Skip to content

Commit 46fa426

Browse files
fix: translations (#2171)
Fixes translations in case of trailing slashes in the input see https://github.com/php/frankenphp/actions/runs/21746819419
1 parent bcbd22a commit 46fa426

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/translate.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ function sanitizeMarkdown(string $markdown): string
9999

100100
$fileToTranslate = $argv;
101101
array_shift($fileToTranslate);
102+
$fileToTranslate = array_map(fn($filename) => trim($filename), $fileToTranslate);
102103
$apiKey = $_SERVER['GEMINI_API_KEY'] ?? $_ENV['GEMINI_API_KEY'] ?? '';
103104
if (!$apiKey) {
104105
echo 'Enter gemini api key ($GEMINI_API_KEY): ';

0 commit comments

Comments
 (0)