PortableInfoboxBuilder: use localised template namespace (#55)

This commit is contained in:
Universal Omega 2022-01-04 11:53:41 -07:00 committed by GitHub
parent 04cfa2941d
commit e6ceceaf52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -249,7 +249,8 @@
return;
}
let namespace = ( title.substring( 0, 9 ) !== 'Template:' ? 'Template:' : '' );
let template = mw.config.get( 'wgFormattedNamespaces' )[10],
namespace = ( title.substring( 0, template.length ) !== template ? ( template + ':' ) : '' );
this.api.postWithToken( 'csrf', {
action: 'edit',