Omidfi has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380673 )
Change subject: Add number of languages to message group stats table ...................................................................... Add number of languages to message group stats table State directly how many languages are shown in the total row of group stats table. Bug: T129835 Change-Id: I1c9b4e7ed2f7baa8a3a0539dd131e6851269f7ca --- M i18n/core/en.json M i18n/core/qqq.json M specials/SpecialMessageGroupStats.php 3 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/73/380673/1 diff --git a/i18n/core/en.json b/i18n/core/en.json index 3dae9de..1068fcb 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -186,7 +186,7 @@ "translate-mgs-noempty": "Do not display languages which do not have any translations", "translate-mgs-submit": "Show statistics", "translate-mgs-column-language": "Language", - "translate-mgs-totals": "All languages together", + "translate-mgs-totals": "All $1 languages together", "translate-mgs-invalid-group": "The specified group $1 does not exist.", "translate-mgs-nothing": "Nothing to show for requested statistics.", "supportedlanguages": "Supported languages", diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json index 4f48156..9358dbf 100644 --- a/i18n/core/qqq.json +++ b/i18n/core/qqq.json @@ -218,7 +218,7 @@ "translate-mgs-noempty": "Option in [[Special:MessageGroupStats]]", "translate-mgs-submit": "Submit button text", "translate-mgs-column-language": "{{Identical|Language}}", - "translate-mgs-totals": "This is used in [[Special:MessageGroupStats]]", + "translate-mgs-totals": "This is used in [[Special:MessageGroupStats]]. Parameters: \n* $1 - total number of shown languages", "translate-mgs-invalid-group": "Used as error message. Parameters:\n* $1 - target message group name", "translate-mgs-nothing": "Error message shown on Special:LanguageStats and Special:MessageGroupStats.", "supportedlanguages": "{{doc-special|SupportedLanguages}}\n{{Identical|Supported language}}", diff --git a/specials/SpecialMessageGroupStats.php b/specials/SpecialMessageGroupStats.php index 2ae2123..7e567f4 100644 --- a/specials/SpecialMessageGroupStats.php +++ b/specials/SpecialMessageGroupStats.php @@ -143,7 +143,7 @@ } /** - * Overwriten from SpecialLanguageStats + * Overwritten from SpecialLanguageStats * * @return string */ @@ -160,6 +160,7 @@ MessageGroupStats::setTimeLimit( $this->timelimit ); $cache = MessageGroupStats::forGroup( $this->target ); + $this->numberOfShownLanguages = 0; $languages = array_keys( TranslateUtils::getLanguageNames( $this->getLanguage()->getCode() ) ); @@ -178,7 +179,7 @@ $out .= Html::closeElement( 'tbody' ); $out .= Html::openElement( 'tfoot' ); - $out .= $table->makeTotalRow( $this->msg( 'translate-mgs-totals' ), $this->totals ); + $out .= $table->makeTotalRow( $this->msg( 'translate-mgs-totals' , $this->numberOfShownLanguages), $this->totals ); $out .= Html::closeElement( 'tfoot' ); $out .= Html::closeElement( 'table' ); @@ -251,7 +252,7 @@ $extra = []; } } - + $this->numberOfShownLanguages += 1; $this->totals = MessageGroupStats::multiAdd( $this->totals, $stats ); $out = "\t" . Html::openElement( 'tr' ); -- To view, visit https://gerrit.wikimedia.org/r/380673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c9b4e7ed2f7baa8a3a0539dd131e6851269f7ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Omidfi <ommm...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits