Skip to content

Commit

Permalink
Fix lang script (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
daVitekPL authored Nov 15, 2024
1 parent 49ba8e6 commit 3cd8a74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Services/HeadlessH5PService.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;
use JsonSerializable;

class HeadlessH5PService implements HeadlessH5PServiceContract
Expand Down Expand Up @@ -843,7 +844,7 @@ private function getEditorLangScript(string $lang, string $h5pEditorDir): string

if ($lang === 'pl') {
$resourceFile = __DIR__ . '/../../resources/lang/' . $lang . '/h5p.js';
!File::exists($resourceFile) ?: File::replace($h5pEditorDir . $language_script, File::get($resourceFile));
!File::exists($resourceFile) ?: Storage::put(Str::after($h5pEditorDir, env('AWS_URL')) . $language_script, File::get($resourceFile));
}

return $language_script;
Expand Down

0 comments on commit 3cd8a74

Please sign in to comment.