i18n: Fix string interpolation.

This commit is contained in:
Yago González
2018-03-04 22:59:07 +01:00
committed by Tim Abbott
parent c8ad1cf209
commit b475e74c47

View File

@@ -3070,12 +3070,12 @@ def do_add_streams_to_default_stream_group(realm: Realm, group: DefaultStreamGro
for stream in streams: for stream in streams:
if stream in default_streams: if stream in default_streams:
raise JsonableError(_( raise JsonableError(_(
"'%(stream_name)s' is a default stream and cannot be added to '%(group.name)s'") "'%(stream_name)s' is a default stream and cannot be added to '%(group_name)s'")
% {'stream_name': stream.name, 'group.name': group.name}) % {'stream_name': stream.name, 'group_name': group.name})
if stream in group.streams.all(): if stream in group.streams.all():
raise JsonableError(_( raise JsonableError(_(
"Stream '%(stream_name)s' is already present in default stream group '%(group.name)s'") "Stream '%(stream_name)s' is already present in default stream group '%(group_name)s'")
% {'stream_name': stream.name, 'group.name': group.name}) % {'stream_name': stream.name, 'group_name': group.name})
group.streams.add(stream) group.streams.add(stream)
group.save() group.save()
@@ -3086,8 +3086,8 @@ def do_remove_streams_from_default_stream_group(realm: Realm, group: DefaultStre
for stream in streams: for stream in streams:
if stream not in group.streams.all(): if stream not in group.streams.all():
raise JsonableError(_( raise JsonableError(_(
"Stream '%(stream_name)s' is not present in default stream group '%(group.name)s'") "Stream '%(stream_name)s' is not present in default stream group '%(group_name)s'")
% {'stream_name': stream.name, 'group.name': group.name}) % {'stream_name': stream.name, 'group_name': group.name})
group.streams.remove(stream) group.streams.remove(stream)
group.save() group.save()