Last modified: 2008-10-02 17:28:31 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 T15310, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13310 - performance: Special:Browse shouldn't translate if the user's language matches wiki
performance: Special:Browse shouldn't translate if the user's language matche...
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: denny vrandecic
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-10 10:29 UTC by S Page
Modified: 2008-10-02 17:28 UTC (History)
0 users

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


Attachments

Description S Page 2008-03-10 10:29:23 UTC
If you enable translation by setting $smwgTranslate = true in SMW_Settings.php,
Special:Browse looks up property names and other page names in the langlinks table to get translated names. (Cool!)

However, Special:Browse does these lookups even when the user's language ($wgLang) is the same as the wiki's language ($wgContLang).  I believe there will never be interlang "translations" in this case.  For example, in an English wiki the langlinks table will never contain an "en" translation.

It would be a performance boost not to perform all this work if the user's language is the wiki's language.

The test in smwfTranslateTitle() should be something like:
	if ( $smwgTranslate ) {
		global $wgLanguageCode;
		// Only make expensive DB queries if user's language differs from wiki.
		if ($language->getCode() != $wgLanguageCode) {
                    ... do the langlinks DB query

	} else {
		... return title's fullText/text
Comment 1 denny vrandecic 2008-10-02 17:28:31 UTC
Since the translation system was completely removed, the bug does not apply anymore.

For creating a new translation system the comment though must to be taken into account.

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


Navigation
Links