@@ -0,0 +1,1276 @@
+# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.8 on 2018-06-04 09:55%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import connection%0Afrom django.utils.translation import activate, _trans, ugettext as _%0A%0Afrom tenant_extras.middleware import tenant_translation%0Afrom bluebottle.clients.utils import LocalTenant%0A%0Afrom bluebottle.clients.models import Client%0Afrom bluebottle.geo.models import Country%0Afrom bluebottle.bb_projects.models import ProjectTheme%0Afrom bluebottle.bb_projects.models import ProjectPhase%0Afrom bluebottle.tasks.models import Skill%0A%0A%0Adef run():%0A    for tenant in Client.objects.all():%0A        with LocalTenant(tenant):%0A            activate('en')%0A            for model in %5BCountry, ProjectTheme, ProjectPhase, Skill%5D:%0A                for obj in model.objects.all():%0A                    for translation in obj.translations.all():%0A                        activate(translation.language_code)%0A                        _trans._active.value = tenant_translation(%0A                            translation.language_code, connection.tenant.client_name%0A                        )%0A                        translation.name = _(translation.name)%0A                        print translation.name, translation.language_code%0A                        translation.save()%0A

Add script that re-translates models