Skip to content

Commit 56eca94

Browse files
committed
increase to 5
1 parent 3fe2461 commit 56eca94

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

php-templates/translations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ protected function linesFromJsonFile($file)
133133
array_keys($json),
134134
);
135135
$result = [];
136-
$searchRange = 3;
136+
$searchRange = 5;
137137

138138
foreach ($encoded as $index => $keys) {
139139
// Pretty likely to be on the line that is the index, go happy path first
@@ -142,7 +142,7 @@ protected function linesFromJsonFile($file)
142142
continue;
143143
}
144144

145-
// Search around the index, like to be within 2 lines
145+
// Search around the index, likely to be within $searchRange lines
146146
$start = max(0, $index - $searchRange);
147147
$end = min($index + $searchRange, count($lines) - 1);
148148
$current = $start;

src/templates/translations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ $translator = new class
133133
array_keys($json),
134134
);
135135
$result = [];
136-
$searchRange = 3;
136+
$searchRange = 5;
137137
138138
foreach ($encoded as $index => $keys) {
139139
// Pretty likely to be on the line that is the index, go happy path first
@@ -142,7 +142,7 @@ $translator = new class
142142
continue;
143143
}
144144
145-
// Search around the index, like to be within 2 lines
145+
// Search around the index, likely to be within $searchRange lines
146146
$start = max(0, $index - $searchRange);
147147
$end = min($index + $searchRange, count($lines) - 1);
148148
$current = $start;

0 commit comments

Comments
 (0)