Replace t() and mt() with translate() in the monitoring module's forms

refs #7551
This commit is contained in:
Johannes Meyer 2015-01-19 13:47:01 +01:00
parent 23bbf63b73
commit 7082ebaf7b
25 changed files with 183 additions and 204 deletions

View File

@ -21,7 +21,7 @@ class DisableNotificationsExpireCommandForm extends CommandForm
*/ */
public function init() public function init()
{ {
$this->setSubmitLabel(mt('monitoring', 'Disable Notifications')); $this->setSubmitLabel($this->translate('Disable Notifications'));
} }
/** /**
@ -30,8 +30,7 @@ class DisableNotificationsExpireCommandForm extends CommandForm
*/ */
public function getHelp() public function getHelp()
{ {
return mt( return $this->translate(
'monitoring',
'This command is used to disable host and service notifications for a specific time.' 'This command is used to disable host and service notifications for a specific time.'
); );
} }
@ -49,8 +48,8 @@ class DisableNotificationsExpireCommandForm extends CommandForm
'expire_time', 'expire_time',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Expire Time'), 'label' => $this->translate('Expire Time'),
'description' => mt('monitoring', 'Set the expire time.'), 'description' => $this->translate('Set the expire time.'),
'value' => $expireTime 'value' => $expireTime
) )
); );
@ -67,7 +66,7 @@ class DisableNotificationsExpireCommandForm extends CommandForm
$disableNotifications $disableNotifications
->setExpireTime($this->getElement('expire_time')->getValue()->getTimestamp()); ->setExpireTime($this->getElement('expire_time')->getValue()->getTimestamp());
$this->getTransport($this->request)->send($disableNotifications); $this->getTransport($this->request)->send($disableNotifications);
Notification::success(mt('monitoring', 'Disabling host and service notifications..')); Notification::success($this->translate('Disabling host and service notifications..'));
return true; return true;
} }
} }

View File

