Raimond Spekking has submitted this change and it was merged. Change subject: Use American English spelling for color ......................................................................
Use American English spelling for color Also change this in method names and comments. Spotted by Shirayuki in https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Supportedlanguages-summary/en_%283%29 Change-Id: Ie92634542b564aad417e5adddce08975f31fb520 --- M Translate.i18n.php M scripts/sync-group.php M specials/SpecialSupportedLanguages.php M utils/StatsTable.php 4 files changed, 11 insertions(+), 12 deletions(-) Approvals: Raimond Spekking: Looks good to me, approved diff --git a/Translate.i18n.php b/Translate.i18n.php index d7c2f64..969bf8d 100644 --- a/Translate.i18n.php +++ b/Translate.i18n.php @@ -267,7 +267,7 @@ 'supportedlanguages-summary' => 'This page shows a list of all languages supported by {{SITENAME}}, together with the names of the translators working on that language. A translator\'s name appears larger, the more edits the translator has contributed. -The colour of an underline indicates how recently a translator has been active here.', +The color of an underline indicates how recently a translator has been active here.', 'supportedlanguages-colorlegend' => 'Legend for the color: Last translation $1 days ago.', 'supportedlanguages-localsummary' => '', 'supportedlanguages-portallink' => '[$1] $2 - $3', @@ -760,7 +760,7 @@ 'supportedlanguages' => 'Title of [[Special:SupportedLanguages]]', 'supportedlanguages-summary' => 'Header for [[Special:SupportedLanguages]] page.', 'supportedlanguages-colorlegend' => 'Used on [[Special:SupportedLanguages]]. Parameters: -* $1 is not a single number, but a series of numbers with different background colours, serving as a legend to match each colour with a number of days passed since the last contributed translation. See [[Special:SupportedLanguages]] to see the final rendering.', +* $1 is not a single number, but a series of numbers with different background colors, serving as a legend to match each color with a number of days passed since the last contributed translation. See [[Special:SupportedLanguages]] to see the final rendering.', 'supportedlanguages-localsummary' => '{{notranslate}} Place any site specific message here.', 'supportedlanguages-portallink' => '{{optional}}', diff --git a/scripts/sync-group.php b/scripts/sync-group.php index 529e6e0..1badfc9 100644 --- a/scripts/sync-group.php +++ b/scripts/sync-group.php @@ -31,7 +31,7 @@ --noask Skip all conflicts --start Start of the last export (changes in wiki after will conflict) --end End of the last export (changes in source after will conflict) - --nocolor Without colours + --nocolor Without colors EOT ); exit( 1 ); @@ -153,7 +153,7 @@ public $group; ///< \type{MessageGroup} public $norc = false; ///< \bool Don't list changes in recent changes table. public $interactive = true; ///< \bool Whether the script can ask questions. - public $nocolor = false; ///< \bool Disable colour output. + public $nocolor = false; ///< \bool Disable color output. public function __construct( MessageGroup $group ) { $this->group = $group; @@ -339,7 +339,7 @@ } /** - * Colours text for shell output + * Colors text for shell output * @param $color \string Either blue, green or bold. * @param $text \string * @return \string diff --git a/specials/SpecialSupportedLanguages.php b/specials/SpecialSupportedLanguages.php index 9d5e005..07acf9c 100644 --- a/specials/SpecialSupportedLanguages.php +++ b/specials/SpecialSupportedLanguages.php @@ -309,8 +309,7 @@ $last = round( $last / $day ); $attribs['title'] = $this->msg( 'supportedlanguages-activity', $username )->numParams( $count, $last )->text(); $last = max( 1, min( $period, $last ) ); - $styles['border-bottom'] = '3px solid #' . $this->getActivityColour( $period - $last, $period ); - # $styles['color'] = '#' . $this->getBackgroundColour( $period - $last, $period ); + $styles['border-bottom'] = '3px solid #' . $this->getActivityColor( $period - $last, $period ); } else { $enc = "<del>$enc</del>"; } @@ -365,7 +364,7 @@ } /// FIXME: copied from Special:LanguageStats - protected function getActivityColour( $subset, $total ) { + protected function getActivityColor( $subset, $total ) { $v = @round( 255 * $subset / $total ); if ( $v < 128 ) { @@ -414,7 +413,7 @@ for ( $i = 0; $i <= $period; $i += 30 ) { $iFormatted = htmlspecialchars( $this->getLanguage()->formatNum( $i ) ); - $legend .= '<span style="background-color:#' . $this->getActivityColour( $period - $i, $period ) . "\"> $iFormatted</span>"; + $legend .= '<span style="background-color:#' . $this->getActivityColor( $period - $i, $period ) . "\"> $iFormatted</span>"; } return $legend; } diff --git a/utils/StatsTable.php b/utils/StatsTable.php index 4a1ceec..e2eb5a6 100644 --- a/utils/StatsTable.php +++ b/utils/StatsTable.php @@ -62,7 +62,7 @@ return $element; } - public function getBackgroundColour( $subset, $total, $fuzzy = false ) { + public function getBackgroundColor( $subset, $total, $fuzzy = false ) { $v = @round( 255 * $subset / $total ); if ( $fuzzy ) { @@ -186,11 +186,11 @@ } $out .= "\n\t\t" . $this->element( $this->formatPercentage( $transRatio, 'floor' ), - $this->getBackgroundColour( $translated, $total ), + $this->getBackgroundColor( $translated, $total ), sprintf( '%1.5f', $transRatio ) ); $out .= "\n\t\t" . $this->element( $this->formatPercentage( $fuzzyRatio, 'ceil' ), - $this->getBackgroundColour( $fuzzy, $total, true ), + $this->getBackgroundColor( $fuzzy, $total, true ), sprintf( '%1.5f', $fuzzyRatio ) ); return $out; } -- To view, visit https://gerrit.wikimedia.org/r/51992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie92634542b564aad417e5adddce08975f31fb520 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand <[email protected]> Gerrit-Reviewer: Nikerabbit <[email protected]> Gerrit-Reviewer: Raimond Spekking <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
