I want to translate an .srt
file, and then merge the result with the original such that both texts appear in the resulting .srt
file, the original at the top and the translation at the bottom. If I can modify the font size, choose what goes where, and perform it all on my machine (Ubuntu 20.04) without internet access, even better. Has anyone found solutions for this?
I've tried many things so far but these two were the most promising. The third was a nice thing to imagine working someday.
srtssa/transmerge
I found something that sounded perfect on https://forum.language-learners.org/viewtopic.php?t=13897#p162942. I installed and ran https://gist.github.com/bathtime/6ec36e47bb4a104bd648dc1abcaaccc7 (updated 2021.5.9; seemingly the updated version of https://gitlab.com/bedtime_/srtssa/-/tree/master, updated 2020.7.6). It created a mynewfile.txt.0813115519.tmp
file and opened in terminal either it or the original .srt
file (both had the same content so I couldn't tell). After over ten minutes' waiting I canceled the operation because it seemed stuck. The code I ran to get here was (from one of the links above):
[code]./srtssa.sh -t en --alt -i myfile.srt -o mynewfile.srt[/code]
I do not know what the -t
or --alt
of the code above mean, unfortunately.
I then tried what was probably the precursor to the above, https://gist.github.com/bathtime/8ae8303e870b2909c03f3b9332a4dd47 (updated 2020.4.7). It failed with the following messages:
./transmerge.sh: 25: [: en: unexpected operator
./transmerge.sh: 26: [: unexpected operator
./transmerge.sh: 31: [: utf-8: unexpected operator
./transmerge.sh: 98: Syntax error: Bad for loop variable[/code]
The code I ran was: ./transmerge.sh fr en en sample.srt
. From the last link above, it should be telling the program that the source language is French, the target language is English and that English should be displayed on top and French on the bottom.
Subtitle Editor
I tried this next however keep getting stuck at untarring the tar file. Following https://github.com/kitone/subtitleeditor I tried:
./autogen.sh
make
sudo make install
... but keep getting the following error after the make
command:
make: *** No targets specified and no makefile found. Stop.
I used https://wiki.asterisk.org/wiki/display/AST/Untarring+the+Source to help me untar the file but I'm still new at installing things this way so it could be that I messed something up there.
Apertium+Gaupol
https://wiki.apertium.org/wiki/Translating_subtitles#Gaupol_extension seemed promising but the Gaupol community said the extension is outdated and "in hindsight Gaupol extensions were a bad idea". Too bad because it seemed like a great utility.