@ -61,13 +61,13 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
if ((bool) $this->status->notifications_enabled) { if ((bool) $this->status->notifications_enabled) {
$notificationDescription = sprintf( $notificationDescription = sprintf(
'<a title="%s" href="%s" data-base-target="_next">%s</a>', '<a title="%s" href="%s" data-base-target="_next">%s</a>',
mt('monitoring', 'Disable notifications for a specific time on a program-wide basis'), $this->translate('Disable notifications for a specific time on a program-wide basis'),
$this->getView()->href('monitoring/process/disable-notifications'), $this->getView()->href('monitoring/process/disable-notifications'),
mt('monitoring', 'Disable temporarily') $this->translate('Disable temporarily')
); );
} elseif ($this->status->disable_notif_expire_time) { } elseif ($this->status->disable_notif_expire_time) {
$notificationDescription = sprintf( $notificationDescription = sprintf(
mt('monitoring', 'Notifications will be re-enabled in <strong>%s</strong>'), $this->translate('Notifications will be re-enabled in <strong>%s</strong>'),
$this->getView()->timeUntil($this->status->disable_notif_expire_time) $this->getView()->timeUntil($this->status->disable_notif_expire_time)
); );
} else { } else {
@ -78,7 +78,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_ACTIVE_HOST_CHECKS, ToggleInstanceFeatureCommand::FEATURE_ACTIVE_HOST_CHECKS,
array( array(
'label' => mt('monitoring', 'Active Host Checks Being Executed'), 'label' => $this->translate('Active Host Checks Being Executed'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -86,7 +86,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_ACTIVE_SERVICE_CHECKS, ToggleInstanceFeatureCommand::FEATURE_ACTIVE_SERVICE_CHECKS,
array( array(
'label' => mt('monitoring', 'Active Service Checks Being Executed'), 'label' => $this->translate('Active Service Checks Being Executed'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -94,7 +94,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_EVENT_HANDLERS, ToggleInstanceFeatureCommand::FEATURE_EVENT_HANDLERS,
array( array(
'label' => mt('monitoring', 'Event Handlers Enabled'), 'label' => $this->translate('Event Handlers Enabled'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -102,7 +102,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_FLAP_DETECTION, ToggleInstanceFeatureCommand::FEATURE_FLAP_DETECTION,
array( array(
'label' => mt('monitoring', 'Flap Detection Enabled'), 'label' => $this->translate('Flap Detection Enabled'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -110,7 +110,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_NOTIFICATIONS, ToggleInstanceFeatureCommand::FEATURE_NOTIFICATIONS,
array( array(
'label' => mt('monitoring', 'Notifications Enabled'), 'label' => $this->translate('Notifications Enabled'),
'autosubmit' => true, 'autosubmit' => true,
'description' => $notificationDescription, 'description' => $notificationDescription,
'decorators' => array( 'decorators' => array(
@ -129,7 +129,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_HOST_OBSESSING, ToggleInstanceFeatureCommand::FEATURE_HOST_OBSESSING,
array( array(
'label' => mt('monitoring', 'Obsessing Over Hosts'), 'label' => $this->translate('Obsessing Over Hosts'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -137,7 +137,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_SERVICE_OBSESSING, ToggleInstanceFeatureCommand::FEATURE_SERVICE_OBSESSING,
array( array(
'label' => mt('monitoring', 'Obsessing Over Services'), 'label' => $this->translate('Obsessing Over Services'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -145,7 +145,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_PASSIVE_HOST_CHECKS, ToggleInstanceFeatureCommand::FEATURE_PASSIVE_HOST_CHECKS,
array( array(
'label' => mt('monitoring', 'Passive Host Checks Being Accepted'), 'label' => $this->translate('Passive Host Checks Being Accepted'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -153,7 +153,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_PASSIVE_SERVICE_CHECKS, ToggleInstanceFeatureCommand::FEATURE_PASSIVE_SERVICE_CHECKS,
array( array(
'label' => mt('monitoring', 'Passive Service Checks Being Accepted'), 'label' => $this->translate('Passive Service Checks Being Accepted'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -161,7 +161,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox', 'checkbox',
ToggleInstanceFeatureCommand::FEATURE_PERFORMANCE_DATA, ToggleInstanceFeatureCommand::FEATURE_PERFORMANCE_DATA,
array( array(
'label' => mt('monitoring', 'Performance Data Being Processed'), 'label' => $this->translate('Performance Data Being Processed'),
'autosubmit' => true 'autosubmit' => true
) )
) )
@ -198,7 +198,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
->setEnabled($enabled); ->setEnabled($enabled);
$this->getTransport($this->request)->send($toggleFeature); $this->getTransport($this->request)->send($toggleFeature);
} }
Notification::success(mt('monitoring', 'Toggling feature..')); Notification::success($this->translate('Toggling feature..'));
return true; return true;
} }
} }

View File

@ -31,8 +31,7 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
*/ */
public function getHelp() public function getHelp()
{ {
return mt( return $this->translate(
'monitoring',
'This command is used to acknowledge host or service problems. When a problem is acknowledged,' 'This command is used to acknowledge host or service problems. When a problem is acknowledged,'
. ' future notifications about problems are temporarily disabled until the host or service' . ' future notifications about problems are temporarily disabled until the host or service'
. ' recovers.' . ' recovers.'
@ -51,9 +50,8 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'comment', 'comment',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Comment'), 'label' => $this->translate('Comment'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you work with other administrators, you may find it useful to share information about the' 'If you work with other administrators, you may find it useful to share information about the'
. ' the host or service that is having problems. Make sure you enter a brief description of' . ' the host or service that is having problems. Make sure you enter a brief description of'
. ' what you are doing.' . ' what you are doing.'
@ -64,9 +62,8 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
'persistent', 'persistent',
array( array(
'label' => mt('monitoring', 'Persistent Comment'), 'label' => $this->translate('Persistent Comment'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you would like the comment to remain even when the acknowledgement is removed, check this' 'If you would like the comment to remain even when the acknowledgement is removed, check this'
. ' option.' . ' option.'
) )
@ -76,8 +73,10 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
'expire', 'expire',
array( array(
'label' => mt('monitoring', 'Use Expire Time'), 'label' => $this->translate('Use Expire Time'),
'description' => mt('monitoring', 'If the acknowledgement should expire, check this option.'), 'description' => $this->translate(
'If the acknowledgement should expire, check this option.'
),
'autosubmit' => true 'autosubmit' => true
) )
) )
@ -89,10 +88,9 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'dateTimePicker', 'dateTimePicker',
'expire_time', 'expire_time',
array( array(
'label' => mt('monitoring', 'Expire Time'), 'label' => $this->translate('Expire Time'),
'value' => $expireTime, 'value' => $expireTime,
'description' => mt( 'description' => $this->translate(
'monitoring',
'Enter the expire date and time for this acknowledgement here. Icinga will delete the' 'Enter the expire date and time for this acknowledgement here. Icinga will delete the'
. ' acknowledgement after this time expired.' . ' acknowledgement after this time expired.'
) )
@ -114,10 +112,9 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
'sticky', 'sticky',
array( array(
'label' => mt('monitoring', 'Sticky Acknowledgement'), 'label' => $this->translate('Sticky Acknowledgement'),
'value' => true, 'value' => true,
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you want the acknowledgement to disable notifications until the host or service recovers,' 'If you want the acknowledgement to disable notifications until the host or service recovers,'
. ' check this option.' . ' check this option.'
) )
@ -127,10 +124,9 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
'notify', 'notify',
array( array(
'label' => mt('monitoring', 'Send Notification'), 'label' => $this->translate('Send Notification'),
'value' => true, 'value' => true,
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you do not want an acknowledgement notification to be sent out to the appropriate contacts,' 'If you do not want an acknowledgement notification to be sent out to the appropriate contacts,'
. ' uncheck this option.' . ' uncheck this option.'
) )

View File

@ -29,8 +29,7 @@ class AddCommentCommandForm extends ObjectsCommandForm
*/ */
public function getHelp() public function getHelp()
{ {
return mt( return $this->translate(
'monitoring',
'This command is used to add host or service comments.' 'This command is used to add host or service comments.'
); );
} }
@ -47,9 +46,8 @@ class AddCommentCommandForm extends ObjectsCommandForm
'comment', 'comment',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Comment'), 'label' => $this->translate('Comment'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you work with other administrators, you may find it useful to share information about the' 'If you work with other administrators, you may find it useful to share information about the'
. ' the host or service that is having problems. Make sure you enter a brief description of' . ' the host or service that is having problems. Make sure you enter a brief description of'
. ' what you are doing.' . ' what you are doing.'
@ -60,10 +58,9 @@ class AddCommentCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
'persistent', 'persistent',
array( array(
'label' => mt('monitoring', 'Persistent'), 'label' => $this->translate('Persistent'),
'value' => true, 'value' => true,
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you uncheck this option, the comment will automatically be deleted the next time Icinga is' 'If you uncheck this option, the comment will automatically be deleted the next time Icinga is'
. ' restarted.' . ' restarted.'
) )

View File

@ -35,8 +35,8 @@ class CheckNowCommandForm extends ObjectsCommandForm
array( array(
'ignore' => true, 'ignore' => true,
'type' => 'submit', 'type' => 'submit',
'value' => mt('monitoring', 'Check now'), 'value' => $this->translate('Check now'),
'label' => '<i class="icon-reschedule"></i> ' . mt('monitoring', 'Check now'), 'label' => '<i class="icon-reschedule"></i> ' . $this->translate('Check now'),
'decorators' => array('ViewHelper'), 'decorators' => array('ViewHelper'),
'escape' => false, 'escape' => false,
'class' => 'link-like' 'class' => 'link-like'

View File

@ -55,7 +55,7 @@ class DeleteCommentCommandForm extends ObjectsCommandForm
array( array(
'ignore' => true, 'ignore' => true,
'label' => 'X', 'label' => 'X',
'title' => mt('monitoring', 'Delete comment'), 'title' => $this->translate('Delete comment'),
'decorators' => array('ViewHelper') 'decorators' => array('ViewHelper')
) )
); );
@ -80,7 +80,7 @@ class DeleteCommentCommandForm extends ObjectsCommandForm
if (! empty($redirect)) { if (! empty($redirect)) {
$this->setRedirectUrl($redirect); $this->setRedirectUrl($redirect);
} }
Notification::success(mt('monitoring', 'Deleting comment..')); Notification::success($this->translate('Deleting comment..'));
return true; return true;
} }
} }

View File

@ -55,7 +55,7 @@ class DeleteDowntimeCommandForm extends ObjectsCommandForm
array( array(
'ignore' => true, 'ignore' => true,
'label' => 'X', 'label' => 'X',
'title' => mt('monitoring', 'Delete downtime'), 'title' => $this->translate('Delete downtime'),
'decorators' => array('ViewHelper') 'decorators' => array('ViewHelper')
) )
); );
@ -80,7 +80,7 @@ class DeleteDowntimeCommandForm extends ObjectsCommandForm
if (! empty($redirect)) { if (! empty($redirect)) {
$this->setRedirectUrl($redirect); $this->setRedirectUrl($redirect);
} }
Notification::success(mt('monitoring', 'Deleting downtime..')); Notification::success($this->translate('Deleting downtime..'));
return true; return true;
} }
} }

View File

@ -29,8 +29,7 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
*/ */
public function getHelp() public function getHelp()
{ {
return mt( return $this->translate(
'monitoring',
'This command is used to submit passive host or service check results.' 'This command is used to submit passive host or service check results.'
); );
} }
@ -53,17 +52,17 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
'status', 'status',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Status'), 'label' => $this->translate('Status'),
'description' => mt('monitoring', 'The state this check result should report'), 'description' => $this->translate('The state this check result should report'),
'multiOptions' => $object->getType() === $object::TYPE_HOST ? array( 'multiOptions' => $object->getType() === $object::TYPE_HOST ? array(
ProcessCheckResultCommand::HOST_UP => mt('monitoring', 'UP', 'icinga.state'), ProcessCheckResultCommand::HOST_UP => $this->translate('UP', 'icinga.state'),
ProcessCheckResultCommand::HOST_DOWN => mt('monitoring', 'DOWN', 'icinga.state'), ProcessCheckResultCommand::HOST_DOWN => $this->translate('DOWN', 'icinga.state'),
ProcessCheckResultCommand::HOST_UNREACHABLE => mt('monitoring', 'UNREACHABLE', 'icinga.state') ProcessCheckResultCommand::HOST_UNREACHABLE => $this->translate('UNREACHABLE', 'icinga.state')
) : array( ) : array(
ProcessCheckResultCommand::SERVICE_OK => mt('monitoring', 'OK', 'icinga.state'), ProcessCheckResultCommand::SERVICE_OK => $this->translate('OK', 'icinga.state'),
ProcessCheckResultCommand::SERVICE_WARNING => mt('monitoring', 'WARNING', 'icinga.state'), ProcessCheckResultCommand::SERVICE_WARNING => $this->translate('WARNING', 'icinga.state'),
ProcessCheckResultCommand::SERVICE_CRITICAL => mt('monitoring', 'CRITICAL', 'icinga.state'), ProcessCheckResultCommand::SERVICE_CRITICAL => $this->translate('CRITICAL', 'icinga.state'),
ProcessCheckResultCommand::SERVICE_UNKNOWN => mt('monitoring', 'UNKNOWN', 'icinga.state') ProcessCheckResultCommand::SERVICE_UNKNOWN => $this->translate('UNKNOWN', 'icinga.state')
) )
) )
); );
@ -72,8 +71,8 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
'output', 'output',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Output'), 'label' => $this->translate('Output'),
'description' => mt('monitoring', 'The plugin output of this check result') 'description' => $this->translate('The plugin output of this check result')
) )
); );
$this->addElement( $this->addElement(
@ -81,9 +80,8 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
'perfdata', 'perfdata',
array( array(
'allowEmpty' => true, 'allowEmpty' => true,
'label' => mt('monitoring', 'Performance Data'), 'label' => $this->translate('Performance Data'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'The performance data of this check result. Leave empty' 'The performance data of this check result. Leave empty'
. ' if this check result has no performance data' . ' if this check result has no performance data'
) )

View File

@ -24,9 +24,8 @@ class ScheduleHostCheckCommandForm extends ScheduleServiceCheckCommandForm
'checkbox', 'checkbox',
'all_services', 'all_services',
array( array(
'label' => mt('monitoring', 'All Services'), 'label' => $this->translate('All Services'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'Schedule check for all services on the hosts and the hosts themselves.' 'Schedule check for all services on the hosts and the hosts themselves.'
) )
) )

View File

@ -27,9 +27,8 @@ class ScheduleHostDowntimeCommandForm extends ScheduleServiceDowntimeCommandForm
'checkbox', 'checkbox',
'all_services', 'all_services',
array( array(
'label' => mt('monitoring', 'All Services'), 'label' => $this->translate('All Services'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'Schedule downtime for all services on the hosts and the hosts themselves.' 'Schedule downtime for all services on the hosts and the hosts themselves.'
) )
) )
@ -38,15 +37,14 @@ class ScheduleHostDowntimeCommandForm extends ScheduleServiceDowntimeCommandForm
'select', 'select',
'child_hosts', 'child_hosts',
array( array(
'label' => mt('monitoring', 'Child Hosts'), 'label' => $this->translate('Child Hosts'),
'required' => true, 'required' => true,
'multiOptions' => array( 'multiOptions' => array(
0 => mt('monitoring', 'Do nothing with child hosts'), 0 => $this->translate('Do nothing with child hosts'),
1 => mt('monitoring', 'Schedule triggered downtime for all child hosts'), 1 => $this->translate('Schedule triggered downtime for all child hosts'),
2 => mt('monitoring', 'Schedule non-triggered downtime for all child hosts') 2 => $this->translate('Schedule non-triggered downtime for all child hosts')
), ),
'description' => mt( 'description' => $this->translate(
'monitoring',
'Define what should be done with the child hosts of the hosts.' 'Define what should be done with the child hosts of the hosts.'
) )
) )

View File

@ -32,8 +32,7 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
*/ */
public function getHelp() public function getHelp()
{ {
return mt( return $this->translate(
'monitoring',
'This command is used to schedule the next check of hosts or services. Icinga will re-queue the' 'This command is used to schedule the next check of hosts or services. Icinga will re-queue the'
. ' hosts or services to be checked at the time you specify.' . ' hosts or services to be checked at the time you specify.'
); );
@ -52,8 +51,7 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
'note', 'note',
'command-info', 'command-info',
array( array(
'value' => mt( 'value' => $this->translate(
'monitoring',
'This command is used to schedule the next check of hosts or services. Icinga will re-queue the' 'This command is used to schedule the next check of hosts or services. Icinga will re-queue the'
. ' hosts or services to be checked at the time you specify.' . ' hosts or services to be checked at the time you specify.'
) )
@ -64,8 +62,10 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
'check_time', 'check_time',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Check Time'), 'label' => $this->translate('Check Time'),
'description' => mt('monitoring', 'Set the date and time when the check should be scheduled.'), 'description' => $this->translate(
'Set the date and time when the check should be scheduled.'
),
'value' => $checkTime 'value' => $checkTime
) )
), ),
@ -73,9 +73,8 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
'force_check', 'force_check',
array( array(
'label' => mt('monitoring', 'Force Check'), 'label' => $this->translate('Force Check'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you select this option, Icinga will force a check regardless of both what time the' 'If you select this option, Icinga will force a check regardless of both what time the'
. ' scheduled check occurs and whether or not checks are enabled.' . ' scheduled check occurs and whether or not checks are enabled.'
) )

View File

@ -42,8 +42,7 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
*/ */
public function getHelp() public function getHelp()
{ {
return mt( return $this->translate(
'monitoring',
'This command is used to schedule host and service downtimes. During the specified downtime,' 'This command is used to schedule host and service downtimes. During the specified downtime,'
. ' Icinga will not send notifications out about the hosts and services. When the scheduled' . ' Icinga will not send notifications out about the hosts and services. When the scheduled'
. ' downtime expires, Icinga will send out notifications for the hosts and services as it' . ' downtime expires, Icinga will send out notifications for the hosts and services as it'
@ -67,9 +66,8 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'comment', 'comment',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Comment'), 'label' => $this->translate('Comment'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you work with other administrators, you may find it useful to share information about the' 'If you work with other administrators, you may find it useful to share information about the'
. ' the host or service that is having problems. Make sure you enter a brief description of' . ' the host or service that is having problems. Make sure you enter a brief description of'
. ' what you are doing.' . ' what you are doing.'
@ -81,8 +79,8 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'start', 'start',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Start Time'), 'label' => $this->translate('Start Time'),
'description' => mt('monitoring', 'Set the start date and time for the downtime.'), 'description' => $this->translate('Set the start date and time for the downtime.'),
'value' => $start 'value' => $start
) )
), ),
@ -91,8 +89,8 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'end', 'end',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'End Time'), 'label' => $this->translate('End Time'),
'description' => mt('monitoring', 'Set the end date and time for the downtime.'), 'description' => $this->translate('Set the end date and time for the downtime.'),
'value' => $end 'value' => $end
) )
), ),
@ -102,17 +100,16 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
array( array(
'required' => true, 'required' => true,
'autosubmit' => true, 'autosubmit' => true,
'label' => mt('monitoring', 'Type'), 'label' => $this->translate('Type'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'If you select the fixed option, the downtime will be in effect between the start and end' 'If you select the fixed option, the downtime will be in effect between the start and end'
. ' times you specify whereas a flexible downtime starts when the host or service enters a' . ' times you specify whereas a flexible downtime starts when the host or service enters a'
. ' problem state sometime between the start and end times you specified and lasts as long' . ' problem state sometime between the start and end times you specified and lasts as long'
. ' as the duration time you enter. The duration fields do not apply for fixed downtimes.' . ' as the duration time you enter. The duration fields do not apply for fixed downtimes.'
), ),
'multiOptions' => array( 'multiOptions' => array(
self::FIXED => mt('monitoring', 'Fixed'), self::FIXED => $this->translate('Fixed'),
self::FLEXIBLE => mt('monitoring', 'Flexible') self::FLEXIBLE => $this->translate('Flexible')
), ),
'validators' => array( 'validators' => array(
array( array(
@ -141,7 +138,7 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'hours', 'hours',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Hours'), 'label' => $this->translate('Hours'),
'value' => 2, 'value' => 2,
'min' => -1 'min' => -1
) )
@ -151,7 +148,7 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'minutes', 'minutes',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Minutes'), 'label' => $this->translate('Minutes'),
'value' => 0, 'value' => 0,
'min' => -1 'min' => -1
) )
@ -161,9 +158,8 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
array('hours', 'minutes'), array('hours', 'minutes'),
'duration', 'duration',
array( array(
'legend' => mt('monitoring', 'Flexible Duration'), 'legend' => $this->translate('Flexible Duration'),
'description' => mt( 'description' => $this->translate(
'monitoring',
'Enter here the duration of the downtime. The downtime will be automatically deleted after this' 'Enter here the duration of the downtime. The downtime will be automatically deleted after this'
. ' time expired.' . ' time expired.'
), ),

View File

@ -33,7 +33,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
ToggleObjectFeatureCommand::FEATURE_ACTIVE_CHECKS, ToggleObjectFeatureCommand::FEATURE_ACTIVE_CHECKS,
array( array(
'label' => mt('monitoring', 'Active Checks'), 'label' => $this->translate('Active Checks'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -41,7 +41,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
ToggleObjectFeatureCommand::FEATURE_PASSIVE_CHECKS, ToggleObjectFeatureCommand::FEATURE_PASSIVE_CHECKS,
array( array(
'label' => mt('monitoring', 'Passive Checks'), 'label' => $this->translate('Passive Checks'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -49,7 +49,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
ToggleObjectFeatureCommand::FEATURE_OBSESSING, ToggleObjectFeatureCommand::FEATURE_OBSESSING,
array( array(
'label' => mt('monitoring', 'Obsessing'), 'label' => $this->translate('Obsessing'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -57,7 +57,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
ToggleObjectFeatureCommand::FEATURE_NOTIFICATIONS, ToggleObjectFeatureCommand::FEATURE_NOTIFICATIONS,
array( array(
'label' => mt('monitoring', 'Notifications'), 'label' => $this->translate('Notifications'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -65,7 +65,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
ToggleObjectFeatureCommand::FEATURE_EVENT_HANDLER, ToggleObjectFeatureCommand::FEATURE_EVENT_HANDLER,
array( array(
'label' => mt('monitoring', 'Event Handler'), 'label' => $this->translate('Event Handler'),
'autosubmit' => true 'autosubmit' => true
) )
), ),
@ -73,7 +73,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox', 'checkbox',
ToggleObjectFeatureCommand::FEATURE_FLAP_DETECTION, ToggleObjectFeatureCommand::FEATURE_FLAP_DETECTION,
array( array(
'label' => mt('monitoring', 'Flap Detection'), 'label' => $this->translate('Flap Detection'),
'autosubmit' => true 'autosubmit' => true
) )
) )
@ -95,7 +95,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
$element = $this->getElement($feature); $element = $this->getElement($feature);
$element->setChecked($object->{$feature}); $element->setChecked($object->{$feature});
if ((bool) $object->{$feature . '_changed'} === true) { if ((bool) $object->{$feature . '_changed'} === true) {
$element->setDescription(mt('monitoring', 'changed')); $element->setDescription($this->translate('changed'));
} }
} }
return $this; return $this;
@ -120,7 +120,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
} }
} }
} }
Notification::success(mt('monitoring', 'Toggling feature..')); Notification::success($this->translate('Toggling feature..'));
return true; return true;
} }
} }

View File

@ -28,9 +28,9 @@ class LocalInstanceForm extends Form
'path', 'path',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Command File'), 'label' => $this->translate('Command File'),
'value' => '/var/run/icinga2/cmd/icinga2.cmd', 'value' => '/var/run/icinga2/cmd/icinga2.cmd',
'description' => mt('monitoring', 'Path to the local Icinga command file') 'description' => $this->translate('Path to the local Icinga command file')
) )
); );
return $this; return $this;

View File

@ -29,8 +29,8 @@ class RemoteInstanceForm extends Form
'host', 'host',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Host'), 'label' => $this->translate('Host'),
'description' => mt('monitoring', 'description' => $this->translate(
'Hostname or address of the remote Icinga instance' 'Hostname or address of the remote Icinga instance'
) )
) )
@ -40,8 +40,8 @@ class RemoteInstanceForm extends Form
'port', 'port',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Port'), 'label' => $this->translate('Port'),
'description' => mt('monitoring', 'SSH port to connect to on the remote Icinga instance'), 'description' => $this->translate('SSH port to connect to on the remote Icinga instance'),
'value' => 22 'value' => 22
) )
), ),
@ -50,8 +50,8 @@ class RemoteInstanceForm extends Form
'user', 'user',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'User'), 'label' => $this->translate('User'),
'description' => mt('monitoring', 'description' => $this->translate(
'User to log in as on the remote Icinga instance. Please note that key-based SSH login must be' 'User to log in as on the remote Icinga instance. Please note that key-based SSH login must be'
. ' possible for this user' . ' possible for this user'
) )
@ -62,9 +62,9 @@ class RemoteInstanceForm extends Form
'path', 'path',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Command File'), 'label' => $this->translate('Command File'),
'value' => '/var/run/icinga2/cmd/icinga2.cmd', 'value' => '/var/run/icinga2/cmd/icinga2.cmd',
'description' => mt('monitoring', 'Path to the Icinga command file on the remote Icinga instance') 'description' => $this->translate('Path to the Icinga command file on the remote Icinga instance')
) )
) )
)); ));

