Skip to content

Commit 3fe2461

Browse files
committed
Fix Translation detection breaks when there are blank lines in a JSON file
Fixes N1ebieski#42
1 parent 821442f commit 3fe2461

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

php-templates/translations.php

Lines changed: 1 addition & 1 deletion
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 = 2;
136+
$searchRange = 3;
137137

138138
foreach ($encoded as $index => $keys) {
139139
// Pretty likely to be on the line that is the index, go happy path first

src/templates/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ $translator = new class
133133
array_keys($json),
134134
);
135135
$result = [];
136-
$searchRange = 2;
136+
$searchRange = 3;
137137
138138
foreach ($encoded as $index => $keys) {
139139
// Pretty likely to be on the line that is the index, go happy path first

0 commit comments

Comments
 (0)