dimagi/commcare-hq — pull request #5098 by NoahCarnahan (2014-12-16 09:49:26+00:00)
Title: Fix bug in bulk app translation regarding unexpected translation/text id attributes

[Ticket](http://manage.dimagi.com/default.asp?150545)

This PR fixes a bug in bulk app translations. The code had been operating under the false assumption that a question with an id of `path/to/question` would have its translation located in a node at `itext/translation/text[@id='path/to/question-label']`. However, this is not always the case.

Create a question within a question group in vellum, save, then alter the id of the question group and save again. The itext ref path will mirror the original path to the question, not it's current path. That is, suppose you have a form with the following structure:
```

```
If you change the group id in vellum from `question1` to `mygroup`, the form will look like this after saving:
```

```

This PR removes this assumption, and instead inspects the xform body itself to determine the itext id corresponding to each question.