-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH #2617: Update translation strings in H5P content
- Loading branch information
Showing
12 changed files
with
461 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
sourcecode/apis/contentauthor/resources/assets/entrypoints/ndla-content-language.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import '../js/ndla-content-language-update'; |
266 changes: 266 additions & 0 deletions
266
sourcecode/apis/contentauthor/resources/assets/js/ndla-content-language-update.js
Large diffs are not rendered by default.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
sourcecode/apis/contentauthor/resources/views/admin/content-language-update.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@extends('layouts.admin') | ||
@push('js') | ||
<script>H5PIntegration ={!! json_encode($h5pIntegration) !!}</script> | ||
@foreach($scripts as $script) | ||
<script src="{{$script}}"></script> | ||
@endforeach | ||
|
||
<script src="{{ mix('js/ndla-content-language.js') }}"></script> | ||
@endpush | ||
@section ('content') | ||
<div class="container" style="width:80vw;"> | ||
<a href="{{ route('admin.update-libraries') }}">Library list</a> | ||
<br> | ||
<a href="{{ route('admin.check-library', [$library->id]) }}">Library details</a> | ||
<br> | ||
<a href="{{ route('admin.library-translation', [$library->id, $languageCode]) }}">Library "{{$languageCode}}" translation</a> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3> | ||
Refresh translations saved with content for {{ $library->getLibraryString(true) }} and "{{$languageCode}}" language | ||
</h3> | ||
</div> | ||
<div class="panel-body row"> | ||
{{$contentCount}} content will be updated | ||
<button type="button" onclick="goGoGo()">Go</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script> | ||
function goGoGo() { | ||
new H5PEditor.ContentLanguageUpdateProcess( | ||
JSON.parse(@json($contents->parameters)), | ||
'', | ||
'{{ $library->getLibraryString(false) }}', | ||
'{{ $languageCode }}' | ||
); | ||
} | ||
</script> | ||
@dump($contents); | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters