jenkins-bot has submitted this change and it was merged.
Change subject: StatsTable: remove group descriptions
......................................................................
StatsTable: remove group descriptions
There were multiple issues with these:
- they made the html larger for little benefit
- they were slow to generate so lot of caching were needed
- they were transformed instead of properly parsed like elsewhere
If the label is not enough, one can see the description after clicking
the group name which leads to Special:Translate.
No other callers inside Translate, but SpecialTranslate has an
identically named method.
Change-Id: Ia42e63f700b90b9a702081aca99b0dff24e20749
---
M utils/StatsTable.php
1 file changed, 1 insertion(+), 27 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
Siebrand: Looks good to me, approved
jenkins-bot: Verified
diff --git a/utils/StatsTable.php b/utils/StatsTable.php
index 17f2fb0..621a21d 100644
--- a/utils/StatsTable.php
+++ b/utils/StatsTable.php
@@ -265,39 +265,13 @@
'language' => $code
);
- $attributes = array(
- 'title' => $this->getGroupDescription( $group )
- );
+ $attributes = array();
$translateGroupLink = Linker::link(
$this->translate, $this->getGroupLabel( $group ),
$attributes, $queryParameters
);
return $translateGroupLink;
- }
-
- /**
- * Gets the description of a group. This is a bit slow thing to do for
- * thousand+ groups, so some caching is involved.
- * @param MessageGroup $group
- * @return string Plain text
- */
- public function getGroupDescription( MessageGroup $group ) {
- $code = $this->lang->getCode();
-
- $cache = wfGetCache( CACHE_ANYTHING );
- $key = wfMemcKey( "translate-groupdesc-$code-" .
$group->getId() );
- $desc = $cache->get( $key );
-
- if ( is_string( $desc ) ) {
- return $desc;
- }
-
- $mc = MessageCache::singleton();
- $desc = $mc->transform( $group->getDescription(), true,
$this->lang );
- $cache->set( $key, $desc );
-
- return $desc;
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/293266
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia42e63f700b90b9a702081aca99b0dff24e20749
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits