if ( $wmgUseWikibaseRepo ) {
	// Define custom namespaces. Use these exact constant names.
	$wgNamespaceAliases['Item'] = NS_MAIN;
	$wgNamespaceAliases['Item_talk'] = NS_TALK;

	// Tell Wikibase which namespace to use for which kind of entity
	$wgWBRepoSettings['entityNamespaces']['item'] = NS_MAIN;
	define( 'WB_NS_PROPERTY', 122 );
	define( 'WB_NS_PROPERTY_TALK', 123 );
	$wgWBRepoSettings['entityNamespaces']['property'] = WB_NS_PROPERTY;

	// Register extra namespaces.
	$wgWBNamespaces[WB_NS_PROPERTY] = 'Property';
	$wgWBNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
	$wgExtraNamespaces = $wgWBNamespaces + $wgExtraNamespaces;
} else {
	$wgWBClientSettings['siteGlobalID'] = 'enwiki';

	$wgWBClientSettings['changesDatabase'] = 'wikidatawiki';
	$wgWBClientSettings['repoDatabase'] = 'wikidatawiki';
}

$wgWBClientSettings['repoUrl'] = '//wikidata<%= scope['::mediawiki::multiwiki::base_domain'] %><%= scope['::port_fragment'] %>';

define( 'WB_NS_PROPERTY', 122 );
define( 'WB_NS_PROPERTY_TALK', 123 );

// Tell Wikibase which namespace to use for which kind of entity.
// WikibaseClient wikis also need to know how this is configured on
// WikibaseRepo wikis that it accesses, thus these are shared settings.
$wgWBEntityNamespaces = [
	'item' => NS_MAIN,
	'property' => WB_NS_PROPERTY
];

if ( $wmgUseWikibaseRepo ) {
	// Define custom namespaces. Use these exact constant names.
	$wgNamespaceAliases['Item'] = NS_MAIN;
	$wgNamespaceAliases['Item_talk'] = NS_TALK;

	// Register extra namespaces.
	$wgWBNamespaces[WB_NS_PROPERTY] = 'Property';
	$wgWBNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';

	$wgWBRepoSettings['entityNamespaces'] = $wgWBEntityNamespaces;
	$wgExtraNamespaces = $wgWBNamespaces + $wgExtraNamespaces;
} else {
	$wgWBClientSettings['siteGlobalID'] = 'enwiki';

	$wgWBClientSettings['changesDatabase'] = 'wikidatawiki';
	$wgWBClientSettings['repoDatabase'] = 'wikidatawiki';

	$wgWBClientSettings['entityNamespaces'] = $wgWBEntityNamespaces;
}

$wgWBClientSettings['repoUrl'] = '//wikidata<%= scope['::mediawiki::multiwiki::base_domain'] %><%= scope['::port_fragment'] %>';

Add entityNamespaces setting for WikibaseClient
Add entityNamespaces setting for WikibaseClient

This is needed in repo and client, and should be same in both.

Change-Id: I8453166d19f03154e9200d41c1a8a56e222273a1
