summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-20 00:53:42 +0200
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-20 00:53:42 +0200
commit25b9552ec3e7606b2d054fba10428c6cef38b971 (patch)
tree3220446aaf388bb55ec9e536cb1e1f78402d7673
parent0157df739665c9c6a9d8c30c6eaf141d980fc108 (diff)
More complete sentence and translator documentation added.
-rw-r--r--lib/webcolor.php15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/webcolor.php b/lib/webcolor.php
index 6fa603fa2..7f264c674 100644
--- a/lib/webcolor.php
+++ b/lib/webcolor.php
@@ -32,7 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
}
class WebColor {
-
// XXX: Maybe make getters and setters for r,g,b values and tuples,
// e.g.: to support this kinda CSS representation: rgb(255,0,0)
// http://www.w3.org/TR/CSS21/syndata.html#color-units
@@ -65,7 +64,6 @@ class WebColor {
*
* @return nothing
*/
-
function parseColor($color) {
if (is_numeric($color)) {
@@ -90,13 +88,11 @@ class WebColor {
*
* @return nothing
*/
-
function setNamedColor($name)
{
// XXX Implement this
}
-
/**
* Sets the RGB color values from a a hex tuple
*
@@ -104,7 +100,6 @@ class WebColor {
*
* @return nothing
*/
-
function setHexColor($hexcolor) {
if ($hexcolor[0] == '#') {
@@ -120,7 +115,9 @@ class WebColor {
$hexcolor[1].$hexcolor[1],
$hexcolor[2].$hexcolor[2]);
} else {
- $errmsg = _('%s is not a valid color! Use 3 or 6 hex chars.');
+ // TRANS: Validation error for a web colour.
+ // TRANS: %s is the provided (invalid) text for colour.
+ $errmsg = _('%s is not a valid color! Use 3 or 6 hex characters.');
throw new WebColorException(sprintf($errmsg, $hexcolor));
}
@@ -137,7 +134,6 @@ class WebColor {
*
* @return nothing
*/
-
function setIntColor($intcolor)
{
// We could do 32 bit and have an alpha channel because
@@ -154,7 +150,6 @@ class WebColor {
*
* @return string
*/
-
function hexValue() {
$hexcolor = (strlen(dechex($this->red)) < 2 ? '0' : '' ) .
@@ -165,7 +160,6 @@ class WebColor {
dechex($this->blue);
return strtoupper($hexcolor);
-
}
/**
@@ -176,7 +170,6 @@ class WebColor {
*
* @return int
*/
-
function intValue()
{
$intcolor = 256 * 256 * $this->red + 256 * $this->green + $this->blue;
@@ -188,5 +181,3 @@ class WebColor {
class WebColorException extends Exception
{
}
-
-?> \ No newline at end of file