fix: add translation key for audio-clipper trim labels

This commit is contained in:
Yassine Doghri 2022-01-21 18:29:39 +00:00
parent f0685e4479
commit db191ac31b
5 changed files with 18 additions and 4 deletions

View File

@ -75,6 +75,12 @@ export class AudioClipper extends LitElement {
@property({ type: Number, attribute: "height" })
height = 100;
@property({ attribute: "trim-start-label" })
trimStartLabel = "Trim start";
@property({ attribute: "trim-end-label" })
trimEndLabel = "Trim end";
@state()
_isPlaying = false;
@ -853,8 +859,12 @@ export class AudioClipper extends LitElement {
<time>${this.secondsToHHMMSS(this._currentTime)}</time>
</div>
<div class="toolbar__trim-controls">
<button @click="${() => this.trim("start")}">Trim start</button>
<button @click="${() => this.trim("end")}">Trim end</button>
<button @click="${() => this.trim("start")}">
${this.trimStartLabel}
</button>
<button @click="${() => this.trim("end")}">
${this.trimEndLabel}
</button>
</div>
</div>
`;

View File

@ -57,6 +57,8 @@ return [
'theme' => 'Select a theme',
'start_time' => 'Start at',
'duration' => 'Duration',
'trim_start' => 'Trim start',
'trim_end' => 'Trim end',
'submit' => 'Create video clip',
],
'requirements' => [

View File

@ -57,6 +57,8 @@ return [
'theme' => 'Sélectionnez un thème',
'start_time' => 'Démarrer à',
'duration' => 'Durée',
'trim_start' => 'Rogner le début',
'trim_end' => 'Rogner la fin',
'submit' => 'Créer un extrait vidéo',
],
'requirements' => [

View File

@ -20,7 +20,7 @@
required="true"
class="max-w-sm"
/>
<audio-clipper start-time="<?= old('start_time', 0) ?>" duration="<?= old('duration', 30) ?>" min-duration="10" volume=".5" height="50" class="mt-8">
<audio-clipper start-time="<?= old('start_time', 0) ?>" duration="<?= old('duration', 30) ?>" min-duration="10" volume=".5" height="50" trim-start-label="<?= lang('VideoClip.form.trim_start') ?>" trim-end-label="<?= lang('VideoClip.form.trim_end') ?>" class="mt-8">
<audio slot="audio" src="<?= $episode->audio->file_url ?>" preload="auto">
Your browser does not support the <code>audio</code> element.
</audio>

View File

@ -16,7 +16,7 @@
<video-clip-previewer duration="<?= old('duration', 30) ?>">
<img slot="preview_image" src="<?= $episode->cover->thumbnail_url ?>" alt="<?= $episode->cover->description ?>" loading="lazy" />
</video-clip-previewer>
<audio-clipper start-time="<?= old('start_time', 0) ?>" duration="<?= old('duration', 30) ?>" min-duration="10" volume=".5" height="50">
<audio-clipper start-time="<?= old('start_time', 0) ?>" duration="<?= old('duration', 30) ?>" min-duration="10" volume=".5" height="50" trim-start-label="<?= lang('VideoClip.form.trim_start') ?>" trim-end-label="<?= lang('VideoClip.form.trim_end') ?>">
<audio slot="audio" src="<?= $episode->audio->file_url ?>" preload="auto">
Your browser does not support the <code>audio</code> element.
</audio>