Merge TXML files, and then split them again Автор темы: Samuel Murray
| Samuel Murray Нидерланды Local time: 04:45 Член ProZ.com c 2006 английский => африкаанс + ...
Hello everyone
As far as I could tell, WFP does not have a function to merge TXML files in such a way that you can edit the merged file and use bilingual review on the merged file, and then split the file again into its original TXML files. Does anyone know of such a feature in WFP?
In the mean time, I've written a small ... See more Hello everyone
As far as I could tell, WFP does not have a function to merge TXML files in such a way that you can edit the merged file and use bilingual review on the merged file, and then split the file again into its original TXML files. Does anyone know of such a feature in WFP?
In the mean time, I've written a small pair of scripts that do just that:
http://www.leuce.com/autoit/TXML%20MS%20scripts.zip
...and I would appreciate some testers.
Samuel
[Edited at 2015-04-20 11:30 GMT] ▲ Collapse | | | Samuel Murray Нидерланды Local time: 04:45 Член ProZ.com c 2006 английский => африкаанс + ... Автор темы
Added1: I uploaded a new version that takes an LF x CRLF quirk of WFP into account.
Added2: I changed the file name, because some browsers seem to have a problem with a "+" in the file name. | | | Samuel Murray Нидерланды Local time: 04:45 Член ProZ.com c 2006 английский => африкаанс + ... Автор темы
I originally assumed that the first translatable block in a TXML file would be numbered "0" but it turns out not to be so. I uploaded a new version that no long makes that assumption.
By the way, you can also merge TXML files using the Extract Freq function in WFP itself, but that function strips out all existing translations, so it's not useful for translating a partially translated file or for proofreading a translated file.
[Edited at 2015-05-12 07:30 GMT] | | | Samuel Murray Нидерланды Local time: 04:45 Член ProZ.com c 2006 английский => африкаанс + ... Автор темы
Had 20 tiny TXML files with "skeletons" in them this week, so I updated the scripts again (updated version also uploaded to same download location). They're a life-saver -- I don't know why WFP doesn't have this feature built-in.
[Edited at 2015-05-24 08:25 GMT] | |
|
|
Only support en-af language? | May 24, 2015 |
I ran the Merge script to combine 4 txml files into one.
When I try to open it, an alert shows "TXML you attempted to open has en-af language....."
Then I had to choose to create a new project, in the above language.
No others are available, as it's greyed out.
And then the next time, when I try to open the TXML again, ERROR Alert: "Invalid format document..."
Could this be solved? Thank you, this will be a great tool, if it works.
[Edited at 2015-05-2... See more I ran the Merge script to combine 4 txml files into one.
When I try to open it, an alert shows "TXML you attempted to open has en-af language....."
Then I had to choose to create a new project, in the above language.
No others are available, as it's greyed out.
And then the next time, when I try to open the TXML again, ERROR Alert: "Invalid format document..."
Could this be solved? Thank you, this will be a great tool, if it works.
[Edited at 2015-05-24 14:21 GMT] ▲ Collapse | | | Samuel Murray Нидерланды Local time: 04:45 Член ProZ.com c 2006 английский => африкаанс + ... Автор темы
yongzhou wrote:
When I try to open it, an alert shows "TXML you attempted to open has en-af language....."
Aah, thanks for that... you could simply edit the TXML file yourself and change the "locale" and "targetlocale" values at the top of the file, or you can try the updated version which I've just uploaded, which specifically asks for the language codes (it should say "version 0.5" when you run it).
And then the next time, when I try to open the TXML again, ERROR Alert: "Invalid format document..."
If you can send me the TXML file, I can have a look. But try the updated version first -- the one that asks for the language codes. The script works for me, but then, I had to fix it four times in the past few weeks whenever I discover something that breaks it. | | | language solved but still error opening | May 25, 2015 |
Thank you, The language problem is gone. But when double-clicking to open the merged txml, it still go: "Invalid document format..." and won't open.
I can sent you the txml if you'd like. | | | Split first than merge | May 25, 2015 |
Is this possible too? I know WFP IS capable of this. But it only allow you to split every xx TUs, and no option to split only into 2 pieces.
I would need an option to split after xx TUs into 2 halves, A and B.
Then later I would need split B into B-1 and B-2, again breaking at whatever point we specify.
Then finally, after all separate works are done, they can be merged back accurately to the original whole. | |
|
|
Samuel Murray Нидерланды Local time: 04:45 Член ProZ.com c 2006 английский => африкаанс + ... Автор темы First split within WFP | May 25, 2015 |
yongzhou wrote:
I know WFP IS capable of this. But it only allow you to split every xx TUs, and no option to split only into 2 pieces. I would need an option to split after xx TUs into 2 halves, A and B.
Yes, I saw that WFP can split by number of segments but does not have the option to split into X number of pieces. This isn't something that I can easily program, unfortunately. I'm afraid you'd have to open each TXML file and then see how many segments there are, and then tell WFP to split every so many segments. | | | Samuel Murray Нидерланды Local time: 04:45 Член ProZ.com c 2006 английский => африкаанс + ... Автор темы
yongzhou wrote:
But when double-clicking to open the merged txml, it still go: "Invalid document format..." and won't open. ... I can sent you the txml if you'd like.
Just an update on what happened:
Yongzhou sent me some sample files, and I determined that he had placed the previously merged TXML file in the same folder as the other TXML files when he performed the second merge, which resulted in that merged file being invalid as well. It is important to note that the script processes all TXML files in the folder where the script is, as well as all TXML files in all subfolders of that folder.
Yongzhou also sent me the original files, and I was able to merge them so that both WFP on my computer and WFP on Yongzhou's computer could open it. However, Yongzhou reported that he is still unable to merge the files himself (even after making sure that no other TXML files are in the same folder as the script), in such a way that WFP accepts the file.
It would appear to me that on Yongzhou's computer, my script reads two of the five TXML files using the wrong file encoding (not as UTF8N but something else, apparently). TXML files are in UTF8 without byte order mark. | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Merge TXML files, and then split them again CafeTran Espresso | You've never met a CAT tool this clever!
Translate faster & easier, using a sophisticated CAT tool built by a translator / developer.
Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools.
Download and start using CafeTran Espresso -- for free
Buy now! » |
| Pastey | Your smart companion app
Pastey is an innovative desktop application that bridges the gap between human expertise and artificial intelligence. With intuitive keyboard shortcuts, Pastey transforms your source text into AI-powered draft translations.
Find out more » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |