Start a new topic

Renumbering TU IDs in a TMX file

Hello -- After I have combined multiple TMX files into one file, is there any handy tool out there that will renumber all TU IDs?


It seems to me that Olifant will do this, but that when I tried it a few weeks ago, Olifant made other changes to the TMX file that I did not want.


Thanks for any suggestions.


Steven


Hi Steven,


Not that I know the answer, but why would you want to do this?

One reason is that I discovered that when I import a TMX file into a Swordfish database, Swordfish disregards TUs that have duplicate TU IDs. (And my TMs are full of duplicate TU IDs from using Cafetran, which numbers TUs 1-2-3-4 etc. starting with each project.) So I would like all TUs in a TMX file to have unique IDs.

So this would rather be a task for mr. Raya, wouldn't it?

That would be one way of looking at it, but it makes me wonder how many other problems are raised in terms of interoperability with other CAT tools by having many TUs in a TMX file with exactly the same ID numbers. What I can do in the meantime is search and replace operations to delete all TU IDs. I would rather not have Cafetran number the TUs at all if this is the case.

> ... disregards TUs that have duplicate TU IDs


I can't help it and I don't think that a duplicate ID should be a valid criterion to disregard a translation unit without giving a choice to do it. 

>That would be one way of looking at it, but it makes me wonder how many other problems are raised in terms of interoperability with other CAT tools by having many TUs in a TMX file with exactly the same ID numbers. What I can do in the meantime is search and replace operations to delete all TU IDs. I would rather not have Cafetran number the TUs at all if this is the case.


Are you on Mac? I've posted a script that removes duplicates based on different criteria. It also removes the TU IDs, because I hate them. Nobody's unique. We don't need IDs.

Login to post a comment