Clean up handling of translation syncing. (#2948)
* Clean up handling of translation syncing. This makes sure we properly run all the post-save logic on the parent on translation, also it adds a UI element to the page to show that subprojects are in fact, subprojects. * Add commentcom-py3-compat
parent
636d62bf22
commit
951937c115
|
@ -494,6 +494,8 @@ class TranslationForm(forms.Form):
|
|||
|
||||
def save(self):
|
||||
project = self.parent.translations.add(self.translation)
|
||||
# Run symlinking and other sync logic to make sure we are in a good state.
|
||||
self.parent.save()
|
||||
return project
|
||||
|
||||
|
||||
|
|
|
@ -6,4 +6,7 @@
|
|||
{% if request.user|is_project_user:project %}
|
||||
<a href="{% url "projects_dashboard" %}">{% trans "Projects" %}</a> >
|
||||
{% endif %}
|
||||
{% if project.superprojects.count %}
|
||||
<a href="{% url "projects_detail" project.superprojects.all.0.parent.slug %}">{{ project.superprojects.all.0.parent.name }}</a> >
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue