Make Translate and Speech to Text operate on selected lines by default

Open
#16,928 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
desktop-dev

Research direction

Start from the toolbar click handlers for the Translate and Speech to Text buttons, and compare them with the right-click "Selected lines" path that already works on a selection. Reuse that selection check so the toolbar acts on selected lines when any exist and falls back to the whole subtitle otherwise. Done means both buttons behave this way with a selection and without one, and the existing full-subtitle behaviour is unchanged.

Written by the indexing model from the issue text.

Description

Currently, the Translate and Speech to Text buttons in the toolbar operate on the entire subtitle.

However, processing the entire subtitle is usually only necessary once, at the beginning of a project.
During the actual translation workflow, I often need to translate or run speech recognition on just a few selected lines.

For translation, this currently requires opening the right-click menu and navigating to the "Selected lines" option each time.
It would be much more convenient if the toolbar buttons worked as follows:

・ If one or more subtitle lines are selected, process only the selected lines.

・ If no lines are selected, process the entire subtitle as they do now.

This would make the toolbar much more useful during day-to-day subtitle editing,
while preserving the existing full-subtitle workflow.

Dominant language
C#
Stars
15k
Forks
1.4k
Avg merge
1h 37m
Merged PRs (30d)
582

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SubtitleEdit/subtitleedit

All issues in SubtitleEdit/subtitleedit

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.