Anything to do when a tmx import fails? Initiator des Themas: 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 Niederlande Local time: 16:58 Mitglied (2006) Englisch > 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 Vereinigtes Königreich Local time: 15:58 Mitglied Niederländisch > Englisch + ... 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: 18:58 Mitglied (2006) Englisch > Russisch + ... 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 Niederlande Local time: 16:58 Mitglied (2006) Englisch > 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. | | | Dieses Forum wird von keinem Moderator betreut. Um Verstöße gegen die ProZ.com-Regeln zu melden oder um Hilfe zu erhalten, wenden Sie sich bitte an unsere ProZ.com-Mitarbeiter » Anything to do when a tmx import fails? Wordfast Pro | Translation Memory Software for Any Platform
Exclusive discount for ProZ.com users!
Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value
Buy now! » |
| Trados Business Manager Lite | Create customer quotes and invoices from within Trados Studio
Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |