mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Use (Main)
for NS 0
This commit is contained in:
parent
a0d8665bc3
commit
aded8e179f
|
@ -612,7 +612,9 @@ def embed_block_block(ctx, change):
|
||||||
else:
|
else:
|
||||||
restriction_description = ctx._("Blocked from editing pages on following namespaces: ")
|
restriction_description = ctx._("Blocked from editing pages on following namespaces: ")
|
||||||
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
||||||
if str(namespace) in ctx.client.namespaces: # if we have cached namespace name for given namespace number, add its name to the list
|
if str(namespace) == "0":
|
||||||
|
namespaces.append("*{ns}*".format(ns=ctx._("(Main)")))
|
||||||
|
elif str(namespace) in ctx.client.namespaces: # if we have cached namespace name for given namespace number, add its name to the list
|
||||||
namespaces.append("*{ns}*".format(ns=ctx.client.namespaces[str(namespace)]["*"]))
|
namespaces.append("*{ns}*".format(ns=ctx.client.namespaces[str(namespace)]["*"]))
|
||||||
else:
|
else:
|
||||||
namespaces.append("*{ns}*".format(ns=namespace))
|
namespaces.append("*{ns}*".format(ns=namespace))
|
||||||
|
@ -658,7 +660,9 @@ def compact_block_block(ctx, change):
|
||||||
else:
|
else:
|
||||||
restriction_description = ctx._(" on namespaces: ")
|
restriction_description = ctx._(" on namespaces: ")
|
||||||
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
||||||
if str(namespace) in ctx.client.namespaces: # if we have cached namespace name for given namespace number, add its name to the list
|
if str(namespace) == "0":
|
||||||
|
namespaces.append("*{ns}*".format(ns=ctx._("(Main)")))
|
||||||
|
elif str(namespace) in ctx.client.namespaces: # if we have cached namespace name for given namespace number, add its name to the list
|
||||||
namespaces.append("*{ns}*".format(ns=ctx.client.namespaces[str(namespace)]["*"]))
|
namespaces.append("*{ns}*".format(ns=ctx.client.namespaces[str(namespace)]["*"]))
|
||||||
else:
|
else:
|
||||||
namespaces.append("*{ns}*".format(ns=namespace))
|
namespaces.append("*{ns}*".format(ns=namespace))
|
||||||
|
|
Loading…
Reference in a new issue