* update/add translator documentation

* remove superfluous whitespace
This commit is contained in:
Siebrand Mazeland
2010-09-13 00:49:42 +02:00
parent d6be5be548
commit 8c94ebf537
12 changed files with 24 additions and 64 deletions

View File

@@ -46,7 +46,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
* @link http://status.net/
*/
class ActivityUtils
{
const ATOM = 'http://www.w3.org/2005/Atom';
@@ -66,7 +65,6 @@ class ActivityUtils
*
* @return string related link, if any
*/
static function getPermalink($element)
{
return self::getLink($element, 'alternate', 'text/html');
@@ -79,7 +77,6 @@ class ActivityUtils
*
* @return string related link, if any
*/
static function getLink(DOMNode $element, $rel, $type=null)
{
$els = $element->childNodes;
@@ -135,7 +132,6 @@ class ActivityUtils
*
* @return DOMElement found element or null
*/
static function child(DOMNode $element, $tag, $namespace=self::ATOM)
{
$els = $element->childNodes;
@@ -160,7 +156,6 @@ class ActivityUtils
*
* @return string content of the child
*/
static function childContent(DOMNode $element, $tag, $namespace=self::ATOM)
{
$el = self::child($element, $tag, $namespace);
@@ -194,7 +189,6 @@ class ActivityUtils
* @todo handle embedded XML mime types
* @todo handle base64-encoded non-XML and non-text mime types
*/
static function getContent($element)
{
return self::childHtmlContent($element, self::CONTENT, self::ATOM);
@@ -205,6 +199,7 @@ class ActivityUtils
$src = $el->getAttribute(self::SRC);
if (!empty($src)) {
// TRANS: Client exception thrown when there is no source attribute.
throw new ClientException(_("Can't handle remote content yet."));
}
@@ -241,10 +236,12 @@ class ActivityUtils
return trim($text);
} else if (in_array($type, array('text/xml', 'application/xml')) ||
preg_match('#(+|/)xml$#', $type)) {
// TRANS: Client exception thrown when there embedded XML content is found that cannot be processed yet.
throw new ClientException(_("Can't handle embedded XML content yet."));
} else if (strncasecmp($type, 'text/', 5)) {
return $el->textContent;
} else {
// TRANS: Client exception thrown when base64 encoded content is found that cannot be processed yet.
throw new ClientException(_("Can't handle embedded Base64 content yet."));
}
}