X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fwebcolor.php;h=bf791bf794e98438d4a14b3f3ff8b1cce373df23;hb=7220b3ddd4a32b947e851c946cb6ad6146bebf7d;hp=7f264c67410f841322a0b23592c4c3c7e356b566;hpb=60b66bdd6e3bbc083aec6126b8583714dc24b94d;p=quix0rs-gnu-social.git diff --git a/lib/webcolor.php b/lib/webcolor.php index 7f264c6741..bf791bf794 100644 --- a/lib/webcolor.php +++ b/lib/webcolor.php @@ -45,7 +45,6 @@ class WebColor { * * @return nothing */ - function __construct($color = null) { if (isset($color)) { @@ -77,7 +76,9 @@ class WebColor { if (preg_match('/(#([0-9A-Fa-f]{3,6})\b)/u', $color) > 0) { $this->setHexColor($color); } else { - $errmsg = _('%s is not a valid color!'); + // TRANS: Web color exception thrown when a hexadecimal color code does not validate. + // TRANS: %s is the provided (invalid) color code. + $errmsg = _('%s is not a valid color! Use 3 or 6 hex characters.'); throw new WebColorException(sprintf($errmsg, $color)); } } @@ -115,8 +116,8 @@ class WebColor { $hexcolor[1].$hexcolor[1], $hexcolor[2].$hexcolor[2]); } else { - // TRANS: Validation error for a web colour. - // TRANS: %s is the provided (invalid) text for colour. + // TRANS: Web color exception thrown when a hexadecimal color code does not validate. + // TRANS: %s is the provided (invalid) color code. $errmsg = _('%s is not a valid color! Use 3 or 6 hex characters.'); throw new WebColorException(sprintf($errmsg, $hexcolor)); }