I have come across the situation that the tnid of a translation node is always set to 0 instead of the source node's nid.
I have the content type set up with Workflow and Trigger modules such as that when a workflow state is set to "approved", this will trigger the action to set the node to be "published".
I have verified that the translation module did set the tnid to the source id when I first submitted the new translation node. But immediately, the tnid value is set to zero by another module and I suspect this is by the Trigger module.
By examining the function translation_nodeapi() of the Translation module. I noticed that in the "insert" case, it will update the tnid of the new node in the database. However, if another module (and in this case, the Trigger module) makes use of the hook_nodeapi(), this module will not see the new tnid value and may override the database value.
I think whenever the translation module updates some values of the node in the database, it should update the memory values so other module will see those new values.
PASSED: [[SimpleTest]]: [MySQL] 25,316 pass(es).
FAILED: [[SimpleTest]]: [MySQL] 25,295 pass(es), 6 fail(s), and 0 exception(es).
FAILED: [[SimpleTest]]: [MySQL] 25,318 pass(es), 1 fail(s), and 1 exception(es).
FAILED: [[SimpleTest]]: [MySQL] 25,300 pass(es), 6 fail(s), and 1 exception(es).