From 96b9ecaf0771a6108e4cce4175f1e23bbbaeb735 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Fri, 17 Jun 2011 22:35:45 +0200 Subject: [PATCH] Update translator documentation. L10n/i18n updates. Whitespace updates. --- plugins/TagSub/TagSub.php | 1 - plugins/TagSub/TagSubPlugin.php | 3 +-- plugins/TagSub/tagsubform.php | 17 +++++------------ plugins/TagSub/tagsubmenu.php | 7 +++---- plugins/TagSub/tagsubsaction.php | 14 ++++++++------ plugins/TagSub/tagunsubform.php | 14 +++++--------- 6 files changed, 22 insertions(+), 34 deletions(-) diff --git a/plugins/TagSub/TagSub.php b/plugins/TagSub/TagSub.php index 9662811bf9..a03be48ac3 100644 --- a/plugins/TagSub/TagSub.php +++ b/plugins/TagSub/TagSub.php @@ -42,7 +42,6 @@ if (!defined('STATUSNET')) { * * @see DB_DataObject */ - class TagSub extends Managed_DataObject { public $__table = 'tagsub'; // table name diff --git a/plugins/TagSub/TagSubPlugin.php b/plugins/TagSub/TagSubPlugin.php index 59297a7fb3..b84b208006 100644 --- a/plugins/TagSub/TagSubPlugin.php +++ b/plugins/TagSub/TagSubPlugin.php @@ -192,7 +192,6 @@ class TagSubPlugin extends Plugin * * @return boolean hook return */ - function onEndSubGroupNav($widget) { $action = $widget->out; @@ -218,11 +217,11 @@ class TagSubPlugin extends Plugin if (!empty($tags) && count($tags) > 0) { $tagSubMenu = new TagSubMenu($menu->out, $user, $tags); + // TRANS: Menu item text for tags submenu. $menu->submenu(_m('Tags'), $tagSubMenu); } } return true; } - } diff --git a/plugins/TagSub/tagsubform.php b/plugins/TagSub/tagsubform.php index 169ccc4adb..22eed25801 100644 --- a/plugins/TagSub/tagsubform.php +++ b/plugins/TagSub/tagsubform.php @@ -46,13 +46,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * * @see UnsubscribeForm */ - class TagSubForm extends Form { /** * Name of tag to subscribe to */ - var $tag = ''; /** @@ -61,7 +59,6 @@ class TagSubForm extends Form * @param HTMLOutputter $out output channel * @param string $tag name of tag to subscribe to */ - function __construct($out=null, $tag=null) { parent::__construct($out); @@ -74,38 +71,32 @@ class TagSubForm extends Form * * @return int ID of the form */ - function id() { return 'tag-subscribe-' . $this->tag; } - /** * class of the form * * @return string of the form class */ - function formClass() { // class to match existing styles... return 'form_user_subscribe ajax'; } - /** * Action of the form * * @return string URL of the action */ - function action() { return common_local_url('tagsub', array('tag' => $this->tag)); } - /** * Legend of the Form * @@ -113,6 +104,7 @@ class TagSubForm extends Form */ function formLegend() { + // TRANS: Form legend. $this->out->element('legend', null, _m('Subscribe to this tag')); } @@ -121,7 +113,6 @@ class TagSubForm extends Form * * @return void */ - function formData() { $this->out->hidden('subscribeto-' . $this->tag, @@ -134,9 +125,11 @@ class TagSubForm extends Form * * @return void */ - function formActions() { - $this->out->submit('submit', _m('BUTTON','Subscribe'), 'submit', null, _m('Subscribe to this tag')); + // TRANS: Submit button text to subscribe to a tag. + $this->out->submit('submit', _m('BUTTON','Subscribe'), + // TRANS: Submit button title to subscribe to a tag. + 'submit', null, _m('Subscribe to this tag.')); } } diff --git a/plugins/TagSub/tagsubmenu.php b/plugins/TagSub/tagsubmenu.php index e57a8a8a97..9a8215ee51 100644 --- a/plugins/TagSub/tagsubmenu.php +++ b/plugins/TagSub/tagsubmenu.php @@ -4,7 +4,7 @@ * Copyright (C) 2011, StatusNet, Inc. * * Menu to show tags you're subscribed to - * + * * PHP version 5 * * This program is free software: you can redistribute it and/or modify @@ -44,7 +44,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class TagSubMenu extends Menu { protected $user; @@ -66,7 +65,8 @@ class TagSubMenu extends Menu $this->out->menuItem(common_local_url('tag', array('tag' => $tag)), sprintf('#%s', $tag), - sprintf(_('Notices tagged with %s'), $tag), + // TRANS: Menu item title. %s is a tag. + sprintf(_('Notices tagged with "%s".'), $tag), $this->actionName == 'tag' && $this->action->arg('tag') == $tag, 'nav_streams_tag_'.$tag); } @@ -74,5 +74,4 @@ class TagSubMenu extends Menu $this->out->elementEnd('ul'); } - } diff --git a/plugins/TagSub/tagsubsaction.php b/plugins/TagSub/tagsubsaction.php index 21ddf5035f..be195250f6 100644 --- a/plugins/TagSub/tagsubsaction.php +++ b/plugins/TagSub/tagsubsaction.php @@ -116,18 +116,18 @@ class TagSubsAction extends GalleryAction if ($this->user->id === $current_user->id) { // TRANS: Tag subscription list text when the logged in user has no tag subscriptions. $message = _m('You are not listening to any hash tags right now. You can push the "Subscribe" button ' . - 'on any hashtag page to automatically receive any public messages on this site that use that ' . - 'tag, even if you are not subscribed to the poster.'); + 'on any hashtag page to automatically receive any public messages on this site that use that ' . + 'tag, even if you are not subscribed to the poster.'); } else { // TRANS: Tag subscription list text when looking at the subscriptions for a of a user other // TRANS: than the logged in user that has no tag subscriptions. %s is the user nickname. - $message = sprintf(_m('%s is not listening to any tags.'), $this->user->nickname); + $message = sprintf(_m('%s is not following any tags.'), $this->user->nickname); } } else { // TRANS: Subscription list text when looking at the subscriptions for a of a user that has none // TRANS: as an anonymous user. %s is the user nickname. - $message = sprintf(_m('%s is not listening to any tags.'), $this->user->nickname); + $message = sprintf(_m('%s is not following any tags.'), $this->user->nickname); } $this->elementStart('div', 'guide'); @@ -163,9 +163,11 @@ class TagSubscriptionsListItem extends SubscriptionListItem if (!empty($cur) && $cur->id == $this->owner->id) { $this->showOwnerControls(); } - + $url = common_local_url('tag', array('tag' => $tag)); - $linkline = sprintf(_m('#%s since %s'), + // TRANS: %1$s is a URL to a tag, %2$s is a tag, + // TRANS: %3$s a date string. + $linkline = sprintf(_m('#%2$s since %3$s'), htmlspecialchars($url), htmlspecialchars($tag), common_date_string($tagsub->created)); diff --git a/plugins/TagSub/tagunsubform.php b/plugins/TagSub/tagunsubform.php index d26e99a3e5..6bec4b0ce1 100644 --- a/plugins/TagSub/tagunsubform.php +++ b/plugins/TagSub/tagunsubform.php @@ -46,7 +46,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * * @see UnsubscribeForm */ - class TagUnsubForm extends TagSubForm { /** @@ -54,38 +53,32 @@ class TagUnsubForm extends TagSubForm * * @return int ID of the form */ - function id() { return 'tag-unsubscribe-' . $this->tag; } - /** * class of the form * * @return string of the form class */ - function formClass() { // class to match existing styles... return 'form_user_unsubscribe ajax'; } - /** * Action of the form * * @return string URL of the action */ - function action() { return common_local_url('tagunsub', array('tag' => $this->tag)); } - /** * Legend of the Form * @@ -93,6 +86,7 @@ class TagUnsubForm extends TagSubForm */ function formLegend() { + // TRANS: Form legend. $this->out->element('legend', null, _m('Unsubscribe from this tag')); } @@ -101,9 +95,11 @@ class TagUnsubForm extends TagSubForm * * @return void */ - function formActions() { - $this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null, _m('Unsubscribe from this tag')); + // TRANS: Submit button text to unsubscribe from a tag. + $this->out->submit('submit', _m('BUTTON','Unsubscribe'), + // TRANS: Submit button title to unsubscribe from a tag. + 'submit', null, _m('Unsubscribe from this tag.')); } }