Commit db191ac3 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix: add translation key for audio-clipper trim labels

parent f0685e44
Pipeline #1224 passed with stages
in 8 minutes and 51 seconds
......@@ -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>
`;
......
......@@ -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' => [
......
......@@ -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' => [
......
......@@ -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>
......
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment