Page MenuHomePhabricator

Namespace translations can break core namspeaces
Closed, ResolvedPublic

Description

If an entity namespace is set to a core namespace (e.g. to have items in the main namespace, you would currently use define( 'WB_NS_DATA', NS_MAIN ) ), then the namespace translations defined in Wikibase.i18n.namespace.php will interfere with the core namespaces (in the example, "Data" would become the preferred local prefix for the main namespace).

To avoid this, Wikibase should only provide translations for namespaces if they are not existing core namespaces. A quick and dirty way to detect this is to check whether the namespace ID is > 100.

Note that having non-trivial code in internationalization files is possible but discouraged. The conditional necessary for the above check should be OK, compare how LiquidThreads does this.


Version: unspecified
Severity: normal

Details

Reference
bz40397

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:03 AM
bzimport set Reference to bz40397.
bzimport added a subscriber: Unknown Object (MLST).

Verified in Wikidata demo time for sprint 17