diff --git a/plugins/dynamix.docker.manager/include/DockerContainers.php b/plugins/dynamix.docker.manager/include/DockerContainers.php index aeb4bddbf..07252325e 100644 --- a/plugins/dynamix.docker.manager/include/DockerContainers.php +++ b/plugins/dynamix.docker.manager/include/DockerContainers.php @@ -13,10 +13,6 @@ ?> "._('No Docker containers installed').""; + echo "No Docker containers installed"; return; } @@ -48,13 +44,6 @@ $menu = []; $autostart = @file($autostart_file, FILE_IGNORE_NEW_LINES) ?: []; $names = array_map('var_split', $autostart); -function my_lang_log($text) { - global $language; - if (isset($language['healthy'])) $text = str_replace('healthy',$language['healthy'],$text); - if (isset($language['Exited'])) $text = str_replace('Exited',$language['Exited'],$text); - return my_lang(my_lang(_($text),2)); -} - foreach ($containers as $ct) { $name = $ct['Name']; $id = $ct['Id']; @@ -76,7 +65,7 @@ foreach ($containers as $ct) { $color = $status=='started' ? 'green-text' : ($status=='paused' ? 'orange-text' : 'red-text'); $update = $updateStatus==1 ? 'blue-text' : ''; $icon = $info['icon'] ?: '/plugins/dynamix.docker.manager/images/question.png'; - $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); + $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); $wait = var_split($autostart[array_search($name,$names)],1); $ports = []; foreach ($ct['Ports'] as $port) { @@ -96,12 +85,12 @@ foreach ($containers as $ct) { } else { $appname = htmlspecialchars($name); } - echo "$image$appname
"._($status)."
"; - echo ""._('Container ID').": $id
"; + echo "$image$appname
$status
"; + echo "Container ID: $id
"; if ($ct['BaseImage']) echo "".htmlspecialchars(${ct['BaseImage']})."
"; - echo _('By').": "; + echo "By: "; $registry = $info['registry']; - [$author,$version] = explode(':',$ct['Image']); + list($author,$version) = explode(':',$ct['Image']); if ($registry) { echo "".htmlspecialchars($author).""; } else { @@ -110,42 +99,42 @@ foreach ($containers as $ct) { echo "
"; switch ($updateStatus) { case 0: - echo " "._('up-to-date').""; - echo "
"._('force update')."
"; + echo " up-to-date"; + echo "
force update
"; break; case 1: - echo "
"._('update ready')."
"; - echo " "._('apply update').""; + echo "
update ready
"; + echo " apply update"; break; case 2: - echo "
".('rebuild ready')."
"; - echo " "._('rebuilding').""; + echo "
rebuild ready
"; + echo " rebuilding"; break; default: - echo " "._('not available').""; - echo "
"._('force update')."
"; + echo " not available"; + echo "
force update
"; break; } - echo "
"._($version)."
"; + echo "
$version
"; echo "{$ct['NetworkMode']}"; echo "".implode('
',$ports)."
"; echo "".implode('
',$paths)."
"; echo "0%
"; echo "
0 / 0"; echo ""; - echo ""; + echo ""; echo "
"; - echo htmlspecialchars(str_replace('Up',_('Uptime'),my_lang_log($ct['Status'])))."
"._('Created')." ".htmlspecialchars(my_lang($ct['Created']))."
"; + echo htmlspecialchars(str_replace('Up','Uptime',$ct['Status']))."
Created ".htmlspecialchars($ct['Created'])."
"; } foreach ($images as $image) { if (count($image['usedBy'])) continue; $id = $image['Id']; $menu[] = sprintf("addDockerImageContext('%s','%s');", $id, implode(',',$image['Tags'])); echo ""; - echo "("._('orphan image').")
"._('stopped')."
"; - echo ""._('Image ID').": $id
"; + echo "(orphan image)
stopped
"; + echo "Image ID: $id
"; echo implode(', ',array_map('htmlspecialchars',$image['Tags'])); - echo ""._('Created')." ".htmlspecialchars(my_lang($image['Created'])).""; + echo "Created ".htmlspecialchars($image['Created']).""; } echo "\0".implode($menu).implode($docker)."\0".(pgrep('rc.docker')!==false ? 1:0); ?> diff --git a/plugins/dynamix/include/DashboardApps.php b/plugins/dynamix/include/DashboardApps.php index 3411f02a2..10153c5cd 100644 --- a/plugins/dynamix/include/DashboardApps.php +++ b/plugins/dynamix/include/DashboardApps.php @@ -1,7 +1,7 @@ " : (substr($icon,0,5)=='icon-' ? "" : ""); - echo "$image$name
"._($status)."
"; + $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); + echo "$image$name
$status
"; } - $none = count($containers) ? _('No running docker containers') : _('No docker containers defined'); + $none = count($containers) ? "No running docker containers" : "No docker containers defined"; echo ""; echo ""; } @@ -112,9 +108,9 @@ if ($_POST['vms'] && ($display=='icons' || $display=='vms')) { break; } $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); - echo "$image$vm
"._($status)."
"; + echo "$image$vm
$status
"; } - $none = count($vms) ? _('No running virtual machines') : _('No virtual machines defined'); + $none = count($vms) ? "No running virtual machines" : "No virtual machines defined"; echo ""; echo ""; }