#1 : 25/02-22 22:57 Jose
Posts: 17
|
Hello everyone. I have the following issue for a while...
I have a batch of subtitles files that I need to translate all the time for my videos. UI generate these subtitles from this online translator: https://translate-subtitles.com/ It uses google translator to generate up to 109 subtitle languages currently supported by Google. So, that's what I do, I translate my videos to 109 languages via subs. Most subtitles come with a two ISO language code. English, for instance is EN, and the generated subtitle files by the translator comes in the form of "NAME.en" OR "TheTextFile.en" as I named them. That is, the two language code at the end of the file name. Some languages have a 3 LETTER code, and that's where my issue begins. In particular, I am having problem with the Hawaiian.haw language and the Hausa.ha language respectible. The renamer is mixing both files up. Here's what's happening: First, I use two List Methods to rename desired file names, where I first change subtitle file called TheTextfile+extension and then I add a description to the file name (subs). HAWAIIAN--> Text to be replaced: TheTextFile.haw Replace width: change_HAWAIIAN.haw HAUSA--> Text to be replaced: TheTextFile.ha Replace width: change_HAUSA.ha The desired names are: "subs_HAWWIIAN.haw" for Hawaii and subs_HAUSA.ha for Hausa Yet, the raneme is naming both files as: subs_HAUSA.ha for Hausa subs_HAUSA.haw for Hawaii The Renamer gave both files the name Hausa because both files starts with a .ha extension, although the one for Hawaii is is a three letter .haw, but it is till only reading .ha. I played with the Renamer and nothing seems to fix it. I even checked the Case Sensitive Text box and changed the casing for the Hawaiian extension file name to .hAw and still didn't work. I just need both files to be named approximately. Thanks in advance for your help. |
#2 : 26/02-22 05:38 Joel de Bruijn
Posts: 26
|
Reply to #1:
Before your real question: Is this a typo? HAUSA--> Text to be replaced: TheTextFile.haw Replace width: change_HAWAIIAN.haw Is it instead?: HAUSA--> Text to be replaced: TheTextFile.ha Replace width: change_HAUSA.ha I can reproduce this not working tho. I tried it with this: https://pic.li/i/Rn9Q Even using different methods, seperate Replace methods instead of list replace doenst work. Was thinking, maybe if HAW is done first, it doesnt change HA wrong afterwards. Or choosing 1ste with occurence, to ensure it isnt changed more then once. https://pic.li/i/RM27 I'm starting to think one cant look for NAME+EXTENSION but only change NAME. Will look further. |
#3 : 26/02-22 06:15 Joel de Bruijn
Posts: 26
|
Reply to #2:
Not that it is any help, just testing some alternative methods, but I find it very strange. "TheTextFile.ha" replace with "change hausa.ha" changes them both. "TheTextFile.haw" replace with "change hawaiian.haw" changes none of them. Toggled the last character (w) and result changes between both and nothing. Anyway, just wanted to share because it puzzled me also. |
#4 : 26/02-22 08:04 Jose
Posts: 17
|
Reply to #2:
You're right, that was a typo and already fixed it. a typo. Hausa is a language spoken in some regions of Africa. the word with is misspelled, though. In your first example you made the mistake of using .haw for both examples in the "replace with" area. Here's how I actually set it up in the Advanced Renamer: First I begin with 109 subtitles files (.SRT), two of which are TheTextFile.ha amd TheTextFile.haw — Method 1: List Replace Text to be replaced: 1. TheTextFile.ha 2. The = TextFile.haw Replace with: 1. change_HAUSA.ha 2. change_HAW.haw Method 2: Replace Text to be replaced: 1. change 2. subs So, here the first mthod should replace the entire string (icluding extension) with the new name: change_HAYSA.ha and change_HAWAIIAN.haw And the the last method replaces the word change with the subtitle description, that lets me know that this file is actually a subtitle: subs_HAUSA.ha and subs_HAWAIIAN.haw That's it, but it obviously fails. The main issue I spot here is that the Advanced Renamer does not treat the extensions .ha and .haw as unique, and mixes them up because it only reads the .ha portion of .haw. I believe that's a bug in the program. Changing the casing didn't work. I a believe that's another bug because checking this box—if it worked, should fix the problem, and least when making both extensions with toggle casing, like you tried. It's very strange. Please now that the named extension—or should I say LANGUAGE CODES of these files are merely descriptive, that let me know which language is in the subtitles. The actual extension is .srt ( SubRip Subtitle), but that's hidden and doesn't affect the Renamer's functionality. Thanks for your input. I am sure there's a solution for this. It seems so simple, yet so intriguing. |
#5 : 26/02-22 08:18 Joel de Bruijn
Posts: 26
|
Reply to #4:
Of its not a typo, was the next section the desired outcome or the desription of what went wrong? HAWAIIAN--> Text to be replaced: TheTextFile.haw Replace width: change_HAWAIIAN.haw HAUSA--> Text to be replaced: TheTextFile.ha Replace width: change_HAWAIIAN.haw Edit: we crossposted ;) |
#6 : 26/02-22 08:22 Joel de Bruijn
Posts: 26
|
Reply to #4:
"In your first example you made the mistake of using .haw for both examples in the "replace with" area." You are right but it doesnt change the outcome, it just reproduces your problem. But others showing it can be reproduced is usefull in itself. |
#7 : 26/02-22 08:27 Joel de Bruijn
Posts: 26
|
Reply to #6:
For this sort of problems I turn to another tool (Robobasket). Because it can "filter" a filetype before deciding what to do with it. Every method like AR does is a rule in Robobasket. But that would require another license. And if you use Advanced Renamer for this only, I can recommend it. But if you use AR for a ton of other stuff I get wanting it to be able to do this. For now, hoping someone more experienced with AR can chime in. |
#8 : 26/02-22 08:38 Jose
Posts: 17
|
Reply to #5:
The second is wrong: HAUSA--> Text to be replaced: TheTextFile.ha Replace width: change_HAWAIIAN.haw It should be: Text to be replaced: TheTextFile.ha Replace width: change_HAUSA.ha It's two different files, I an not trying to merge them into one. That's actually the issue, that the Renamer is mixing them up. |
#9 : 26/02-22 08:45 Jose
Posts: 17
|
Reply to #7:
I specifically purchased the license of AR for this. I translate a lot of videos, and the subtitles usually download with the language code, not the language name. So I need a way to Identify what langue is file for. There are two many codes to remember them all/. For now, I have only used the Renamer for this, and that in in itself it's a lot. Every time I translate a video is 109 files so far. Let's see what the makers of the program say about this because it just doesn't make sense what the program is dog. I spot two bugs already because the case sensitive option does nothing. |
#10 : 26/02-22 08:48 Jose
Posts: 17
|
Reply to #7:
And thanks a lot, Joel, for jumping on this. This type or conversations is usually lead to the solution of a problem. |
#11 : 28/02-22 02:24 Jose
Posts: 17
|
I am yet to hear words from the creator of this program. I need assistance asp. HELP, PLEASE.
THANKS. |
#12 : 28/02-22 06:27 Joel de Bruijn
Posts: 26
|
Reply to #9:
Edit: this aint it. Same problems with filetypes *.xy and *.xyz combination, ------------------------------------- Bit of a stretch, but is there any other language combination with the same problem? Because I was thinking are *.ha files some special type or so? Turns out they are a of zip-like variant: https://filext.com/file-extension/HA Dont know if AR treats them differently? |
#13 : 28/02-22 07:23 Jose
Posts: 17
|
Reply to #12:
Well, not that I have noticed. As I mentioned before, .ha is just a country code, and although the file is named subs_HAUSA.ha, .ha is not a file extension in itself. When I upload the file to the webserver, the server reads it as follows: subs_HAUSA.ha.vtt and subs_HAWAIIAN.haw.vtt. So, as you can see, ,ha and .haw are merely descriptive language codes, no an extension, and play no role in defining the file type. .VTT is the actual file extension, since it is a transcript file. I use either .vtt. or .srt as trascript file types. |
#14 : 28/02-22 07:38 Joel de Bruijn
Posts: 26
|
Reply to #13:
Then I will revisit my earlier solution: "Even using different methods, seperate Replace methods instead of list replace doenst work." It kind of does if vtt/srt are the extensions and the languagecode merely something in between. https://pic.li/i/pPST Be sure though to Replace haw BEFORE ha because it replaces the long code into something that doesnt aply to the file with the short code. The second Replace is for Hausa. With +100 languages its a bit of laborious task to setup. But not that much different from maintaining a list replace I guess. |
#15 : 28/02-22 07:43 Jose
Posts: 17
|
Reply to #14:
How do I control the order in which AR process the file.? From what have seen, the order in which I place the methods does not affect the result. |
#16 : 28/02-22 07:45 Joel de Bruijn
Posts: 26
|
Reply to #15:
Up above in the left panel there are up and down arrows. Tested it, switched the sequence, totally different outcome. |
#17 : 28/02-22 07:47 Jose
Posts: 17
|
Reply to #16:
Let me check... |
#18 : 28/02-22 08:10 Jose
Posts: 17
|
Reply to #16:
OK, I set it up just like that for those two subtitles only, but with the List Replace Method, and it worked fine. However, and this is even more stranger, when ran the entire list 100+ languages it didn't work. hmmm... trying to figure out why. I have Hawaii first and the Hausa, and o luck. |
#19 : 28/02-22 08:11 Joel de Bruijn
Posts: 26
|
Reply to #18:
If it keeps not working, change to seperate Replace methods.... After one working, you can duplicate them. Of after like 5 of them, save the AREN file. Open in Notepad and change the paramaters there. After copy/pasting them and renumbering. AREN is just plain text files. |
#20 : 28/02-22 08:13 Jose
Posts: 17
|
Reply to #14:
Yeah, I already had my list set up. Actually, my list is 256 languages, but sicne Google only supports 109 subtitles, that's what the AR processes. The point is as Google adds more languages, I don't have to update the list. |
#21 : 28/02-22 08:14 Jose
Posts: 17
|
Reply to #19:
Let me delete from the list and add the replace methods to what happens. |
#22 : 28/02-22 08:15 Joel de Bruijn
Posts: 26
|
Reply to #20:
If you use "List Replace", you still have to add them manually tho, if Google adds languages? |
#23 : 28/02-22 08:46 Jose
Posts: 17
|
Reply to #19:
OK, great news.. It turns out the list method works just fine once it has been reordered (.haw first, then .ha). The newer issue was that the .haw language code had the h capitalized (.Haw), and since the case sensitive check box was checked, it seems that was affecting the way AR was processing the method. So, a million thanks, this was a milestone for me. I still have another milestone to reach. I ma just trying to and subtitle translation all at once to my videos. I am getting there. I use a WordPress video player called html Video Player, which is great, and that has playlist support. You can see it working here: https://www.cristoverdad.com/en/la-vacuna-del-co vid-19-mato-hijo-de-ella-republica-domin incana/ Right now I am waiting for reply from the developer because to see if there's a way to download the playlist so I can use it as a a template. Once i have the playlist file (XML, I assume), all I have to do is a search and replace and change the folder name in the subtitles URL, and ditto. If yow would like to know about the different methods I used to translate the video, both with subtitles, and actual voice translation, let mw know and I'll be glad to share tips and tools I use. The provided URL (above) is a good example of what I am talking about. Once again, thanks! |
#24 : 28/02-22 09:01 Joel de Bruijn
Posts: 26
|
Reply to #23:
Glad we made it! Also, interesting tool-chain! |
#25 : 28/02-22 09:03 Jose
Posts: 17
|
Reply to #24:
Yeah. I always say it, two brains are better than one. |