mcpField
S
srt-translator

srt-translator

github.com/nicepkg创意与媒体28863 次安装40 周前更新
代码仓库

关于 srt-translator

srt-translator 是面向视频创作者的字幕翻译指南,支持 SRT、VTT 和纯文本内容。它强调保留时间码与格式,并提供本地化、批量翻译和质量检查流程。

主要功能

  1. 01支持 SRT、VTT 和纯文本
  2. 02保留字幕编号与时间码
  3. 03提供多语言批量翻译流程
  4. 04考虑文化语境进行本地化
  5. 05检查行长、格式与编码

适用场景

  1. 01将 SRT 字幕翻译成目标语言
  2. 02把逐字稿转为 SRT 并翻译
  3. 03为多个受众语言准备字幕版本

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/nicepkg/ai-workflow --skill srt-translator

安装后在 Claude Code 中输入/srt-translator确认已加载。

详细介绍

SRT 字幕翻译

翻译字幕,同时保留时间码和格式。

支持的格式

格式扩展名描述
SubRip.srt最常见的格式,包含编号条目
WebVTT.vttWeb 标准,支持样式
纯文本.txt不含时间码的文字稿

SRT 格式参考

1
00:00:01,000 --> 00:00:04,000
This is the first subtitle line.

2
00:00:04,500 --> 00:00:08,000
This is the second subtitle line.
It can have multiple lines.

3
00:00:08,500 --> 00:00:12,000
And so on...

翻译指南

保留结构
ORIGINAL (English):
1
00:00:05,000 --> 00:00:08,500
Welcome to my channel!

TRANSLATED (Spanish):
1
00:00:05,000 --> 00:00:08,500
¡Bienvenidos a mi canal!

✅ Same timing, same number
✅ Natural translation (not word-for-word)
✅ Appropriate punctuation for target language
处理行长
PROBLEM: Translation is longer than original
SOLUTION: Split or abbreviate while keeping meaning

ORIGINAL:
1
00:00:10,000 --> 00:00:13,000
Click the subscribe button

GERMAN (longer):
1
00:00:10,000 --> 00:00:13,000
Klickt auf den
Abonnieren-Button

✅ Split into two lines if needed
✅ Keep within ~42 characters per line
✅ Maintain readability
文化适配
DON'T just translate - LOCALIZE:

Original: "That costs about 20 bucks"
Spanish (Latin America): "Eso cuesta unos 20 dólares"
Spanish (Spain): "Eso cuesta unos 20 euros"

Original: "Super Bowl Sunday"
French: "Le dimanche du Super Bowl" (keep cultural reference)
Chinese: "超级碗周日" (may need explanation)

翻译输出格式

═══════════════════════════════════════════════════════════════
SUBTITLE TRANSLATION
Source Language: [Language]
Target Language: [Language]
Total Entries: [X]
═══════════════════════════════════════════════════════════════

TRANSLATION NOTES:
─────────────────────────────────────────────────────────────
• [Any cultural adaptations made]
• [Technical terms kept/translated]
• [Idioms adapted]

TRANSLATED SRT:
─────────────────────────────────────────────────────────────
1
00:00:00,000 --> 00:00:03,500
[Translated text]

2
00:00:04,000 --> 00:00:07,500
[Translated text]

[Continue for all entries...]

═══════════════════════════════════════════════════════════════
COPY-PASTE READY FILE:
═══════════════════════════════════════════════════════════════
[Clean SRT output without notes]

使用方法

完整 SRT 翻译
Translate this SRT file to [Language]:

[Paste SRT content]
批量翻译请求
Translate to multiple languages:
Languages: Spanish, French, German, Japanese, Chinese

[Paste SRT content]
提供上下文
Translate this gaming video subtitle to Korean:
- Game: [Game name]
- Tone: [Casual/Professional]
- Technical terms: [Keep English / Translate]

[Paste SRT content]
从文字稿生成 SRT
Convert this transcript to SRT format, then translate to [Language]:

[00:00] Hello everyone, welcome to the video.
[00:05] Today we're going to talk about...

各语言翻译提示

西班牙语(ES/LATAM)
• Use ustedes (LATAM) vs vosotros (Spain)
• "Click" = "Haz clic" / "Da clic"
• Keep brand names in English
• Informal tone often preferred for YouTube
法语(FR/CA)
• Tu (informal) vs Vous (formal) - YouTube usually tu
• "Subscribe" = "Abonnez-vous" / "Abonne-toi"
• Quebec French has unique expressions
• Keep anglicisms when commonly used
德语(DE)
• Du (informal) vs Sie (formal) - Du common on YouTube
• Compound words can be very long - may need line breaks
• "Daumen hoch" = Thumbs up
• Technical terms often kept in English
日语(JA)
• Casual (だ/である) vs Polite (です/ます)
• YouTube content usually casual-polite mix
• Keep brand names in katakana or English
• Consider vertical text for some contexts
中文(ZH-CN/ZH-TW)
• Simplified (CN) vs Traditional (TW)
• No spaces between words
• "Subscribe" = 订阅 (CN) / 訂閱 (TW)
• May need shorter text (faster reading)
韩语(KO)
• Honorific levels matter (해요체 common for YouTube)
• "Subscribe" = 구독
• Mixing English is common and accepted
• Konglish terms often preferred
葡萄牙语(PT-BR/PT-PT)
• Brazilian vs European Portuguese differ significantly
• "Você" vs "Tu" usage varies
• "Subscribe" = "Se inscreva" (BR) / "Subscreva" (PT)
• Brazilian audience is larger on YouTube
阿拉伯语(AR)
• Right-to-left text
• Modern Standard vs Colloquial
• Numbers may need adjustment
• Consider dialect for specific regions
印地语(HI)
• Devanagari script
• English mixing (Hinglish) is common
• Formal vs informal forms
• Regional language considerations

质量检查清单

完成翻译前:

  • 时间码与原文一致
  • 行号连续且正确
  • 没有遗漏条目
  • 行长易于阅读(≤42 个字符)
  • 语言自然(不生硬)
  • 已适配文化相关内容
  • 技术术语保持一致
  • 标点符合目标语言规范
  • 字符编码正确(UTF-8)
  • 格式有效(SRT/VTT 结构)

常见问题与解决方案

问题原因解决方案
文本溢出译文比原文长拆分行,使用缩写
时间码不匹配阅读速度不同调整文本长度,而非时间码
编码错误字符集错误保存为带 BOM 的 UTF-8
格式损坏多余的换行符验证 SRT 结构
表达生硬直译本地化,使表达更自然

多语言工作流

EFFICIENT BATCH PROCESS:

1. Get original transcript/SRT
2. Identify top languages for your audience:
   - Check YouTube Analytics for viewer locations
   - Common targets: ES, PT-BR, FR, DE, JA, KO, ZH

3. Translation priority order:
   Tier 1: Spanish, Portuguese (largest non-EN audiences)
   Tier 2: French, German (strong markets)
   Tier 3: Japanese, Korean (dedicated fandoms)
   Tier 4: Chinese, Hindi (massive populations)

4. Upload workflow:
   - YouTube: Add via Studio > Subtitles
   - Filename: videoname.[lang].srt (e.g., video.es.srt)

与 YouTube 集成

上传字幕
YouTube Studio > Video > Subtitles > Add Language

File types accepted:
- .srt (SubRip)
- .sbv (YouTube format)
- .vtt (WebVTT)
- .sub (SubViewer)

Naming convention:
videoname.en.srt (English)
videoname.es.srt (Spanish)
videoname.ja.srt (Japanese)
自动翻译警告
⚠️ YouTube's auto-translate is poor quality.
   Always provide human-quality translations for top languages.

Priority: Upload translated subtitles for your top 3-5 viewer countries.

评论

支持 Markdown