Skip to content

Fix "Save As" not appending format extension for language-coded filenames#10406

Open
ivandrofly wants to merge 1 commit intoSubtitleEdit:mainfrom
ivandrofly:fix/save-as-language-code-extension
Open

Fix "Save As" not appending format extension for language-coded filenames#10406
ivandrofly wants to merge 1 commit intoSubtitleEdit:mainfrom
ivandrofly:fix/save-as-language-code-extension

Conversation

@ivandrofly
Copy link
Member

@ivandrofly ivandrofly commented Mar 24, 2026

Summary

  • When extracting subtitles from MKV with a two-letter language code (e.g., .sv for Swedish), the "Save As" dialog suggested a filename without the subtitle format extension (e.g., .srt)
  • Windows treated the language code as the file extension, resulting in files saved as name.sv instead of name.sv.srt
  • Added subtitle format extension to the suggested filename in SaveSubtitleAs()
  • Added DefaultExtension to FilePickerSaveOptions in PickSaveSubtitleFileAs(), matching the existing behavior in PickSaveSubtitleFile()

Test plan

  • Open an MKV file containing multiple subtitle tracks with different languages (e.g., Swedish .sv and English .en)
  • Select the Swedish subtitle track, press "Save As" — verify the suggested filename ends with .sv.srt (not just .sv)
  • Select the English subtitle track, press "Save As" — verify the suggested filename ends with .en.srt
  • Open a regular .srt file, press "Save As" — verify the suggested filename still ends with .srt (no double extension)

🤖 Generated with Claude Code

…ded filenames

When extracting subtitles from MKV with a two-letter language code like .sv,
the save dialog received a filename without the format extension (e.g., .srt),
causing Windows to treat the language code as the file extension.

Closes SubtitleEdit#10349
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant