query('locale') ?: 'fr'); $exercise = $this->exercise; return [ 'exercise_id' => $this->exercise_id, 'position' => $this->position, 'sets' => $this->sets, 'target_reps' => $this->target_reps, 'rest_seconds' => $this->rest_seconds, 'tempo' => $this->tempo, 'target_weight' => $this->target_weight, 'notes' => $this->notes, 'exercise' => $exercise ? [ 'id' => $exercise->id, 'name' => $exercise->localizedName($locale), 'image_url' => $exercise->image_url, 'target' => Exercise::localizeTerm($exercise->target, $locale), ] : null, ]; } }