Anything to do when a tmx import fails? Thread poster: Thijs Vissia
|
I'm trying to import a tmx file for a client, which I think is exported from Trados, and use it in OmegaT. I get the notification "Failed to import" because of, apparently, a single parse error. Can I just go in and fix that with a text/html editor? I tried to open it in TextWrangler, but it seemed unable to open the file. Do I rename it to .XML? Any help appreciated! | | | Samuel Murray Netherlands Local time: 23:09 Member (2006) English to Afrikaans + ...
Thijs Vissia wrote: Can I just go in and fix that with a text/html editor? Yes, TMX files can be edited in a plain text editor. However, it can be difficult to determine why a TMX file won't load. There are online and installable "XML validators", but they can only tell you where the error is, not where you should edit (the way XML works, what you should edit to fix an error isn't at the same position as the error itself). I tried to open it in TextWrangler, but it seemed unable to open the file. Do I rename it to .XML? Sorry, I don't use Mac, so I don't know what might cause a Mac plain text editor to fail to open a plain text file. | | | Michael Beijer United Kingdom Local time: 22:09 Member (2009) Dutch to English + ... run 'Edit > Clean Up TM' in Heartsome TMX editor | Feb 28, 2020 |
Thijs Vissia wrote: I'm trying to import a tmx file for a client, which I think is exported from Trados, and use it in OmegaT. I get the notification "Failed to import" because of, apparently, a single parse error. Can I just go in and fix that with a text/html editor? I tried to open it in TextWrangler, but it seemed unable to open the file. Do I rename it to .XML? Any help appreciated! When Trados TMXs fail to import into a program (which is often), I always fix them by running Edit > Clean Up TM in Heartsome TMX editor. This fixes them 99% of the time. https://github.com/heartsome/tmxeditor8 Michael | | | esperantisto Local time: 01:09 Member (2006) English to Russian + ... SITE LOCALIZER If it is really single, | Feb 28, 2020 |
Thijs Vissia wrote: …"Failed to import" because of, apparently, a single parse error. For starters, the error is not necessarily single. OmegaT just stops loading a TMX file on the first error encountered. Trados is notorious for writing megatons of junk into TMX, thus, expect more. I have no idea about TextWrangler, but from what I can gather, it is not a good choice for lacking XML markup highlighting/XML syntax check. However, if it supports jumping to a specific line/character position, it might be good enough. Just open the file and delete the character in the line/position that you can read in the error message. OmegaT will reload the TMX file automatically and if the error is really single, you will simply go ahead.
[Адрэдагавана 2020-02-28 12:10 GMT] | |
|
|
Samuel Murray Netherlands Local time: 23:09 Member (2006) English to Afrikaans + ...
esperantisto wrote: Thijs Vissia wrote: …"Failed to import" because of, apparently, a single parse error. The error is not necessarily single. OmegaT just stops loading a TMX file on the first error encountered. I agree. You'll find the same thing with XML validators. They usually show only the first error, and after you've fixed it and re-ran the validation, they show the next error, and then later the next error, and so on. If [your text editor] supports jumping to a specific line/character position, it might be good enough. Just open the file and delete the character in the line/position that you can read in the error message. I find it often simpler to just delete the entire TU. Yes, it means that you'll lose that TU from the TM, but it's often quicker to just delete an entire TU than to try to figure out what is wrong with the code. Also, sometimes the error may be with a non-allowed character, and then you may not even be able to see the character (if it is a hidden character), so deleting the entire TU saves you from searching for the naughty character. A TU is everything from <tu> to </tu> where the error occurs. I'm not familiar with TextWrangler's "go to" function, but I know that in some text editors that have word wrap or line wrap, you have to disable word wrap when you "go to" a line and character, if it counts the wrapped line as a new line! It is sometimes Friday afternoon at the programmers' office. | | |
Samuel Murray wrote: esperantisto wrote: Thijs Vissia wrote: …"Failed to import" because of, apparently, a single parse error. The error is not necessarily single. OmegaT just stops loading a TMX file on the first error encountered. I agree. You'll find the same thing with XML validators. They usually show only the first error, and after you've fixed it and re-ran the validation, they show the next error, and then later the next error, and so on. Ah yes I assumed that might also be the case. If [your text editor] supports jumping to a specific line/character position, it might be good enough. Just open the file and delete the character in the line/position that you can read in the error message. I find it often simpler to just delete the entire TU. Yes, it means that you'll lose that TU from the TM, but it's often quicker to just delete an entire TU than to try to figure out what is wrong with the code. Also, sometimes the error may be with a non-allowed character, and then you may not even be able to see the character (if it is a hidden character), so deleting the entire TU saves you from searching for the naughty character. A TU is everything from to where the error occurs. I'm not familiar with TextWrangler's "go to" function, but I know that in some text editors that have word wrap or line wrap, you have to disable word wrap when you "go to" a line and character, if it counts the wrapped line as a new line! It is sometimes Friday afternoon at the programmers' office. I'll give it a try, but I guess it's better to find another way to get a clean tmx. This is for an agency that I do quite some work for, so it's worth trying to fix. | | |
Michael Beijer wrote: Thijs Vissia wrote: I'm trying to import a tmx file for a client, which I think is exported from Trados, and use it in OmegaT. I get the notification "Failed to import" because of, apparently, a single parse error. Can I just go in and fix that with a text/html editor? I tried to open it in TextWrangler, but it seemed unable to open the file. Do I rename it to .XML? Any help appreciated! When Trados TMXs fail to import into a program (which is often), I always fix them by running Edit > Clean Up TM in Heartsome TMX editor. This fixes them 99% of the time. https://github.com/heartsome/tmxeditor8 Michael Excellent, thank you. | | | There is no moderator assigned specifically to this forum. To report site rules violations or get help, please contact site staff » Anything to do when a tmx import fails? 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! » |
| Anycount & Translation Office 3000 | Translation Office 3000
Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |