From b5d6481c1288ee55e1f45735ad03c6d32ea2c4a7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 13 Aug 2014 15:52:33 +0200 Subject: [PATCH] Make it possible to translate the process info view refs #6610 --- .../views/scripts/process/info.phtml | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/modules/monitoring/application/views/scripts/process/info.phtml b/modules/monitoring/application/views/scripts/process/info.phtml index 350966c49..8fb9bd0e3 100644 --- a/modules/monitoring/application/views/scripts/process/info.phtml +++ b/modules/monitoring/application/views/scripts/process/info.phtml @@ -10,28 +10,33 @@ $cf = $this->getHelper('CommandForm');

Backend backendName; ?> -is_currently_running === '1' ? sprintf('has been running with PID %d ', $ps->process_id) . $this->prefixedTimeSince($ps->program_start_time) : 'is not running'; ?>. +is_currently_running === '1' + ? sprintf( + $this->translate('has been running with PID %d '), + $ps->process_id + ) . $this->prefixedTimeSince($ps->program_start_time) + : $this->translate('is not running'); ?>. - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - +
Last status updatetranslate('Last status update'); ?> timeSince($ps->status_update_time) ?> ago
Last check commandtranslate('Last check command'); ?> timeSince($ps->last_command_check) ?> ago
Global host event handlerglobal_host_event_handler ? $ps->global_host_event_handler : 'Not set' ?>translate('Global host event handler'); ?>global_host_event_handler ? $ps->global_host_event_handler : $this->translate('Not set'); ?>
Global service event handlerglobal_service_event_handler ? $ps->global_service_event_handler : 'Not set' ?>translate('Global service event handler'); ?>global_service_event_handler ? $ps->global_service_event_handler : $this->translate('Not set'); ?>
Notifications enabledtranslate('Notifications enabled'); ?> toggleSubmitForm( '', $ps->notifications_enabled, @@ -41,15 +46,18 @@ $cf = $this->getHelper('CommandForm'); array('global' => '1') ) ?> notifications_enabled === '1'): ?> - Temporarily disable + + translate('Temporarily disable'); ?> + disable_notif_expire_time): ?> -Will be re-enabled in timeUntil($ps->disable_notif_expire_time) ?> +translate('Will be re-enabled in %s'), '' . $this->timeUntil($ps->disable_notif_expire_time) . ''); ?>
Execute active service checkstranslate('Execute active service checks'); ?> toggleSubmitForm( '', $ps->active_service_checks_enabled, @@ -60,7 +68,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Accept passive service checkstranslate('Accept passive service checks'); ?> toggleSubmitForm( '', $ps->passive_service_checks_enabled, @@ -71,7 +79,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Execute active host checkstranslate('Execute active host checks'); ?> toggleSubmitForm( '', $ps->active_host_checks_enabled, @@ -82,7 +90,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Accept passive host checkstranslate('Accept passive host checks'); ?> toggleSubmitForm( '', $ps->passive_host_checks_enabled, @@ -93,7 +101,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Eventhandlers enabledtranslate('Eventhandlers enabled'); ?> toggleSubmitForm( '', $ps->event_handlers_enabled, @@ -104,7 +112,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Obsessing over host checkstranslate('Obsessing over host checks'); ?> toggleSubmitForm( '', $ps->obsess_over_hosts, @@ -115,7 +123,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Obsessing over service checkstranslate('Obsessing over service checks'); ?> toggleSubmitForm( '', $ps->obsess_over_services, @@ -126,7 +134,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Flap detection enabledtranslate('Flap detection enabled'); ?> toggleSubmitForm( '', $ps->flap_detection_enabled, @@ -137,7 +145,7 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Process performance datatranslate('Process performance data'); ?> toggleSubmitForm( '', $ps->process_performance_data, @@ -148,17 +156,17 @@ Will be re-enabled in timeUntil($ps->disable_notif_expire_tim ) ?>
Monitoring Processtranslate('Monitoring Process'); ?> labelSubmitForm( - 'Restart', - 'Restart the monitoring process', + $this->translate('Restart'), + $this->translate('Restart the monitoring process'), '', 'restartprocess' ) ?>