diff --git a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php
index 21d926b58..0e64a4b03 100644
--- a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php
@@ -21,7 +21,7 @@ class DisableNotificationsExpireCommandForm extends CommandForm
*/
public function init()
{
- $this->setSubmitLabel($this->translate('Disable Notifications'));
+ $this->setSubmitLabel(mt('monitoring', 'Disable Notifications'));
}
/**
@@ -30,7 +30,8 @@ class DisableNotificationsExpireCommandForm extends CommandForm
*/
public function getHelp()
{
- return $this->translate(
+ return mt(
+ 'monitoring',
'This command is used to disable host and service notifications for a specific time.'
);
}
@@ -48,8 +49,8 @@ class DisableNotificationsExpireCommandForm extends CommandForm
'expire_time',
array(
'required' => true,
- 'label' => $this->translate('Expire Time'),
- 'description' => $this->translate('Set the expire time.'),
+ 'label' => mt('monitoring', 'Expire Time'),
+ 'description' => mt('monitoring', 'Set the expire time.'),
'value' => $expireTime
)
);
@@ -66,7 +67,7 @@ class DisableNotificationsExpireCommandForm extends CommandForm
$disableNotifications
->setExpireTime($this->getElement('expire_time')->getValue()->getTimestamp());
$this->getTransport($this->request)->send($disableNotifications);
- Notification::success($this->translate('Disabling host and service notifications..'));
+ Notification::success(mt('monitoring', 'Disabling host and service notifications..'));
return true;
}
}
diff --git a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
index 469c1b6eb..291619b2f 100644
--- a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
@@ -61,13 +61,13 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
if ((bool) $this->status->notifications_enabled) {
$notificationDescription = sprintf(
'%s',
- $this->translate('Disable notifications for a specific time on a program-wide basis'),
+ mt('monitoring', 'Disable notifications for a specific time on a program-wide basis'),
$this->getView()->href('monitoring/process/disable-notifications'),
- $this->translate('Disable temporarily')
+ mt('monitoring', 'Disable temporarily')
);
} elseif ($this->status->disable_notif_expire_time) {
$notificationDescription = sprintf(
- $this->translate('Notifications will be re-enabled in %s'),
+ mt('monitoring', 'Notifications will be re-enabled in %s'),
$this->getView()->timeUntil($this->status->disable_notif_expire_time)
);
} else {
@@ -78,7 +78,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_ACTIVE_HOST_CHECKS,
array(
- 'label' => $this->translate('Active Host Checks Being Executed'),
+ 'label' => mt('monitoring', 'Active Host Checks Being Executed'),
'autosubmit' => true
)
),
@@ -86,7 +86,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_ACTIVE_SERVICE_CHECKS,
array(
- 'label' => $this->translate('Active Service Checks Being Executed'),
+ 'label' => mt('monitoring', 'Active Service Checks Being Executed'),
'autosubmit' => true
)
),
@@ -94,7 +94,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_EVENT_HANDLERS,
array(
- 'label' => $this->translate('Event Handlers Enabled'),
+ 'label' => mt('monitoring', 'Event Handlers Enabled'),
'autosubmit' => true
)
),
@@ -102,7 +102,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_FLAP_DETECTION,
array(
- 'label' => $this->translate('Flap Detection Enabled'),
+ 'label' => mt('monitoring', 'Flap Detection Enabled'),
'autosubmit' => true
)
),
@@ -110,7 +110,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_NOTIFICATIONS,
array(
- 'label' => $this->translate('Notifications Enabled'),
+ 'label' => mt('monitoring', 'Notifications Enabled'),
'autosubmit' => true,
'description' => $notificationDescription,
'decorators' => array(
@@ -129,7 +129,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_HOST_OBSESSING,
array(
- 'label' => $this->translate('Obsessing Over Hosts'),
+ 'label' => mt('monitoring', 'Obsessing Over Hosts'),
'autosubmit' => true
)
),
@@ -137,7 +137,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_SERVICE_OBSESSING,
array(
- 'label' => $this->translate('Obsessing Over Services'),
+ 'label' => mt('monitoring', 'Obsessing Over Services'),
'autosubmit' => true
)
),
@@ -145,7 +145,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_PASSIVE_HOST_CHECKS,
array(
- 'label' => $this->translate('Passive Host Checks Being Accepted'),
+ 'label' => mt('monitoring', 'Passive Host Checks Being Accepted'),
'autosubmit' => true
)
),
@@ -153,7 +153,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_PASSIVE_SERVICE_CHECKS,
array(
- 'label' => $this->translate('Passive Service Checks Being Accepted'),
+ 'label' => mt('monitoring', 'Passive Service Checks Being Accepted'),
'autosubmit' => true
)
),
@@ -161,7 +161,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
'checkbox',
ToggleInstanceFeatureCommand::FEATURE_PERFORMANCE_DATA,
array(
- 'label' => $this->translate('Performance Data Being Processed'),
+ 'label' => mt('monitoring', 'Performance Data Being Processed'),
'autosubmit' => true
)
)
@@ -198,7 +198,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
->setEnabled($enabled);
$this->getTransport($this->request)->send($toggleFeature);
}
- Notification::success($this->translate('Toggling feature..'));
+ Notification::success(mt('monitoring', 'Toggling feature..'));
return true;
}
}
diff --git a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php
index df3731837..25ac76c25 100644
--- a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php
@@ -31,7 +31,8 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
*/
public function getHelp()
{
- return $this->translate(
+ return mt(
+ 'monitoring',
'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'
. ' recovers.'
@@ -50,8 +51,9 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'comment',
array(
'required' => true,
- 'label' => $this->translate('Comment'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Comment'),
+ 'description' => mt(
+ 'monitoring',
'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'
. ' what you are doing.'
@@ -62,8 +64,9 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox',
'persistent',
array(
- 'label' => $this->translate('Persistent Comment'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Persistent Comment'),
+ 'description' => mt(
+ 'monitoring',
'If you would like the comment to remain even when the acknowledgement is removed, check this'
. ' option.'
)
@@ -73,10 +76,8 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox',
'expire',
array(
- 'label' => $this->translate('Use Expire Time'),
- 'description' => $this->translate(
- 'If the acknowledgement should expire, check this option.'
- ),
+ 'label' => mt('monitoring', 'Use Expire Time'),
+ 'description' => mt('monitoring', 'If the acknowledgement should expire, check this option.'),
'autosubmit' => true
)
)
@@ -88,9 +89,10 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'dateTimePicker',
'expire_time',
array(
- 'label' => $this->translate('Expire Time'),
+ 'label' => mt('monitoring', 'Expire Time'),
'value' => $expireTime,
- 'description' => $this->translate(
+ 'description' => mt(
+ 'monitoring',
'Enter the expire date and time for this acknowledgement here. Icinga will delete the'
. ' acknowledgement after this time expired.'
)
@@ -112,9 +114,10 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox',
'sticky',
array(
- 'label' => $this->translate('Sticky Acknowledgement'),
+ 'label' => mt('monitoring', 'Sticky Acknowledgement'),
'value' => true,
- 'description' => $this->translate(
+ 'description' => mt(
+ 'monitoring',
'If you want the acknowledgement to disable notifications until the host or service recovers,'
. ' check this option.'
)
@@ -124,9 +127,10 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
'checkbox',
'notify',
array(
- 'label' => $this->translate('Send Notification'),
+ 'label' => mt('monitoring', 'Send Notification'),
'value' => true,
- 'description' => $this->translate(
+ 'description' => mt(
+ 'monitoring',
'If you do not want an acknowledgement notification to be sent out to the appropriate contacts,'
. ' uncheck this option.'
)
diff --git a/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php b/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php
index e7f7e91f9..f5adf6c71 100644
--- a/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php
@@ -29,7 +29,8 @@ class AddCommentCommandForm extends ObjectsCommandForm
*/
public function getHelp()
{
- return $this->translate(
+ return mt(
+ 'monitoring',
'This command is used to add host or service comments.'
);
}
@@ -46,8 +47,9 @@ class AddCommentCommandForm extends ObjectsCommandForm
'comment',
array(
'required' => true,
- 'label' => $this->translate('Comment'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Comment'),
+ 'description' => mt(
+ 'monitoring',
'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'
. ' what you are doing.'
@@ -58,9 +60,10 @@ class AddCommentCommandForm extends ObjectsCommandForm
'checkbox',
'persistent',
array(
- 'label' => $this->translate('Persistent'),
+ 'label' => mt('monitoring', 'Persistent'),
'value' => true,
- 'description' => $this->translate(
+ 'description' => mt(
+ 'monitoring',
'If you uncheck this option, the comment will automatically be deleted the next time Icinga is'
. ' restarted.'
)
diff --git a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php
index 1054aae05..01006683f 100644
--- a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php
@@ -35,8 +35,8 @@ class CheckNowCommandForm extends ObjectsCommandForm
array(
'ignore' => true,
'type' => 'submit',
- 'value' => $this->translate('Check now'),
- 'label' => ' ' . $this->translate('Check now'),
+ 'value' => mt('monitoring', 'Check now'),
+ 'label' => ' ' . mt('monitoring', 'Check now'),
'decorators' => array('ViewHelper'),
'escape' => false,
'class' => 'link-like'
diff --git a/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php b/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php
index 0f7858ad9..3d85afcec 100644
--- a/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php
@@ -55,7 +55,7 @@ class DeleteCommentCommandForm extends ObjectsCommandForm
array(
'ignore' => true,
'label' => 'X',
- 'title' => $this->translate('Delete comment'),
+ 'title' => mt('monitoring', 'Delete comment'),
'decorators' => array('ViewHelper')
)
);
@@ -80,7 +80,7 @@ class DeleteCommentCommandForm extends ObjectsCommandForm
if (! empty($redirect)) {
$this->setRedirectUrl($redirect);
}
- Notification::success($this->translate('Deleting comment..'));
+ Notification::success(mt('monitoring', 'Deleting comment..'));
return true;
}
}
diff --git a/modules/monitoring/application/forms/Command/Object/DeleteDowntimeCommandForm.php b/modules/monitoring/application/forms/Command/Object/DeleteDowntimeCommandForm.php
index 43ca52b05..1c7095b82 100644
--- a/modules/monitoring/application/forms/Command/Object/DeleteDowntimeCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/DeleteDowntimeCommandForm.php
@@ -55,7 +55,7 @@ class DeleteDowntimeCommandForm extends ObjectsCommandForm
array(
'ignore' => true,
'label' => 'X',
- 'title' => $this->translate('Delete downtime'),
+ 'title' => mt('monitoring', 'Delete downtime'),
'decorators' => array('ViewHelper')
)
);
@@ -80,7 +80,7 @@ class DeleteDowntimeCommandForm extends ObjectsCommandForm
if (! empty($redirect)) {
$this->setRedirectUrl($redirect);
}
- Notification::success($this->translate('Deleting downtime..'));
+ Notification::success(mt('monitoring', 'Deleting downtime..'));
return true;
}
}
diff --git a/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php b/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php
index 44e248956..48ee00ab3 100644
--- a/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php
@@ -29,7 +29,8 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
*/
public function getHelp()
{
- return $this->translate(
+ return mt(
+ 'monitoring',
'This command is used to submit passive host or service check results.'
);
}
@@ -52,17 +53,17 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
'status',
array(
'required' => true,
- 'label' => $this->translate('Status'),
- 'description' => $this->translate('The state this check result should report'),
+ 'label' => mt('monitoring', 'Status'),
+ 'description' => mt('monitoring', 'The state this check result should report'),
'multiOptions' => $object->getType() === $object::TYPE_HOST ? array(
- ProcessCheckResultCommand::HOST_UP => $this->translate('UP', 'icinga.state'),
- ProcessCheckResultCommand::HOST_DOWN => $this->translate('DOWN', 'icinga.state'),
- ProcessCheckResultCommand::HOST_UNREACHABLE => $this->translate('UNREACHABLE', 'icinga.state')
+ ProcessCheckResultCommand::HOST_UP => mt('monitoring', 'UP', 'icinga.state'),
+ ProcessCheckResultCommand::HOST_DOWN => mt('monitoring', 'DOWN', 'icinga.state'),
+ ProcessCheckResultCommand::HOST_UNREACHABLE => mt('monitoring', 'UNREACHABLE', 'icinga.state')
) : array(
- ProcessCheckResultCommand::SERVICE_OK => $this->translate('OK', 'icinga.state'),
- ProcessCheckResultCommand::SERVICE_WARNING => $this->translate('WARNING', 'icinga.state'),
- ProcessCheckResultCommand::SERVICE_CRITICAL => $this->translate('CRITICAL', 'icinga.state'),
- ProcessCheckResultCommand::SERVICE_UNKNOWN => $this->translate('UNKNOWN', 'icinga.state')
+ ProcessCheckResultCommand::SERVICE_OK => mt('monitoring', 'OK', 'icinga.state'),
+ ProcessCheckResultCommand::SERVICE_WARNING => mt('monitoring', 'WARNING', 'icinga.state'),
+ ProcessCheckResultCommand::SERVICE_CRITICAL => mt('monitoring', 'CRITICAL', 'icinga.state'),
+ ProcessCheckResultCommand::SERVICE_UNKNOWN => mt('monitoring', 'UNKNOWN', 'icinga.state')
)
)
);
@@ -71,8 +72,8 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
'output',
array(
'required' => true,
- 'label' => $this->translate('Output'),
- 'description' => $this->translate('The plugin output of this check result')
+ 'label' => mt('monitoring', 'Output'),
+ 'description' => mt('monitoring', 'The plugin output of this check result')
)
);
$this->addElement(
@@ -80,8 +81,9 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
'perfdata',
array(
'allowEmpty' => true,
- 'label' => $this->translate('Performance Data'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Performance Data'),
+ 'description' => mt(
+ 'monitoring',
'The performance data of this check result. Leave empty'
. ' if this check result has no performance data'
)
diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleHostCheckCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleHostCheckCommandForm.php
index 949ec33e1..82a9b2e52 100644
--- a/modules/monitoring/application/forms/Command/Object/ScheduleHostCheckCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ScheduleHostCheckCommandForm.php
@@ -24,8 +24,9 @@ class ScheduleHostCheckCommandForm extends ScheduleServiceCheckCommandForm
'checkbox',
'all_services',
array(
- 'label' => $this->translate('All Services'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'All Services'),
+ 'description' => mt(
+ 'monitoring',
'Schedule check for all services on the hosts and the hosts themselves.'
)
)
diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php
index f84069a9a..beb0793ef 100644
--- a/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php
@@ -27,8 +27,9 @@ class ScheduleHostDowntimeCommandForm extends ScheduleServiceDowntimeCommandForm
'checkbox',
'all_services',
array(
- 'label' => $this->translate('All Services'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'All Services'),
+ 'description' => mt(
+ 'monitoring',
'Schedule downtime for all services on the hosts and the hosts themselves.'
)
)
@@ -37,14 +38,15 @@ class ScheduleHostDowntimeCommandForm extends ScheduleServiceDowntimeCommandForm
'select',
'child_hosts',
array(
- 'label' => $this->translate('Child Hosts'),
+ 'label' => mt('monitoring', 'Child Hosts'),
'required' => true,
'multiOptions' => array(
- 0 => $this->translate('Do nothing with child hosts'),
- 1 => $this->translate('Schedule triggered downtime for all child hosts'),
- 2 => $this->translate('Schedule non-triggered downtime for all child hosts')
+ 0 => mt('monitoring', 'Do nothing with child hosts'),
+ 1 => mt('monitoring', 'Schedule triggered downtime for all child hosts'),
+ 2 => mt('monitoring', 'Schedule non-triggered downtime for all child hosts')
),
- 'description' => $this->translate(
+ 'description' => mt(
+ 'monitoring',
'Define what should be done with the child hosts of the hosts.'
)
)
diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php
index b34472d49..9e04a2254 100644
--- a/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php
@@ -32,7 +32,8 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
*/
public function getHelp()
{
- return $this->translate(
+ return mt(
+ 'monitoring',
'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.'
);
@@ -51,7 +52,8 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
'note',
'command-info',
array(
- 'value' => $this->translate(
+ 'value' => mt(
+ 'monitoring',
'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.'
)
@@ -62,10 +64,8 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
'check_time',
array(
'required' => true,
- 'label' => $this->translate('Check Time'),
- 'description' => $this->translate(
- 'Set the date and time when the check should be scheduled.'
- ),
+ 'label' => mt('monitoring', 'Check Time'),
+ 'description' => mt('monitoring', 'Set the date and time when the check should be scheduled.'),
'value' => $checkTime
)
),
@@ -73,8 +73,9 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
'checkbox',
'force_check',
array(
- 'label' => $this->translate('Force Check'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Force Check'),
+ 'description' => mt(
+ 'monitoring',
'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.'
)
diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php
index 4f66898f6..9961d4b65 100644
--- a/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php
@@ -42,7 +42,8 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
*/
public function getHelp()
{
- return $this->translate(
+ return mt(
+ 'monitoring',
'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'
. ' downtime expires, Icinga will send out notifications for the hosts and services as it'
@@ -66,8 +67,9 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'comment',
array(
'required' => true,
- 'label' => $this->translate('Comment'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Comment'),
+ 'description' => mt(
+ 'monitoring',
'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'
. ' what you are doing.'
@@ -79,8 +81,8 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'start',
array(
'required' => true,
- 'label' => $this->translate('Start Time'),
- 'description' => $this->translate('Set the start date and time for the downtime.'),
+ 'label' => mt('monitoring', 'Start Time'),
+ 'description' => mt('monitoring', 'Set the start date and time for the downtime.'),
'value' => $start
)
),
@@ -89,8 +91,8 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'end',
array(
'required' => true,
- 'label' => $this->translate('End Time'),
- 'description' => $this->translate('Set the end date and time for the downtime.'),
+ 'label' => mt('monitoring', 'End Time'),
+ 'description' => mt('monitoring', 'Set the end date and time for the downtime.'),
'value' => $end
)
),
@@ -100,16 +102,17 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
array(
'required' => true,
'autosubmit' => true,
- 'label' => $this->translate('Type'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Type'),
+ 'description' => mt(
+ 'monitoring',
'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'
. ' 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.'
),
'multiOptions' => array(
- self::FIXED => $this->translate('Fixed'),
- self::FLEXIBLE => $this->translate('Flexible')
+ self::FIXED => mt('monitoring', 'Fixed'),
+ self::FLEXIBLE => mt('monitoring', 'Flexible')
),
'validators' => array(
array(
@@ -138,7 +141,7 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'hours',
array(
'required' => true,
- 'label' => $this->translate('Hours'),
+ 'label' => mt('monitoring', 'Hours'),
'value' => 2,
'min' => -1
)
@@ -148,7 +151,7 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
'minutes',
array(
'required' => true,
- 'label' => $this->translate('Minutes'),
+ 'label' => mt('monitoring', 'Minutes'),
'value' => 0,
'min' => -1
)
@@ -158,8 +161,9 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
array('hours', 'minutes'),
'duration',
array(
- 'legend' => $this->translate('Flexible Duration'),
- 'description' => $this->translate(
+ 'legend' => mt('monitoring', 'Flexible Duration'),
+ 'description' => mt(
+ 'monitoring',
'Enter here the duration of the downtime. The downtime will be automatically deleted after this'
. ' time expired.'
),
diff --git a/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php b/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php
index bf0a1d8b1..c33527895 100644
--- a/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php
@@ -33,7 +33,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox',
ToggleObjectFeatureCommand::FEATURE_ACTIVE_CHECKS,
array(
- 'label' => $this->translate('Active Checks'),
+ 'label' => mt('monitoring', 'Active Checks'),
'autosubmit' => true
)
),
@@ -41,7 +41,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox',
ToggleObjectFeatureCommand::FEATURE_PASSIVE_CHECKS,
array(
- 'label' => $this->translate('Passive Checks'),
+ 'label' => mt('monitoring', 'Passive Checks'),
'autosubmit' => true
)
),
@@ -49,7 +49,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox',
ToggleObjectFeatureCommand::FEATURE_OBSESSING,
array(
- 'label' => $this->translate('Obsessing'),
+ 'label' => mt('monitoring', 'Obsessing'),
'autosubmit' => true
)
),
@@ -57,7 +57,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox',
ToggleObjectFeatureCommand::FEATURE_NOTIFICATIONS,
array(
- 'label' => $this->translate('Notifications'),
+ 'label' => mt('monitoring', 'Notifications'),
'autosubmit' => true
)
),
@@ -65,7 +65,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox',
ToggleObjectFeatureCommand::FEATURE_EVENT_HANDLER,
array(
- 'label' => $this->translate('Event Handler'),
+ 'label' => mt('monitoring', 'Event Handler'),
'autosubmit' => true
)
),
@@ -73,7 +73,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'checkbox',
ToggleObjectFeatureCommand::FEATURE_FLAP_DETECTION,
array(
- 'label' => $this->translate('Flap Detection'),
+ 'label' => mt('monitoring', 'Flap Detection'),
'autosubmit' => true
)
)
@@ -95,7 +95,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
$element = $this->getElement($feature);
$element->setChecked($object->{$feature});
if ((bool) $object->{$feature . '_changed'} === true) {
- $element->setDescription($this->translate('changed'));
+ $element->setDescription(mt('monitoring', 'changed'));
}
}
return $this;
@@ -120,7 +120,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
}
}
}
- Notification::success($this->translate('Toggling feature..'));
+ Notification::success(mt('monitoring', 'Toggling feature..'));
return true;
}
}
diff --git a/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php b/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php
index 405bac144..daabe7e02 100644
--- a/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php
+++ b/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php
@@ -28,9 +28,9 @@ class LocalInstanceForm extends Form
'path',
array(
'required' => true,
- 'label' => $this->translate('Command File'),
+ 'label' => mt('monitoring', 'Command File'),
'value' => '/var/run/icinga2/cmd/icinga2.cmd',
- 'description' => $this->translate('Path to the local Icinga command file')
+ 'description' => mt('monitoring', 'Path to the local Icinga command file')
)
);
return $this;
diff --git a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php b/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php
index 47b2a0316..7c55f655a 100644
--- a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php
+++ b/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php
@@ -29,8 +29,8 @@ class RemoteInstanceForm extends Form
'host',
array(
'required' => true,
- 'label' => $this->translate('Host'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Host'),
+ 'description' => mt('monitoring',
'Hostname or address of the remote Icinga instance'
)
)
@@ -40,8 +40,8 @@ class RemoteInstanceForm extends Form
'port',
array(
'required' => true,
- 'label' => $this->translate('Port'),
- 'description' => $this->translate('SSH port to connect to on the remote Icinga instance'),
+ 'label' => mt('monitoring', 'Port'),
+ 'description' => mt('monitoring', 'SSH port to connect to on the remote Icinga instance'),
'value' => 22
)
),
@@ -50,8 +50,8 @@ class RemoteInstanceForm extends Form
'user',
array(
'required' => true,
- 'label' => $this->translate('User'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'User'),
+ 'description' => mt('monitoring',
'User to log in as on the remote Icinga instance. Please note that key-based SSH login must be'
. ' possible for this user'
)
@@ -62,9 +62,9 @@ class RemoteInstanceForm extends Form
'path',
array(
'required' => true,
- 'label' => $this->translate('Command File'),
+ 'label' => mt('monitoring', 'Command File'),
'value' => '/var/run/icinga2/cmd/icinga2.cmd',
- 'description' => $this->translate('Path to the Icinga command file on the remote Icinga instance')
+ 'description' => mt('monitoring', 'Path to the Icinga command file on the remote Icinga instance')
)
)
));
diff --git a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceKeyResourcePage.php b/modules/monitoring/application/forms/Config/Instance/RemoteInstanceKeyResourcePage.php
deleted file mode 100644
index 454c67d47..000000000
--- a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceKeyResourcePage.php
+++ /dev/null
@@ -1,54 +0,0 @@
-addElement(
- 'button',
- Wizard::BTN_NEXT,
- array(
- 'type' => 'submit',
- 'value' => $pageName,
- 'label' => $this->translate('Save Changes'),
- 'decorators' => array('ViewHelper')
- )
- );
- }
-
- public function addPreviousButton($pageName)
- {
-
- }
-}
diff --git a/modules/monitoring/application/forms/Config/InstanceConfigForm.php b/modules/monitoring/application/forms/Config/InstanceConfigForm.php
index 5618f27ee..b89e48c0a 100644
--- a/modules/monitoring/application/forms/Config/InstanceConfigForm.php
+++ b/modules/monitoring/application/forms/Config/InstanceConfigForm.php
@@ -25,7 +25,7 @@ class InstanceConfigForm extends ConfigForm
public function init()
{
$this->setName('form_config_monitoring_instance');
- $this->setSubmitLabel($this->translate('Save Changes'));
+ $this->setSubmitLabel(mt('monitoring', 'Save Changes'));
}
/**
@@ -48,7 +48,7 @@ class InstanceConfigForm extends ConfigForm
break;
default:
throw new InvalidArgumentException(
- sprintf($this->translate('Invalid instance type "%s" given'), $type)
+ sprintf(mt('monitoring', 'Invalid instance type "%s" given'), $type)
);
}
return $form;
@@ -69,10 +69,10 @@ class InstanceConfigForm extends ConfigForm
{
$name = isset($values['name']) ? $values['name'] : '';
if (! $name) {
- throw new InvalidArgumentException($this->translate('Instance name missing'));
+ throw new InvalidArgumentException(mt('monitoring', 'Instance name missing'));
}
if ($this->config->hasSection($name)) {
- throw new InvalidArgumentException($this->translate('Instance already exists'));
+ throw new InvalidArgumentException(mt('monitoring', 'Instance already exists'));
}
unset($values['name']);
@@ -93,11 +93,11 @@ class InstanceConfigForm extends ConfigForm
public function edit($name, array $values)
{
if (! $name) {
- throw new InvalidArgumentException($this->translate('Old instance name missing'));
+ throw new InvalidArgumentException(mt('monitoring', 'Old instance name missing'));
} elseif (! ($newName = isset($values['name']) ? $values['name'] : '')) {
- throw new InvalidArgumentException($this->translate('New instance name missing'));
+ throw new InvalidArgumentException(mt('monitoring', 'New instance name missing'));
} elseif (! $this->config->hasSection($name)) {
- throw new InvalidArgumentException($this->translate('Unknown instance name provided'));
+ throw new InvalidArgumentException(mt('monitoring', 'Unknown instance name provided'));
}
unset($values['name']);
@@ -117,9 +117,9 @@ class InstanceConfigForm extends ConfigForm
public function remove($name)
{
if (! $name) {
- throw new InvalidArgumentException($this->translate('Instance name missing'));
+ throw new InvalidArgumentException(mt('monitoring', 'Instance name missing'));
} elseif (! $this->config->hasSection($name)) {
- throw new InvalidArgumentException($this->translate('Unknown instance name provided'));
+ throw new InvalidArgumentException(mt('monitoring', 'Unknown instance name provided'));
}
$instanceConfig = $this->config->getSection($name);
@@ -136,10 +136,10 @@ class InstanceConfigForm extends ConfigForm
$instanceName = $this->request->getQuery('instance');
if ($instanceName !== null) {
if (! $instanceName) {
- throw new ConfigurationError($this->translate('Instance name missing'));
+ throw new ConfigurationError(mt('monitoring', 'Instance name missing'));
}
if (! $this->config->hasSection($instanceName)) {
- throw new ConfigurationError($this->translate('Unknown instance name given'));
+ throw new ConfigurationError(mt('monitoring', 'Unknown instance name given'));
}
$instanceConfig = $this->config->getSection($instanceName)->toArray();
@@ -158,10 +158,10 @@ class InstanceConfigForm extends ConfigForm
try {
if ($instanceName === null) { // create new instance
$this->add($this->getValues());
- $message = $this->translate('Instance "%s" created successfully.');
+ $message = mt('monitoring', 'Instance "%s" created successfully.');
} else { // edit existing instance
$this->edit($instanceName, $this->getValues());
- $message = $this->translate('Instance "%s" edited successfully.');
+ $message = mt('monitoring', 'Instance "%s" edited successfully.');
}
} catch (InvalidArgumentException $e) {
Notification::error($e->getMessage());
@@ -189,7 +189,7 @@ class InstanceConfigForm extends ConfigForm
'name',
array(
'required' => true,
- 'label' => $this->translate('Instance Name')
+ 'label' => mt('monitoring', 'Instance Name')
)
),
array(
@@ -198,10 +198,10 @@ class InstanceConfigForm extends ConfigForm
array(
'required' => true,
'autosubmit' => true,
- 'label' => $this->translate('Instance Type'),
+ 'label' => mt('monitoring', 'Instance Type'),
'multiOptions' => array(
- LocalCommandFile::TRANSPORT => $this->translate('Local Command File'),
- RemoteCommandFile::TRANSPORT => $this->translate('Remote Command File')
+ LocalCommandFile::TRANSPORT => mt('monitoring', 'Local Command File'),
+ RemoteCommandFile::TRANSPORT => mt('monitoring', 'Remote Command File')
),
'value' => $instanceType
)
diff --git a/modules/monitoring/application/forms/Config/SecurityConfigForm.php b/modules/monitoring/application/forms/Config/SecurityConfigForm.php
index b202f5938..40c0b7b8c 100644
--- a/modules/monitoring/application/forms/Config/SecurityConfigForm.php
+++ b/modules/monitoring/application/forms/Config/SecurityConfigForm.php
@@ -18,7 +18,7 @@ class SecurityConfigForm extends ConfigForm
public function init()
{
$this->setName('form_config_monitoring_security');
- $this->setSubmitLabel($this->translate('Save Changes'));
+ $this->setSubmitLabel(mt('monitoring', 'Save Changes'));
}
/**
@@ -29,7 +29,7 @@ class SecurityConfigForm extends ConfigForm
$this->config->setSection('security', $this->getValues());
if ($this->save()) {
- Notification::success($this->translate('New security configuration has successfully been stored'));
+ Notification::success(mt('monitoring', 'New security configuration has successfully been stored'));
} else {
return false;
}
@@ -54,8 +54,8 @@ class SecurityConfigForm extends ConfigForm
array(
'allowEmpty' => true,
'value' => '*pw*,*pass*,community',
- 'label' => $this->translate('Protected Custom Variables'),
- 'description' => $this->translate(
+ 'label' => mt('monitoring', 'Protected Custom Variables'),
+ 'description' => mt('monitoring',
'Comma separated case insensitive list of protected custom variables.'
. ' Use * as a placeholder for zero or more wildcard characters.'
. ' Existance of those custom variables will be shown, but their values will be masked.'
diff --git a/modules/monitoring/application/forms/EventOverviewForm.php b/modules/monitoring/application/forms/EventOverviewForm.php
index dc697b940..25d268f76 100644
--- a/modules/monitoring/application/forms/EventOverviewForm.php
+++ b/modules/monitoring/application/forms/EventOverviewForm.php
@@ -44,7 +44,7 @@ class EventOverviewForm extends Form
'checkbox',
'statechange',
array(
- 'label' => $this->translate('State Changes'),
+ 'label' => t('State Changes'),
'class' => 'autosubmit',
'decorators' => $decorators,
'value' => strpos($url, $this->stateChangeFilter()->toQueryString()) === false ? 0 : 1
@@ -54,7 +54,7 @@ class EventOverviewForm extends Form
'checkbox',
'downtime',
array(
- 'label' => $this->translate('Downtimes'),
+ 'label' => t('Downtimes'),
'class' => 'autosubmit',
'decorators' => $decorators,
'value' => strpos($url, $this->downtimeFilter()->toQueryString()) === false ? 0 : 1
@@ -64,7 +64,7 @@ class EventOverviewForm extends Form
'checkbox',
'comment',
array(
- 'label' => $this->translate('Comments'),
+ 'label' => t('Comments'),
'class' => 'autosubmit',
'decorators' => $decorators,
'value' => strpos($url, $this->commentFilter()->toQueryString()) === false ? 0 : 1
@@ -74,7 +74,7 @@ class EventOverviewForm extends Form
'checkbox',
'notification',
array(
- 'label' => $this->translate('Notifications'),
+ 'label' => t('Notifications'),
'class' => 'autosubmit',
'decorators' => $decorators,
'value' => strpos($url, $this->notificationFilter()->toQueryString()) === false ? 0 : 1
@@ -84,7 +84,7 @@ class EventOverviewForm extends Form
'checkbox',
'flapping',
array(
- 'label' => $this->translate('Flapping'),
+ 'label' => t('Flapping'),
'class' => 'autosubmit',
'decorators' => $decorators,
'value' => strpos($url, $this->flappingFilter()->toQueryString()) === false ? 0 : 1
diff --git a/modules/monitoring/application/forms/Setup/BackendPage.php b/modules/monitoring/application/forms/Setup/BackendPage.php
index b5ab2ffd6..1f6ef6894 100644
--- a/modules/monitoring/application/forms/Setup/BackendPage.php
+++ b/modules/monitoring/application/forms/Setup/BackendPage.php
@@ -20,7 +20,7 @@ class BackendPage extends Form
'note',
'title',
array(
- 'value' => $this->translate('Monitoring Backend', 'setup.page.title'),
+ 'value' => mt('monitoring', 'Monitoring Backend', 'setup.page.title'),
'decorators' => array(
'ViewHelper',
array('HtmlTag', array('tag' => 'h2'))
@@ -31,7 +31,8 @@ class BackendPage extends Form
'note',
'description',
array(
- 'value' => $this->translate(
+ 'value' => mt(
+ 'monitoring',
'Please configure below how Icinga Web 2 should retrieve monitoring information.'
)
)
@@ -43,8 +44,8 @@ class BackendPage extends Form
array(
'required' => true,
'value' => 'icinga',
- 'label' => $this->translate('Backend Name'),
- 'description' => $this->translate('The identifier of this backend')
+ 'label' => mt('monitoring', 'Backend Name'),
+ 'description' => mt('monitoring', 'The identifier of this backend')
)
);
@@ -59,10 +60,8 @@ class BackendPage extends Form
'type',
array(
'required' => true,
- 'label' => $this->translate('Backend Type'),
- 'description' => $this->translate(
- 'The data source used for retrieving monitoring information'
- ),
+ 'label' => mt('monitoring', 'Backend Type'),
+ 'description' => mt('monitoring', 'The data source used for retrieving monitoring information'),
'multiOptions' => $resourceTypes
)
);
diff --git a/modules/monitoring/application/forms/Setup/IdoResourcePage.php b/modules/monitoring/application/forms/Setup/IdoResourcePage.php
index c28b52e6b..189d65fea 100644
--- a/modules/monitoring/application/forms/Setup/IdoResourcePage.php
+++ b/modules/monitoring/application/forms/Setup/IdoResourcePage.php
@@ -28,7 +28,7 @@ class IdoResourcePage extends Form
'note',
'title',
array(
- 'value' => $this->translate('Monitoring IDO Resource', 'setup.page.title'),
+ 'value' => mt('monitoring', 'Monitoring IDO Resource', 'setup.page.title'),
'decorators' => array(
'ViewHelper',
array('HtmlTag', array('tag' => 'h2'))
@@ -39,7 +39,8 @@ class IdoResourcePage extends Form
'note',
'description',
array(
- 'value' => $this->translate(
+ 'value' => mt(
+ 'monitoring',
'Please fill out the connection details below to access'
. ' the IDO database of your monitoring environment.'
)
@@ -90,10 +91,8 @@ class IdoResourcePage extends Form
'skip_validation',
array(
'required' => true,
- 'label' => $this->translate('Skip Validation'),
- 'description' => $this->translate(
- 'Check this to not to validate connectivity with the given database server'
- )
+ 'label' => t('Skip Validation'),
+ 'description' => t('Check this to not to validate connectivity with the given database server')
)
);
}
diff --git a/modules/monitoring/application/forms/Setup/InstancePage.php b/modules/monitoring/application/forms/Setup/InstancePage.php
index 8f151554d..dccfd1d91 100644
--- a/modules/monitoring/application/forms/Setup/InstancePage.php
+++ b/modules/monitoring/application/forms/Setup/InstancePage.php
@@ -20,7 +20,7 @@ class InstancePage extends Form
'note',
'title',
array(
- 'value' => $this->translate('Monitoring Instance', 'setup.page.title'),
+ 'value' => mt('monitoring', 'Monitoring Instance', 'setup.page.title'),
'decorators' => array(
'ViewHelper',
array('HtmlTag', array('tag' => 'h2'))
@@ -31,7 +31,8 @@ class InstancePage extends Form
'note',
'description',
array(
- 'value' => $this->translate(
+ 'value' => mt(
+ 'monitoring',
'Please define the settings specific to your monitoring instance below.'
)
)
diff --git a/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php b/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php
index 245d2abcc..4faa17416 100644
--- a/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php
+++ b/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php
@@ -28,7 +28,7 @@ class LivestatusResourcePage extends Form
'note',
'title',
array(
- 'value' => $this->translate('Monitoring Livestatus Resource', 'setup.page.title'),
+ 'value' => mt('monitoring', 'Monitoring Livestatus Resource', 'setup.page.title'),
'decorators' => array(
'ViewHelper',
array('HtmlTag', array('tag' => 'h2'))
@@ -39,7 +39,8 @@ class LivestatusResourcePage extends Form
'note',
'description',
array(
- 'value' => $this->translate(
+ 'value' => mt(
+ 'monitoring',
'Please fill out the connection details below to access the Livestatus'
. ' socket interface for your monitoring environment.'
)
@@ -90,10 +91,8 @@ class LivestatusResourcePage extends Form
'skip_validation',
array(
'required' => true,
- 'label' => $this->translate('Skip Validation'),
- 'description' => $this->translate(
- 'Check this to not to validate connectivity with the given Livestatus socket'
- )
+ 'label' => t('Skip Validation'),
+ 'description' => t('Check this to not to validate connectivity with the given Livestatus socket')
)
);
}
diff --git a/modules/monitoring/application/forms/Setup/SecurityPage.php b/modules/monitoring/application/forms/Setup/SecurityPage.php
index ba8083e50..0c7d3d1de 100644
--- a/modules/monitoring/application/forms/Setup/SecurityPage.php
+++ b/modules/monitoring/application/forms/Setup/SecurityPage.php
@@ -20,7 +20,7 @@ class SecurityPage extends Form
'note',
'title',
array(
- 'value' => $this->translate('Monitoring Security', 'setup.page.title'),
+ 'value' => mt('monitoring', 'Monitoring Security', 'setup.page.title'),
'decorators' => array(
'ViewHelper',
array('HtmlTag', array('tag' => 'h2'))
@@ -31,7 +31,8 @@ class SecurityPage extends Form
'note',
'description',
array(
- 'value' => $this->translate(
+ 'value' => mt(
+ 'monitoring',
'To protect your monitoring environment against prying eyes please fill out the settings below.'
)
)
diff --git a/modules/monitoring/application/forms/Setup/WelcomePage.php b/modules/monitoring/application/forms/Setup/WelcomePage.php
index f79eb6c62..d910e2e01 100644
--- a/modules/monitoring/application/forms/Setup/WelcomePage.php
+++ b/modules/monitoring/application/forms/Setup/WelcomePage.php
@@ -19,7 +19,10 @@ class WelcomePage extends Form
'note',
'welcome',
array(
- 'value' => $this->translate('Welcome to the configuration of the monitoring module for Icinga Web 2!'),
+ 'value' => mt(
+ 'monitoring',
+ 'Welcome to the configuration of the monitoring module for Icinga Web 2!'
+ ),
'decorators' => array(
'ViewHelper',
array('HtmlTag', array('tag' => 'h2'))
@@ -31,7 +34,7 @@ class WelcomePage extends Form
'note',
'core_hint',
array(
- 'value' => $this->translate('This is the core module for Icinga Web 2.')
+ 'value' => mt('monitoring', 'This is the core module for Icinga Web 2.')
)
);
@@ -39,7 +42,8 @@ class WelcomePage extends Form
'note',
'description',
array(
- 'value' => $this->translate(
+ 'value' => mt(
+ 'monitoring',
'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.'
)
diff --git a/modules/monitoring/application/forms/StatehistoryForm.php b/modules/monitoring/application/forms/StatehistoryForm.php
index d859f5815..9fa1bdc26 100644
--- a/modules/monitoring/application/forms/StatehistoryForm.php
+++ b/modules/monitoring/application/forms/StatehistoryForm.php
@@ -19,7 +19,7 @@ class StatehistoryForm extends Form
public function init()
{
$this->setName('form_event_overview');
- $this->setSubmitLabel($this->translate('Apply'));
+ $this->setSubmitLabel(mt('monitoring', 'Apply'));
}
/**
@@ -65,14 +65,14 @@ class StatehistoryForm extends Form
'select',
'from',
array(
- 'label' => $this->translate('From'),
+ 'label' => mt('monitoring', 'From'),
'value' => $this->getRequest()->getParam('from', strtotime('3 months ago')),
'multiOptions' => array(
- strtotime('midnight 3 months ago') => $this->translate('3 Months'),
- strtotime('midnight 4 months ago') => $this->translate('4 Months'),
- strtotime('midnight 8 months ago') => $this->translate('8 Months'),
- strtotime('midnight 12 months ago') => $this->translate('1 Year'),
- strtotime('midnight 24 months ago') => $this->translate('2 Years')
+ strtotime('midnight 3 months ago') => mt('monitoring', '3 Months'),
+ strtotime('midnight 4 months ago') => mt('monitoring', '4 Months'),
+ strtotime('midnight 8 months ago') => mt('monitoring', '8 Months'),
+ strtotime('midnight 12 months ago') => mt('monitoring', '1 Year'),
+ strtotime('midnight 24 months ago') => mt('monitoring', '2 Years')
),
'class' => 'autosubmit'
)
@@ -81,10 +81,10 @@ class StatehistoryForm extends Form
'select',
'to',
array(
- 'label' => $this->translate('To'),
+ 'label' => mt('monitoring', 'To'),
'value' => $this->getRequest()->getParam('to', time()),
'multiOptions' => array(
- time() => $this->translate('Today')
+ time() => mt('monitoring', 'Today')
),
'class' => 'autosubmit'
)
@@ -95,11 +95,11 @@ class StatehistoryForm extends Form
'select',
'objecttype',
array(
- 'label' => $this->translate('Object type'),
+ 'label' => mt('monitoring', 'Object type'),
'value' => $objectType,
'multiOptions' => array(
- 'services' => $this->translate('Services'),
- 'hosts' => $this->translate('Hosts')
+ 'services' => mt('monitoring', 'Services'),
+ 'hosts' => mt('monitoring', 'Hosts')
),
'class' => 'autosubmit'
)
@@ -113,13 +113,13 @@ class StatehistoryForm extends Form
'select',
'state',
array(
- 'label' => $this->translate('State'),
+ 'label' => mt('monitoring', 'State'),
'value' => $serviceState,
'multiOptions' => array(
- 'cnt_critical_hard' => $this->translate('Critical'),
- 'cnt_warning_hard' => $this->translate('Warning'),
- 'cnt_unknown_hard' => $this->translate('Unknown'),
- 'cnt_ok' => $this->translate('Ok')
+ 'cnt_critical_hard' => mt('monitoring', 'Critical'),
+ 'cnt_warning_hard' => mt('monitoring', 'Warning'),
+ 'cnt_unknown_hard' => mt('monitoring', 'Unknown'),
+ 'cnt_ok' => mt('monitoring', 'Ok')
),
'class' => 'autosubmit'
)
@@ -133,12 +133,12 @@ class StatehistoryForm extends Form
'select',
'state',
array(
- 'label' => $this->translate('State'),
+ 'label' => mt('monitoring', 'State'),
'value' => $hostState,
'multiOptions' => array(
- 'cnt_up' => $this->translate('Up'),
- 'cnt_down_hard' => $this->translate('Down'),
- 'cnt_unreachable_hard' => $this->translate('Unreachable')
+ 'cnt_up' => mt('monitoring', 'Up'),
+ 'cnt_down_hard' => mt('monitoring', 'Down'),
+ 'cnt_unreachable_hard' => mt('monitoring', 'Unreachable')
),
'class' => 'autosubmit'
)