X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d82209da8b4ed8cda90275eae128e87e0b887279..f64dd827284e17ba584d7970a2e3d44f8b8ad981:/apps/wolnelektury_core/management/commands/localepack.py diff --git a/apps/wolnelektury_core/management/commands/localepack.py b/apps/wolnelektury_core/management/commands/localepack.py index 12413a31b..e5362fe7a 100644 --- a/apps/wolnelektury_core/management/commands/localepack.py +++ b/apps/wolnelektury_core/management/commands/localepack.py @@ -45,9 +45,12 @@ class AppLocale(Locale): def save(self, output_directory, languages): for lc in languages: lc = lc[0] + out = os.path.join(output_directory, lc, self.name + '.po') if os.path.exists(os.path.join(self.path, 'locale', lc)): + if not os.path.exists(os.path.dirname(out)): + os.makedirs(os.path.dirname(dir)) shutil.copy2(os.path.join(self.path, 'locale', lc, 'LC_MESSAGES', 'django.po'), - os.path.join(output_directory, lc, self.name + '.po')) + out) def load(self, input_directory, languages): for lc in zip(*languages)[0]: