From 2af587476d8509ddb4d119f61424d82c49b0695e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 29 Sep 2015 15:22:36 +0200 Subject: [systemstatus] i18n of storage mount error strings --- modules/systemstatus.inc.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/systemstatus.inc.php') diff --git a/modules/systemstatus.inc.php b/modules/systemstatus.inc.php index 0106ab9d..253b0849 100644 --- a/modules/systemstatus.inc.php +++ b/modules/systemstatus.inc.php @@ -104,27 +104,27 @@ class Page_SystemStatus extends Page ); } } + $data = array( + 'store' => $storeUsage, + 'system' => $systemUsage + ); // Determine if proper vm store is being used - if ($store === '') - $storeError = false; - else - $storeError = 'VM-Store nicht eingebunden! Erwartet: ' . $store; + if ($store !== '') { + $data['storeMissing'] = $store; + } foreach ($task['data']['list'] as $entry) { - if ($entry['mountPoint'] === CONFIG_VMSTORE_DIR && $store !== $entry['fileSystem']) { - $storeError = 'Falscher VM-Store eingebunden! Erwartet: ' . $store . ' vorgefunden: ' . $entry['fileSystem']; + if ($entry['mountPoint'] !== CONFIG_VMSTORE_DIR) + continue; + if ($store !== $entry['fileSystem']) { + $data['wrongStore'] = $entry['fileSystem']; break; - } elseif ($entry['mountPoint'] === CONFIG_VMSTORE_DIR) { - $storeError = false; } + $data['storeMissing'] = false; } } else { - $storeError = 'Storage not configured'; + $data['notConfigured'] = true; } - echo Render::parse('systemstatus/diskstat', array( - 'store' => $storeUsage, - 'system' => $systemUsage, - 'storeError' => $storeError - )); + echo Render::parse('systemstatus/diskstat', $data); } protected function ajaxAddressList() -- cgit v1.2.3-55-g7522