View File

@ -25,7 +25,7 @@ class InstanceConfigForm extends ConfigForm
public function init() public function init()
{ {
$this->setName('form_config_monitoring_instance'); $this->setName('form_config_monitoring_instance');
$this->setSubmitLabel(mt('monitoring', 'Save Changes')); $this->setSubmitLabel($this->translate('Save Changes'));
} }
/** /**
@ -48,7 +48,7 @@ class InstanceConfigForm extends ConfigForm
break; break;
default: default:
throw new InvalidArgumentException( throw new InvalidArgumentException(
sprintf(mt('monitoring', 'Invalid instance type "%s" given'), $type) sprintf($this->translate('Invalid instance type "%s" given'), $type)
); );
} }
return $form; return $form;
@ -69,10 +69,10 @@ class InstanceConfigForm extends ConfigForm
{ {
$name = isset($values['name']) ? $values['name'] : ''; $name = isset($values['name']) ? $values['name'] : '';
if (! $name) { if (! $name) {
throw new InvalidArgumentException(mt('monitoring', 'Instance name missing')); throw new InvalidArgumentException($this->translate('Instance name missing'));
} }
if ($this->config->hasSection($name)) { if ($this->config->hasSection($name)) {
throw new InvalidArgumentException(mt('monitoring', 'Instance already exists')); throw new InvalidArgumentException($this->translate('Instance already exists'));
} }
unset($values['name']); unset($values['name']);
@ -93,11 +93,11 @@ class InstanceConfigForm extends ConfigForm
public function edit($name, array $values) public function edit($name, array $values)
{ {
if (! $name) { if (! $name) {
throw new InvalidArgumentException(mt('monitoring', 'Old instance name missing')); throw new InvalidArgumentException($this->translate('Old instance name missing'));
} elseif (! ($newName = isset($values['name']) ? $values['name'] : '')) { } elseif (! ($newName = isset($values['name']) ? $values['name'] : '')) {
throw new InvalidArgumentException(mt('monitoring', 'New instance name missing')); throw new InvalidArgumentException($this->translate('New instance name missing'));
} elseif (! $this->config->hasSection($name)) { } elseif (! $this->config->hasSection($name)) {
throw new InvalidArgumentException(mt('monitoring', 'Unknown instance name provided')); throw new InvalidArgumentException($this->translate('Unknown instance name provided'));
} }
unset($values['name']); unset($values['name']);
@ -117,9 +117,9 @@ class InstanceConfigForm extends ConfigForm
public function remove($name) public function remove($name)
{ {
if (! $name) { if (! $name) {
throw new InvalidArgumentException(mt('monitoring', 'Instance name missing')); throw new InvalidArgumentException($this->translate('Instance name missing'));
} elseif (! $this->config->hasSection($name)) { } elseif (! $this->config->hasSection($name)) {
throw new InvalidArgumentException(mt('monitoring', 'Unknown instance name provided')); throw new InvalidArgumentException($this->translate('Unknown instance name provided'));
} }
$instanceConfig = $this->config->getSection($name); $instanceConfig = $this->config->getSection($name);
@ -136,10 +136,10 @@ class InstanceConfigForm extends ConfigForm
$instanceName = $this->request->getQuery('instance'); $instanceName = $this->request->getQuery('instance');
if ($instanceName !== null) { if ($instanceName !== null) {
if (! $instanceName) { if (! $instanceName) {
throw new ConfigurationError(mt('monitoring', 'Instance name missing')); throw new ConfigurationError($this->translate('Instance name missing'));
} }
if (! $this->config->hasSection($instanceName)) { if (! $this->config->hasSection($instanceName)) {
throw new ConfigurationError(mt('monitoring', 'Unknown instance name given')); throw new ConfigurationError($this->translate('Unknown instance name given'));
} }
$instanceConfig = $this->config->getSection($instanceName)->toArray(); $instanceConfig = $this->config->getSection($instanceName)->toArray();
@ -158,10 +158,10 @@ class InstanceConfigForm extends ConfigForm
try { try {
if ($instanceName === null) { // create new instance if ($instanceName === null) { // create new instance
$this->add($this->getValues()); $this->add($this->getValues());
$message = mt('monitoring', 'Instance "%s" created successfully.'); $message = $this->translate('Instance "%s" created successfully.');
} else { // edit existing instance } else { // edit existing instance
$this->edit($instanceName, $this->getValues()); $this->edit($instanceName, $this->getValues());
$message = mt('monitoring', 'Instance "%s" edited successfully.'); $message = $this->translate('Instance "%s" edited successfully.');
} }
} catch (InvalidArgumentException $e) { } catch (InvalidArgumentException $e) {
Notification::error($e->getMessage()); Notification::error($e->getMessage());
@ -189,7 +189,7 @@ class InstanceConfigForm extends ConfigForm
'name', 'name',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Instance Name') 'label' => $this->translate('Instance Name')
) )
), ),
array( array(
@ -198,10 +198,10 @@ class InstanceConfigForm extends ConfigForm
array( array(
'required' => true, 'required' => true,
'autosubmit' => true, 'autosubmit' => true,
'label' => mt('monitoring', 'Instance Type'), 'label' => $this->translate('Instance Type'),
'multiOptions' => array( 'multiOptions' => array(
LocalCommandFile::TRANSPORT => mt('monitoring', 'Local Command File'), LocalCommandFile::TRANSPORT => $this->translate('Local Command File'),
RemoteCommandFile::TRANSPORT => mt('monitoring', 'Remote Command File') RemoteCommandFile::TRANSPORT => $this->translate('Remote Command File')
), ),
'value' => $instanceType 'value' => $instanceType
) )

View File

@ -18,7 +18,7 @@ class SecurityConfigForm extends ConfigForm
public function init() public function init()
{ {
$this->setName('form_config_monitoring_security'); $this->setName('form_config_monitoring_security');
$this->setSubmitLabel(mt('monitoring', 'Save Changes')); $this->setSubmitLabel($this->translate('Save Changes'));
} }
/** /**
@ -29,7 +29,7 @@ class SecurityConfigForm extends ConfigForm
$this->config->setSection('security', $this->getValues()); $this->config->setSection('security', $this->getValues());
if ($this->save()) { if ($this->save()) {
Notification::success(mt('monitoring', 'New security configuration has successfully been stored')); Notification::success($this->translate('New security configuration has successfully been stored'));
} else { } else {
return false; return false;
} }
@ -54,8 +54,8 @@ class SecurityConfigForm extends ConfigForm
array( array(
'allowEmpty' => true, 'allowEmpty' => true,
'value' => '*pw*,*pass*,community', 'value' => '*pw*,*pass*,community',
'label' => mt('monitoring', 'Protected Custom Variables'), 'label' => $this->translate('Protected Custom Variables'),
'description' => mt('monitoring', 'description' => $this->translate(
'Comma separated case insensitive list of protected custom variables.' 'Comma separated case insensitive list of protected custom variables.'
. ' Use * as a placeholder for zero or more wildcard characters.' . ' Use * as a placeholder for zero or more wildcard characters.'
. ' Existance of those custom variables will be shown, but their values will be masked.' . ' Existance of those custom variables will be shown, but their values will be masked.'

View File

@ -44,7 +44,7 @@ class EventOverviewForm extends Form
'checkbox', 'checkbox',
'statechange', 'statechange',
array( array(
'label' => t('State Changes'), 'label' => $this->translate('State Changes'),
'class' => 'autosubmit', 'class' => 'autosubmit',
'decorators' => $decorators, 'decorators' => $decorators,
'value' => strpos($url, $this->stateChangeFilter()->toQueryString()) === false ? 0 : 1 'value' => strpos($url, $this->stateChangeFilter()->toQueryString()) === false ? 0 : 1
@ -54,7 +54,7 @@ class EventOverviewForm extends Form
'checkbox', 'checkbox',
'downtime', 'downtime',
array( array(
'label' => t('Downtimes'), 'label' => $this->translate('Downtimes'),
'class' => 'autosubmit', 'class' => 'autosubmit',
'decorators' => $decorators, 'decorators' => $decorators,
'value' => strpos($url, $this->downtimeFilter()->toQueryString()) === false ? 0 : 1 'value' => strpos($url, $this->downtimeFilter()->toQueryString()) === false ? 0 : 1
@ -64,7 +64,7 @@ class EventOverviewForm extends Form
'checkbox', 'checkbox',
'comment', 'comment',
array( array(
'label' => t('Comments'), 'label' => $this->translate('Comments'),
'class' => 'autosubmit', 'class' => 'autosubmit',
'decorators' => $decorators, 'decorators' => $decorators,
'value' => strpos($url, $this->commentFilter()->toQueryString()) === false ? 0 : 1 'value' => strpos($url, $this->commentFilter()->toQueryString()) === false ? 0 : 1
@ -74,7 +74,7 @@ class EventOverviewForm extends Form
'checkbox', 'checkbox',
'notification', 'notification',
array( array(
'label' => t('Notifications'), 'label' => $this->translate('Notifications'),
'class' => 'autosubmit', 'class' => 'autosubmit',
'decorators' => $decorators, 'decorators' => $decorators,
'value' => strpos($url, $this->notificationFilter()->toQueryString()) === false ? 0 : 1 'value' => strpos($url, $this->notificationFilter()->toQueryString()) === false ? 0 : 1
@ -84,7 +84,7 @@ class EventOverviewForm extends Form
'checkbox', 'checkbox',
'flapping', 'flapping',
array( array(
'label' => t('Flapping'), 'label' => $this->translate('Flapping'),
'class' => 'autosubmit', 'class' => 'autosubmit',
'decorators' => $decorators, 'decorators' => $decorators,
'value' => strpos($url, $this->flappingFilter()->toQueryString()) === false ? 0 : 1 'value' => strpos($url, $this->flappingFilter()->toQueryString()) === false ? 0 : 1

View File

@ -20,7 +20,7 @@ class BackendPage extends Form
'note', 'note',
'title', 'title',
array( array(
'value' => mt('monitoring', 'Monitoring Backend', 'setup.page.title'), 'value' => $this->translate('Monitoring Backend', 'setup.page.title'),
'decorators' => array( 'decorators' => array(
'ViewHelper', 'ViewHelper',
array('HtmlTag', array('tag' => 'h2')) array('HtmlTag', array('tag' => 'h2'))
@ -31,8 +31,7 @@ class BackendPage extends Form
'note', 'note',
'description', 'description',
array( array(
'value' => mt( 'value' => $this->translate(
'monitoring',
'Please configure below how Icinga Web 2 should retrieve monitoring information.' 'Please configure below how Icinga Web 2 should retrieve monitoring information.'
) )
) )
@ -44,8 +43,8 @@ class BackendPage extends Form
array( array(
'required' => true, 'required' => true,
'value' => 'icinga', 'value' => 'icinga',
'label' => mt('monitoring', 'Backend Name'), 'label' => $this->translate('Backend Name'),
'description' => mt('monitoring', 'The identifier of this backend') 'description' => $this->translate('The identifier of this backend')
) )
); );
@ -60,8 +59,10 @@ class BackendPage extends Form
'type', 'type',
array( array(
'required' => true, 'required' => true,
'label' => mt('monitoring', 'Backend Type'), 'label' => $this->translate('Backend Type'),
'description' => mt('monitoring', 'The data source used for retrieving monitoring information'), 'description' => $this->translate(
'The data source used for retrieving monitoring information'
),
'multiOptions' => $resourceTypes 'multiOptions' => $resourceTypes
) )
); );

View File

@ -28,7 +28,7 @@ class IdoResourcePage extends Form
'note', 'note',
'title', 'title',
array( array(
'value' => mt('monitoring', 'Monitoring IDO Resource', 'setup.page.title'), 'value' => $this->translate('Monitoring IDO Resource', 'setup.page.title'),
'decorators' => array( 'decorators' => array(
'ViewHelper', 'ViewHelper',
array('HtmlTag', array('tag' => 'h2')) array('HtmlTag', array('tag' => 'h2'))
@ -39,8 +39,7 @@ class IdoResourcePage extends Form
'note', 'note',
'description', 'description',
array( array(
'value' => mt( 'value' => $this->translate(
'monitoring',
'Please fill out the connection details below to access' 'Please fill out the connection details below to access'
. ' the IDO database of your monitoring environment.' . ' the IDO database of your monitoring environment.'
) )
@ -91,8 +90,10 @@ class IdoResourcePage extends Form
'skip_validation', 'skip_validation',
array( array(
'required' => true, 'required' => true,
'label' => t('Skip Validation'), 'label' => $this->translate('Skip Validation'),
'description' => t('Check this to not to validate connectivity with the given database server') 'description' => $this->translate(
'Check this to not to validate connectivity with the given database server'
)
) )
); );
} }

View File

@ -20,7 +20,7 @@ class InstancePage extends Form
'note', 'note',
'title', 'title',
array( array(
'value' => mt('monitoring', 'Monitoring Instance', 'setup.page.title'), 'value' => $this->translate('Monitoring Instance', 'setup.page.title'),
'decorators' => array( 'decorators' => array(
'ViewHelper', 'ViewHelper',
array('HtmlTag', array('tag' => 'h2')) array('HtmlTag', array('tag' => 'h2'))
@ -31,8 +31,7 @@ class InstancePage extends Form
'note', 'note',
'description', 'description',
array( array(
'value' => mt( 'value' => $this->translate(
'monitoring',
'Please define the settings specific to your monitoring instance below.' 'Please define the settings specific to your monitoring instance below.'
) )
) )

View File

@ -28,7 +28,7 @@ class LivestatusResourcePage extends Form
'note', 'note',
'title', 'title',
array( array(
'value' => mt('monitoring', 'Monitoring Livestatus Resource', 'setup.page.title'), 'value' => $this->translate('Monitoring Livestatus Resource', 'setup.page.title'),
'decorators' => array( 'decorators' => array(
'ViewHelper', 'ViewHelper',
array('HtmlTag', array('tag' => 'h2')) array('HtmlTag', array('tag' => 'h2'))
@ -39,8 +39,7 @@ class LivestatusResourcePage extends Form
'note', 'note',
'description', 'description',
array( array(
'value' => mt( 'value' => $this->translate(
'monitoring',
'Please fill out the connection details below to access the Livestatus' 'Please fill out the connection details below to access the Livestatus'
. ' socket interface for your monitoring environment.' . ' socket interface for your monitoring environment.'
) )
@ -91,8 +90,10 @@ class LivestatusResourcePage extends Form
'skip_validation', 'skip_validation',
array( array(
'required' => true, 'required' => true,
'label' => t('Skip Validation'), 'label' => $this->translate('Skip Validation'),
'description' => t('Check this to not to validate connectivity with the given Livestatus socket') 'description' => $this->translate(
'Check this to not to validate connectivity with the given Livestatus socket'
)
) )
); );
} }

View File

@ -20,7 +20,7 @@ class SecurityPage extends Form
'note', 'note',
'title', 'title',
array( array(
'value' => mt('monitoring', 'Monitoring Security', 'setup.page.title'), 'value' => $this->translate('Monitoring Security', 'setup.page.title'),
'decorators' => array( 'decorators' => array(
'ViewHelper', 'ViewHelper',
array('HtmlTag', array('tag' => 'h2')) array('HtmlTag', array('tag' => 'h2'))
@ -31,8 +31,7 @@ class SecurityPage extends Form
'note', 'note',
'description', 'description',
array( array(
'value' => mt( 'value' => $this->translate(
'monitoring',
'To protect your monitoring environment against prying eyes please fill out the settings below.' 'To protect your monitoring environment against prying eyes please fill out the settings below.'
) )
) )

View File

@ -19,10 +19,7 @@ class WelcomePage extends Form
'note', 'note',
'welcome', 'welcome',
array( array(
'value' => mt( 'value' => $this->translate('Welcome to the configuration of the monitoring module for Icinga Web 2!'),
'monitoring',
'Welcome to the configuration of the monitoring module for Icinga Web 2!'
),
'decorators' => array( 'decorators' => array(
'ViewHelper', 'ViewHelper',
array('HtmlTag', array('tag' => 'h2')) array('HtmlTag', array('tag' => 'h2'))
@ -34,7 +31,7 @@ class WelcomePage extends Form
'note', 'note',
'core_hint', 'core_hint',
array( array(
'value' => mt('monitoring', 'This is the core module for Icinga Web 2.') 'value' => $this->translate('This is the core module for Icinga Web 2.')
) )
); );
@ -42,8 +39,7 @@ class WelcomePage extends Form
'note', 'note',
'description', 'description',
array( array(
'value' => mt( 'value' => $this->translate(
'monitoring',
'It offers various status and reporting views with powerful filter capabilities that allow' 'It offers various status and reporting views with powerful filter capabilities that allow'
. ' you to keep track of the most important events in your monitoring environment.' . ' you to keep track of the most important events in your monitoring environment.'
) )

View File

@ -19,7 +19,7 @@ class StatehistoryForm extends Form
public function init() public function init()
{ {
$this->setName('form_event_overview'); $this->setName('form_event_overview');
$this->setSubmitLabel(mt('monitoring', 'Apply')); $this->setSubmitLabel($this->translate('Apply'));
} }
/** /**
@ -65,14 +65,14 @@ class StatehistoryForm extends Form
'select', 'select',
'from', 'from',
array( array(
'label' => mt('monitoring', 'From'), 'label' => $this->translate('From'),
'value' => $this->getRequest()->getParam('from', strtotime('3 months ago')), 'value' => $this->getRequest()->getParam('from', strtotime('3 months ago')),
'multiOptions' => array( 'multiOptions' => array(
strtotime('midnight 3 months ago') => mt('monitoring', '3 Months'), strtotime('midnight 3 months ago') => $this->translate('3 Months'),
strtotime('midnight 4 months ago') => mt('monitoring', '4 Months'), strtotime('midnight 4 months ago') => $this->translate('4 Months'),
strtotime('midnight 8 months ago') => mt('monitoring', '8 Months'), strtotime('midnight 8 months ago') => $this->translate('8 Months'),
strtotime('midnight 12 months ago') => mt('monitoring', '1 Year'), strtotime('midnight 12 months ago') => $this->translate('1 Year'),
strtotime('midnight 24 months ago') => mt('monitoring', '2 Years') strtotime('midnight 24 months ago') => $this->translate('2 Years')
), ),
'class' => 'autosubmit' 'class' => 'autosubmit'
) )
@ -81,10 +81,10 @@ class StatehistoryForm extends Form
'select', 'select',
'to', 'to',
array( array(
'label' => mt('monitoring', 'To'), 'label' => $this->translate('To'),
'value' => $this->getRequest()->getParam('to', time()), 'value' => $this->getRequest()->getParam('to', time()),
'multiOptions' => array( 'multiOptions' => array(
time() => mt('monitoring', 'Today') time() => $this->translate('Today')
), ),
'class' => 'autosubmit' 'class' => 'autosubmit'
) )
@ -95,11 +95,11 @@ class StatehistoryForm extends Form
'select', 'select',
'objecttype', 'objecttype',
array( array(
'label' => mt('monitoring', 'Object type'), 'label' => $this->translate('Object type'),
'value' => $objectType, 'value' => $objectType,
'multiOptions' => array( 'multiOptions' => array(
'services' => mt('monitoring', 'Services'), 'services' => $this->translate('Services'),
'hosts' => mt('monitoring', 'Hosts') 'hosts' => $this->translate('Hosts')
), ),
'class' => 'autosubmit' 'class' => 'autosubmit'
) )
@ -113,13 +113,13 @@ class StatehistoryForm extends Form
'select', 'select',
'state', 'state',
array( array(
'label' => mt('monitoring', 'State'), 'label' => $this->translate('State'),
'value' => $serviceState, 'value' => $serviceState,
'multiOptions' => array( 'multiOptions' => array(
'cnt_critical_hard' => mt('monitoring', 'Critical'), 'cnt_critical_hard' => $this->translate('Critical'),
'cnt_warning_hard' => mt('monitoring', 'Warning'), 'cnt_warning_hard' => $this->translate('Warning'),
'cnt_unknown_hard' => mt('monitoring', 'Unknown'), 'cnt_unknown_hard' => $this->translate('Unknown'),
'cnt_ok' => mt('monitoring', 'Ok') 'cnt_ok' => $this->translate('Ok')
), ),
'class' => 'autosubmit' 'class' => 'autosubmit'
) )
@ -133,12 +133,12 @@ class StatehistoryForm extends Form
'select', 'select',
'state', 'state',
array( array(
'label' => mt('monitoring', 'State'), 'label' => $this->translate('State'),
'value' => $hostState, 'value' => $hostState,
'multiOptions' => array( 'multiOptions' => array(
'cnt_up' => mt('monitoring', 'Up'), 'cnt_up' => $this->translate('Up'),
'cnt_down_hard' => mt('monitoring', 'Down'), 'cnt_down_hard' => $this->translate('Down'),
'cnt_unreachable_hard' => mt('monitoring', 'Unreachable') 'cnt_unreachable_hard' => $this->translate('Unreachable')
), ),
'class' => 'autosubmit' 'class' => 'autosubmit'
) )