use basename of zip file as directory name
po = make_po(cur_lang)
pofiles[cur_lang] = po
po = make_po(cur_lang)
pofiles[cur_lang] = po
+ k = getattr(obj, '%s_%s' % (fld, settings.LANGUAGE_CODE))
+ if k is None: k = ''
+ v = getattr(obj, locfld)
+ if v is None: v = ''
- msgid=getattr(obj, '%s_%s' % (fld, settings.LANGUAGE_CODE)),
- msgstr=getattr(obj, locfld),
occurrences=[('%s/%s/%s' % (appname, md.__name__, locfld), obj.id)])
po.append(entry)
occurrences=[('%s/%s/%s' % (appname, md.__name__, locfld), obj.id)])
po.append(entry)
for lng, po in pofiles.items():
try: os.makedirs(os.path.join(directory, lng))
except OSError: pass
for lng, po in pofiles.items():
try: os.makedirs(os.path.join(directory, lng))
except OSError: pass
po.save(os.path.join(directory, lng, '%s.po' % options['poname']))
po.save(os.path.join(directory, lng, '%s.po' % options['poname']))
raise NotImplementedError('Sorry. Only zip format supported at the moment.')
tmp_dir = tempfile.mkdtemp('-wl-locale')
raise NotImplementedError('Sorry. Only zip format supported at the moment.')
tmp_dir = tempfile.mkdtemp('-wl-locale')
- out_dir = os.path.join(tmp_dir, packname)
+ out_dir = os.path.join(tmp_dir, packname_b)