mozilla/kuma — pull request #575 by groovecoder (2012-09-07 03:00:12+00:00)
Title: fix bug 765632 - Adding parent-settings capabilities for translations

https://bugzilla.mozilla.org/show_bug.cgi?id=765632

This one's a doozy code-wise. Here's the spot-check:

1. Make an English doc (e.g., "Testing set translation source")
2. Translate to French
3. Use the django shell to break the parent/child relationship:
`d = Document.objects.get(locale='fr', slug='Testing_set_translation_source')`
`d.parent = d.parent_id = None`
`d.save()`
4. Go to the French page again; the Langues menu should be empty now that the translation source is broken
5. Click Edit/Modifier; it should show the regular edit screen now that the translation source is broken
6. Click the "i" to edit metadata; you should see an input box to set the translation source
7. Type 'Testing set trans' into the box; it should show the en-US doc in the list
8. Pick the en-US doc and save changes; there should be no error

You should land on the French page again, but now the Langues menu should show the restored English parent, and clicking Edit/Modifier takes you to the translate interface with the English shown as the source. Joy.