Last modified: 2012-11-29 12:42:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42397, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40397 - Namespace translations can break core namspeaces
Namespace translations can break core namspeaces
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on: 40390
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-20 13:24 UTC by Daniel Kinzler
Modified: 2012-11-29 12:42 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2012-09-20 13:24:52 UTC
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.
Comment 1 Daniel Kinzler 2012-09-20 18:40:01 UTC
Adressed by I3e96a402
Comment 2 Anja Jentzsch 2012-11-29 12:42:05 UTC
Verified in Wikidata demo time for sprint 17

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links