* i18n/L10n updates
* superfluous whitespace removed
This commit is contained in:
parent
39802077a8
commit
04b7af4620
@ -77,7 +77,6 @@ if (!defined('STATUSNET')) {
|
|||||||
*
|
*
|
||||||
* @seeAlso UAPPlugin
|
* @seeAlso UAPPlugin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AdsensePlugin extends UAPPlugin
|
class AdsensePlugin extends UAPPlugin
|
||||||
{
|
{
|
||||||
public $adScript = 'http://pagead2.googlesyndication.com/pagead/show_ads.js';
|
public $adScript = 'http://pagead2.googlesyndication.com/pagead/show_ads.js';
|
||||||
@ -89,7 +88,6 @@ class AdsensePlugin extends UAPPlugin
|
|||||||
|
|
||||||
// A little bit of chicanery so we avoid overwriting values that
|
// A little bit of chicanery so we avoid overwriting values that
|
||||||
// are passed in with the constructor
|
// are passed in with the constructor
|
||||||
|
|
||||||
foreach (array('mediumRectangle', 'rectangle', 'leaderboard', 'wideSkyscraper', 'adScript', 'client') as $setting) {
|
foreach (array('mediumRectangle', 'rectangle', 'leaderboard', 'wideSkyscraper', 'adScript', 'client') as $setting) {
|
||||||
$value = common_config('adsense', strtolower($setting));
|
$value = common_config('adsense', strtolower($setting));
|
||||||
if (!empty($value)) { // not found
|
if (!empty($value)) { // not found
|
||||||
@ -105,7 +103,6 @@ class AdsensePlugin extends UAPPlugin
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected function showMediumRectangle($action)
|
protected function showMediumRectangle($action)
|
||||||
{
|
{
|
||||||
$this->showAdsenseCode($action, 300, 250, $this->mediumRectangle);
|
$this->showAdsenseCode($action, 300, 250, $this->mediumRectangle);
|
||||||
@ -118,7 +115,6 @@ class AdsensePlugin extends UAPPlugin
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected function showRectangle($action)
|
protected function showRectangle($action)
|
||||||
{
|
{
|
||||||
$this->showAdsenseCode($action, 180, 150, $this->rectangle);
|
$this->showAdsenseCode($action, 180, 150, $this->rectangle);
|
||||||
@ -131,7 +127,6 @@ class AdsensePlugin extends UAPPlugin
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected function showWideSkyscraper($action)
|
protected function showWideSkyscraper($action)
|
||||||
{
|
{
|
||||||
$this->showAdsenseCode($action, 160, 600, $this->wideSkyscraper);
|
$this->showAdsenseCode($action, 160, 600, $this->wideSkyscraper);
|
||||||
@ -144,7 +139,6 @@ class AdsensePlugin extends UAPPlugin
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected function showLeaderboard($action)
|
protected function showLeaderboard($action)
|
||||||
{
|
{
|
||||||
$this->showAdsenseCode($action, 728, 90, $this->leaderboard);
|
$this->showAdsenseCode($action, 728, 90, $this->leaderboard);
|
||||||
@ -160,7 +154,6 @@ class AdsensePlugin extends UAPPlugin
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected function showAdsenseCode($action, $width, $height, $slot)
|
protected function showAdsenseCode($action, $width, $height, $slot)
|
||||||
{
|
{
|
||||||
$code = 'google_ad_client = "'.$this->client.'"; ';
|
$code = 'google_ad_client = "'.$this->client.'"; ';
|
||||||
@ -198,11 +191,11 @@ class AdsensePlugin extends UAPPlugin
|
|||||||
function onEndAdminPanelNav($menu) {
|
function onEndAdminPanelNav($menu) {
|
||||||
if (AdminPanelAction::canAdmin('adsense')) {
|
if (AdminPanelAction::canAdmin('adsense')) {
|
||||||
// TRANS: Menu item title/tooltip
|
// TRANS: Menu item title/tooltip
|
||||||
$menu_title = _('Adsense configuration');
|
$menu_title = _m('AdSense configuration');
|
||||||
// TRANS: Menu item for site administration
|
// TRANS: Menu item for site administration
|
||||||
$menu->out->menuItem(common_local_url('adsenseadminpanel'), _('Adsense'),
|
$menu->out->menuItem(common_local_url('adsenseadminpanel'), _m('AdSense'),
|
||||||
$menu_title, $action_name == 'adsenseadminpanel', 'nav_adsense_admin_panel');
|
$menu_title, $action_name == 'adsenseadminpanel', 'nav_adsense_admin_panel');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AdsenseadminpanelAction extends AdminPanelAction
|
class AdsenseadminpanelAction extends AdminPanelAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -48,10 +47,9 @@ class AdsenseadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('Adsense');
|
return _m('TITLE', 'AdSense');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,10 +57,9 @@ class AdsenseadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return string instructions
|
* @return string instructions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
return _('Adsense settings for this StatusNet site');
|
return _m('AdSense settings for this StatusNet site');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,7 +67,6 @@ class AdsenseadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showForm()
|
function showForm()
|
||||||
{
|
{
|
||||||
$form = new AdsenseAdminPanelForm($this);
|
$form = new AdsenseAdminPanelForm($this);
|
||||||
@ -83,7 +79,6 @@ class AdsenseadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
static $settings = array('adsense' => array('adScript', 'client', 'mediumRectangle', 'rectangle', 'leaderboard', 'wideSkyscraper'));
|
static $settings = array('adsense' => array('adScript', 'client', 'mediumRectangle', 'rectangle', 'leaderboard', 'wideSkyscraper'));
|
||||||
@ -97,11 +92,9 @@ class AdsenseadminpanelAction extends AdminPanelAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This throws an exception on validation errors
|
// This throws an exception on validation errors
|
||||||
|
|
||||||
$this->validate($values);
|
$this->validate($values);
|
||||||
|
|
||||||
// assert(all values are valid);
|
// assert(all values are valid);
|
||||||
|
|
||||||
$config = new Config();
|
$config = new Config();
|
||||||
|
|
||||||
$config->query('BEGIN');
|
$config->query('BEGIN');
|
||||||
@ -125,7 +118,6 @@ class AdsenseadminpanelAction extends AdminPanelAction
|
|||||||
/**
|
/**
|
||||||
* Form for the adsense admin panel
|
* Form for the adsense admin panel
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AdsenseAdminPanelForm extends AdminForm
|
class AdsenseAdminPanelForm extends AdminForm
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -133,7 +125,6 @@ class AdsenseAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return int ID of the form
|
* @return int ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'form_adsense_admin_panel';
|
return 'form_adsense_admin_panel';
|
||||||
@ -144,7 +135,6 @@ class AdsenseAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return string class of the form
|
* @return string class of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_adsense';
|
return 'form_adsense';
|
||||||
@ -155,7 +145,6 @@ class AdsenseAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return string URL of the action
|
* @return string URL of the action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('adsenseadminpanel');
|
return common_local_url('adsenseadminpanel');
|
||||||
@ -166,45 +155,44 @@ class AdsenseAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->elementStart('fieldset', array('id' => 'adsense_admin'));
|
$this->out->elementStart('fieldset', array('id' => 'adsense_admin'));
|
||||||
$this->out->elementStart('ul', 'form_data');
|
$this->out->elementStart('ul', 'form_data');
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->input('client',
|
$this->input('client',
|
||||||
_('Client ID'),
|
_m('Client ID'),
|
||||||
_('Google client ID'),
|
_m('Google client ID'),
|
||||||
'adsense');
|
'adsense');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->input('adScript',
|
$this->input('adScript',
|
||||||
_('Ad Script URL'),
|
_m('Ad script URL'),
|
||||||
_('Script URL (advanced)'),
|
_m('Script URL (advanced)'),
|
||||||
'adsense');
|
'adsense');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->input('mediumRectangle',
|
$this->input('mediumRectangle',
|
||||||
_('Medium rectangle'),
|
_m('Medium rectangle'),
|
||||||
_('Medium rectangle slot code'),
|
_m('Medium rectangle slot code'),
|
||||||
'adsense');
|
'adsense');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->input('rectangle',
|
$this->input('rectangle',
|
||||||
_('Rectangle'),
|
_m('Rectangle'),
|
||||||
_('Rectangle slot code'),
|
_m('Rectangle slot code'),
|
||||||
'adsense');
|
'adsense');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->input('leaderboard',
|
$this->input('leaderboard',
|
||||||
_('Leaderboard'),
|
_m('Leaderboard'),
|
||||||
_('Leaderboard slot code'),
|
_m('Leaderboard slot code'),
|
||||||
'adsense');
|
'adsense');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->input('wideSkyscraper',
|
$this->input('wideSkyscraper',
|
||||||
_('Skyscraper'),
|
_m('Skyscraper'),
|
||||||
_('Wide skyscraper slot code'),
|
_m('Wide skyscraper slot code'),
|
||||||
'adsense');
|
'adsense');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
@ -215,9 +203,8 @@ class AdsenseAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Save'), 'submit', null, _('Save AdSense settings'));
|
$this->out->submit('submit', _m('Save'), 'submit', null, _m('Save AdSense settings'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,4 @@ class AutocompletePlugin extends Plugin
|
|||||||
_m('The autocomplete plugin allows users to autocomplete screen names in @ replies. When an "@" is typed into the notice text area, an autocomplete box is displayed populated with the user\'s friend\' screen names.'));
|
_m('The autocomplete plugin allows users to autocomplete screen names in @ replies. When an "@" is typed into the notice text area, an autocomplete box is displayed populated with the user\'s friend\' screen names.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
@ -43,7 +43,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AutocompleteAction extends Action
|
class AutocompleteAction extends Action
|
||||||
{
|
{
|
||||||
private $result;
|
private $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user