fix bug 792418: Build sensible default topic structure for translations#620
Conversation
* If a translation doesn't have a topic parent, attempt to assign one
for it:
* If the document on which the translation is based has a topic
parent, look for the translation of that topic parent in the current
locale and use it.
* If the document on which the translation is based has a topic parent,
but that topic parent has not yet been translated, auto-clone a
stub translation in the current locale and use it.
* All the above wrapped in a utility method in anticipation of
bug 792417
* Tests
|
Spot check topic parent assignment:
Spot check topic stub generation:
|
|
looking at this ... |
apps/wiki/tests/test_models.py
Outdated
There was a problem hiding this comment.
pep8 whitespace on blank line
|
pep8 & pyflakes nits. also should we do something about this? http://screencast.com/t/SNUerGGPs2DT aside from that r+ - very cool! |
|
I'm not sure what you're pointing at in that screenshot, but might be worth a follow-up bug? Added another commit for a couple of spots for pep8, but didn't try fixing the whole file |
|
Pointing at the Parent: field missing from the translation side of the page. If we know what the translation's parent is going to be, we should display it (non-editable) there, right? |
|
Like I said, file a follow-up bug? (ie. Is that the right UI assumption? Should it be non-editable? Is it worth displaying, etc) |
|
Sounds good to me - let the users decide to file a follow-up bug if/when it's important. |
fix bug 792418: Build sensible default topic structure for translations
for it:
parent, look for the translation of that topic parent in the current
locale and use it.
but that topic parent has not yet been translated, auto-clone a
stub translation in the current locale and use it.