forked from github/pelican
Fix bug in process_translations warning message generation that caused error with empty slugs
This commit is contained in:
parent
e967988eff
commit
c9dc3223eb
1 changed files with 4 additions and 1 deletions
|
|
@ -677,9 +677,12 @@ def process_translations(content_list, translation_id=None):
|
|||
'attributes'.format(translation_id))
|
||||
|
||||
for id_vals, items in groupby(content_list, attrgetter(*translation_id)):
|
||||
items = list(items)
|
||||
# prepare warning string
|
||||
id_vals = (id_vals,) if len(translation_id) == 1 else id_vals
|
||||
with_str = 'with' + ', '.join([' {} "{{}}"'] * len(translation_id))\
|
||||
.format(*translation_id).format(*id_vals)
|
||||
|
||||
items = list(items)
|
||||
original_items = get_original_items(items, with_str)
|
||||
index.extend(original_items)
|
||||
for a in items:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue