SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.23k stars 887 forks source link

Save new words #4442

Closed goodju closed 2 years ago

goodju commented 3 years ago

There is a feature I hope we see on Subtitle Edit, and it will be very useful, for me at least. During translation, if I encounter a new word or phrase, I search for it and then save it in an external text file with my translation of that word or phrase, by copy & past both of them separately. Is it possible to add a feature to save new words? Like maybe you select the phrase and press a shortcut key that saves it, along with its translation, directly on Subtitle Edit. I also would like to know what kind of method do you, Subtitle Edit users, currently use to save your new glossaries?

lambdacore12 commented 3 years ago

@goodju Maybe I can help you with that. I never used the following method, but since it was an interesting challenge, I went and made a tiny script for you to use. BUT this script can save the content of your clipboard once at a time, so you will have to: 1- Select the word you want to save 2- Press Windows + C (you can change that if you want) 3- Select the translation 4- Press Windows + C again (you can change that if you want)

At the end, you will have a text with something like this :

word1 definition1 word2 definition2...

PS: the requirements for this program to work are to have autohotkey installed, and if you want to save yourself some time too, add a shortcut to the script (append.ahk) to your windows startup.

Here are the files: append.zip

If you like this, let me know and I can maybe improve this code for you.

goodju commented 3 years ago

Thank you for taking the time to do this. So my words will be saved in the "glossary" text file, right? I don't know what I did wrong. I tried with Windows + C, but in "glossary" file all the words say "autohotkey". Also, what would be perfect is if you can make them like this: (Tab separated. Instead of line by line) word1 definition1 word2 definition2

lambdacore12 commented 3 years ago

@goodju Are you available for chat, like skype or something so we can discuss in person?

lambdacore12 commented 3 years ago

Here is the updated version: 1- If you want to enter a word just add a : to it, then select it and press Windows+C. 2- To add a definition to this word, select it (it should NOT contain a : ) and then press Windows+C.

The result should be: word1: definition1 word2: definition2

PS: When adding the word, it should be selected with its ":", like so: word:. PPS: If you think it is too much of a hassle for you to add a colon each time, I added a second folder that contains the file needed for this code. Using this file, the only change you should do is when selecting the desired word, add the next space as well to the selection like so: Hello darknessmy old friend. (Of course the definition should have NO space added!).

Good luck!

append -with space.zip append with colon.zip

goodju commented 3 years ago

I forgot that I have to select and copy before hitting Windows + C. That's why I was getting "autohotkey", because apparently that was the last thing I copied. Both ways are fine to me. Thanks for your help, lambdacore12.