diff options
author | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2010-10-03 23:54:57 +0200 |
---|---|---|
committer | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2010-10-03 23:54:57 +0200 |
commit | 67f97194e446e81e0bc57ef60ae75ba0579170b7 (patch) | |
tree | 74c5be7e2a258ebb5fc5031e1c02a51a6f206468 /plugins | |
parent | 458512aafdd224f32eb466d78c2d2624f3c86593 (diff) |
i18n/L10n review, plugin credits added.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Sitemap/SitemapPlugin.php | 34 | ||||
-rw-r--r-- | plugins/Sitemap/Sitemap_notice_count.php | 9 | ||||
-rw-r--r-- | plugins/Sitemap/Sitemap_user_count.php | 7 | ||||
-rw-r--r-- | plugins/Sitemap/noticesitemap.php | 1 | ||||
-rw-r--r-- | plugins/Sitemap/sitemapaction.php | 2 | ||||
-rw-r--r-- | plugins/Sitemap/sitemapadminpanel.php | 44 | ||||
-rw-r--r-- | plugins/Sitemap/sitemapindex.php | 2 | ||||
-rw-r--r-- | plugins/Sitemap/usersitemap.php | 1 |
8 files changed, 53 insertions, 47 deletions
diff --git a/plugins/Sitemap/SitemapPlugin.php b/plugins/Sitemap/SitemapPlugin.php index b6d3b1ad3..6a77f8123 100644 --- a/plugins/Sitemap/SitemapPlugin.php +++ b/plugins/Sitemap/SitemapPlugin.php @@ -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 SitemapPlugin extends Plugin { const USERS_PER_MAP = 50000; @@ -57,7 +56,6 @@ class SitemapPlugin extends Plugin * * @return boolean hook value; true means continue processing, false means stop. */ - function onAutoload($cls) { $dir = dirname(__FILE__); @@ -89,7 +87,6 @@ class SitemapPlugin extends Plugin * * @return boolean hook value. */ - function onEndRobotsTxt($action) { $url = common_local_url('sitemapindex'); @@ -106,7 +103,6 @@ class SitemapPlugin extends Plugin * * @return boolean hook value; true means continue processing, false means stop. */ - function onRouterInitialized($m) { $m->connect('sitemapindex.xml', @@ -142,7 +138,6 @@ class SitemapPlugin extends Plugin * * @return boolean hook value. */ - function onStartShowHeadElements($action) { $actionName = $action->trimmed('action'); @@ -181,7 +176,6 @@ class SitemapPlugin extends Plugin * * @return boolean hook value; true means continue processing, false means stop. */ - function onCheckSchema() { $schema = Schema::get(); @@ -214,11 +208,35 @@ class SitemapPlugin extends Plugin function onEndAdminPanelNav($menu) { if (AdminPanelAction::canAdmin('sitemap')) { // TRANS: Menu item title/tooltip - $menu_title = _('Sitemap configuration'); + $menu_title = _m('Sitemap configuration'); // TRANS: Menu item for site administration - $menu->out->menuItem(common_local_url('sitemapadminpanel'), _('Sitemap'), + $menu->out->menuItem(common_local_url('sitemapadminpanel'), _m('MENU','Sitemap'), $menu_title, $action_name == 'sitemapadminpanel', 'nav_sitemap_admin_panel'); } return true; } + + /** + * Provide plugin version information. + * + * This data is used when showing the version page. + * + * @param array &$versions array of version data arrays; see EVENTS.txt + * + * @return boolean hook value + */ + function onPluginVersion(&$versions) + { + $url = 'http://status.net/wiki/Plugin:Sitemap'; + + $versions[] = array('name' => 'Sitemap', + 'version' => STATUSNET_VERSION, + 'author' => 'Evan Prodromou', + 'homepage' => $url, + 'rawdescription' => + // TRANS: Plugin description. + _m('This plugin allows creation of sitemaps for Bing, Yahoo! and Google.')); + + return true; + } } diff --git a/plugins/Sitemap/Sitemap_notice_count.php b/plugins/Sitemap/Sitemap_notice_count.php index 6e0061e97..2238ff521 100644 --- a/plugins/Sitemap/Sitemap_notice_count.php +++ b/plugins/Sitemap/Sitemap_notice_count.php @@ -51,7 +51,6 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php'; * * @see DB_DataObject */ - class Sitemap_notice_count extends Memcached_DataObject { public $__table = 'sitemap_notice_count'; // table name @@ -72,7 +71,6 @@ class Sitemap_notice_count extends Memcached_DataObject * @return Sitemap_notice_count object found, or null for no hits * */ - function staticGet($k, $v=null) { return Memcached_DataObject::staticGet('Sitemap_notice_count', $k, $v); @@ -86,7 +84,6 @@ class Sitemap_notice_count extends Memcached_DataObject * * @return array array of column definitions */ - function table() { return array('notice_date' => DB_DATAOBJECT_DATE + DB_DATAOBJECT_NOTNULL, @@ -103,7 +100,6 @@ class Sitemap_notice_count extends Memcached_DataObject * * @return array key definitions */ - function keys() { return array('notice_date' => 'K'); @@ -117,7 +113,6 @@ class Sitemap_notice_count extends Memcached_DataObject * * @return array key definitions */ - function keyTypes() { return $this->keys(); @@ -128,7 +123,6 @@ class Sitemap_notice_count extends Memcached_DataObject $noticeCounts = self::cacheGet('sitemap:notice:counts'); if ($noticeCounts === false) { - $snc = new Sitemap_notice_count(); $snc->orderBy('notice_date DESC'); @@ -236,7 +230,8 @@ class Sitemap_notice_count extends Memcached_DataObject $snc = Sitemap_notice_count::staticGet('notice_date', DB_DataObject_Cast::date($d)); if (empty($snc)) { - throw new Exception("No such registration date: $d"); + // TRANS: Exception + throw new Exception(_m("No such registration date: $d.")); } $orig = clone($snc); diff --git a/plugins/Sitemap/Sitemap_user_count.php b/plugins/Sitemap/Sitemap_user_count.php index 98dd05bfe..0b45021bf 100644 --- a/plugins/Sitemap/Sitemap_user_count.php +++ b/plugins/Sitemap/Sitemap_user_count.php @@ -47,7 +47,6 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php'; * * @see DB_DataObject */ - class Sitemap_user_count extends Memcached_DataObject { public $__table = 'sitemap_user_count'; // table name @@ -68,7 +67,6 @@ class Sitemap_user_count extends Memcached_DataObject * @return Sitemap_user_count object found, or null for no hits * */ - function staticGet($k, $v=null) { return Memcached_DataObject::staticGet('Sitemap_user_count', $k, $v); @@ -82,7 +80,6 @@ class Sitemap_user_count extends Memcached_DataObject * * @return array array of column definitions */ - function table() { return array('registration_date' => DB_DATAOBJECT_DATE + DB_DATAOBJECT_NOTNULL, @@ -118,7 +115,6 @@ class Sitemap_user_count extends Memcached_DataObject * * @return array key definitions */ - function keyTypes() { return $this->keys(); @@ -235,7 +231,8 @@ class Sitemap_user_count extends Memcached_DataObject $suc = Sitemap_user_count::staticGet('registration_date', DB_DataObject_Cast::date($d)); if (empty($suc)) { - throw new Exception("No such registration date: $d"); + // TRANS: Exception thrown when a registration date cannot be found. + throw new Exception(_m("No such registration date: $d.")); } $orig = clone($suc); diff --git a/plugins/Sitemap/noticesitemap.php b/plugins/Sitemap/noticesitemap.php index 7d9d2e5d6..efa23b940 100644 --- a/plugins/Sitemap/noticesitemap.php +++ b/plugins/Sitemap/noticesitemap.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class NoticesitemapAction extends SitemapAction { var $notices = null; diff --git a/plugins/Sitemap/sitemapaction.php b/plugins/Sitemap/sitemapaction.php index 73b9248a3..ef77645c3 100644 --- a/plugins/Sitemap/sitemapaction.php +++ b/plugins/Sitemap/sitemapaction.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class SitemapAction extends Action { /** @@ -50,7 +49,6 @@ class SitemapAction extends Action * * @return void */ - function handle($args) { parent::handle($args); diff --git a/plugins/Sitemap/sitemapadminpanel.php b/plugins/Sitemap/sitemapadminpanel.php index 3372723b0..3304cfd01 100644 --- a/plugins/Sitemap/sitemapadminpanel.php +++ b/plugins/Sitemap/sitemapadminpanel.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class SitemapadminpanelAction extends AdminPanelAction { /** @@ -48,10 +47,10 @@ class SitemapadminpanelAction extends AdminPanelAction * * @return string page title */ - function title() { - return _('Sitemap'); + // TRANS: Title for sitemap. + return _m('Sitemap'); } /** @@ -59,10 +58,10 @@ class SitemapadminpanelAction extends AdminPanelAction * * @return string instructions */ - function getInstructions() { - return _('Sitemap settings for this StatusNet site'); + // TRANS: Instructions for sitemap. + return _m('Sitemap settings for this StatusNet site'); } /** @@ -70,7 +69,6 @@ class SitemapadminpanelAction extends AdminPanelAction * * @return void */ - function showForm() { $form = new SitemapAdminPanelForm($this); @@ -83,7 +81,6 @@ class SitemapadminpanelAction extends AdminPanelAction * * @return void */ - function saveSettings() { static $settings = array('sitemap' => array('googlekey', 'yahookey', 'bingkey')); @@ -97,7 +94,6 @@ class SitemapadminpanelAction extends AdminPanelAction } // This throws an exception on validation errors - $this->validate($values); // assert(all values are valid); @@ -125,7 +121,6 @@ class SitemapadminpanelAction extends AdminPanelAction /** * Form for the sitemap admin panel */ - class SitemapAdminPanelForm extends AdminForm { /** @@ -133,7 +128,6 @@ class SitemapAdminPanelForm extends AdminForm * * @return int ID of the form */ - function id() { return 'form_sitemap_admin_panel'; @@ -144,7 +138,6 @@ class SitemapAdminPanelForm extends AdminForm * * @return string class of the form */ - function formClass() { return 'form_sitemap'; @@ -155,7 +148,6 @@ class SitemapAdminPanelForm extends AdminForm * * @return string URL of the action */ - function action() { return common_local_url('sitemapadminpanel'); @@ -166,26 +158,31 @@ class SitemapAdminPanelForm extends AdminForm * * @return void */ - function formData() { $this->out->elementStart('ul', 'form_data'); $this->li(); $this->input('googlekey', - _('Google key'), - _('Google Webmaster Tools verification key'), + // TRANS: Field label. + _m('Google key'), + // TRANS: Title for field label. + _m('Google Webmaster Tools verification key.'), 'sitemap'); $this->unli(); $this->li(); $this->input('yahookey', - _('Yahoo key'), - _('Yahoo! Site Explorer verification key'), + // TRANS: Field label. + _m('Yahoo key'), + // TRANS: Title for field label. + _m('Yahoo! Site Explorer verification key.'), 'sitemap'); $this->unli(); $this->li(); $this->input('bingkey', - _('Bing key'), - _('Bing Webmaster Tools verification key'), + // TRANS: Field label. + _m('Bing key'), + // TRANS: Title for field label. + _m('Bing Webmaster Tools verification key.'), 'sitemap'); $this->unli(); $this->out->elementEnd('ul'); @@ -196,9 +193,14 @@ class SitemapAdminPanelForm extends AdminForm * * @return void */ - function formActions() { - $this->out->submit('submit', _('Save'), 'submit', null, _('Save sitemap settings')); + $this->out->submit('submit', + // TRANS: Submit button text to save sitemap settings. + _m('BUTTON','Save'), + 'submit', + null, + // TRANS: Submit button title to save sitemap settings. + _m('Save sitemap settings.')); } } diff --git a/plugins/Sitemap/sitemapindex.php b/plugins/Sitemap/sitemapindex.php index 169e3031c..ab89c2156 100644 --- a/plugins/Sitemap/sitemapindex.php +++ b/plugins/Sitemap/sitemapindex.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class SitemapindexAction extends Action { /** @@ -50,7 +49,6 @@ class SitemapindexAction extends Action * * @return void */ - function handle($args) { header('Content-Type: text/xml; charset=UTF-8'); diff --git a/plugins/Sitemap/usersitemap.php b/plugins/Sitemap/usersitemap.php index de1200715..c39165d0e 100644 --- a/plugins/Sitemap/usersitemap.php +++ b/plugins/Sitemap/usersitemap.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class UsersitemapAction extends SitemapAction { var $users = null; |