Fix localized strings for network management
authorMichal Novotny <minovotn@redhat.com>
Mon, 8 Aug 2011 12:57:17 +0000 (14:57 +0200)
committerMichal Novotny <minovotn@redhat.com>
Mon, 8 Aug 2011 12:57:17 +0000 (14:57 +0200)
Signed-off-by: Michal Novotny <minovotn@redhat.com>

classes/language.php
lang/cs.php
lang/en.php
pages/details/network-devices.php
pages/new-net.php

index e079697..e11127d 100644 (file)
                                        'create-new-vm' => 'Create a new VM',
                                        'install-image' => 'Install image',
                                        'create-vm' => 'Create VM',
+                                       'create-net' => 'Create network',
                                        'clock-offset' => 'Clock offset',
                                        'features' => 'Features',
                                        'setup' => 'Setup',
                                        'net_forward_nat' => 'NAT',
                                        'net_forward_route' => 'Route',
                                        'net_created' => 'Network has been created successfully',
+                                       'network-add-ok' => 'Network card has been successfully added to the guest. Changes will take effect on next domain startup.',
+                                       'network-add-error' => 'Cannot add NIC to the guest',
+                                       'network-remove-ok' => 'Network card has been removed successfully. Changes will take effect on next domain startup.',
+                                       'network-remove-error' => 'Cannot remove disk',
                                        );
 
                        $this->trans = $trans;
index 809437d..9c4ee7e 100644 (file)
                                        'create-new-vm' => 'Vytvořit nový virtuální stroj',
                                        'install-image' => 'Instalační obraz',
                                        'create-vm' => 'Vytvořit VM',
+                                       'create-net' => 'Vytvořit síť̈́',
                                        'clock-offset' => 'Hodinový offset',
                                        'features' => 'Vlastnosti',
                                        'setup' => 'Nastavit',
                                        'net_forward_nat' => 'NAT',
                                        'net_forward_route' => 'Route',
                                        'net_created' => 'Síť byla vytvořena úspěšně',
+                                       'network-add-ok' => 'Síťová karta byla úspěšně přidána. Změny se projeví po dalším restartu domény.',
+                                       'network-add-error' => 'Nelze přidat síťovou kartu do domény',
+                                       'network-remove-ok' => 'Síťové karta byla úspěšně odebrána. Změny se projeví po dalším restartu domény.',
+                                       'network-remove-error' => 'Nelze odebrat síťovou kartu',
                                        );
 ?>
index 734f27d..a340550 100644 (file)
                                        'create-new-vm' => 'Create a new VM',
                                        'install-image' => 'Install image',
                                        'create-vm' => 'Create VM',
+                                       'create-net' => 'Create network',
                                        'clock-offset' => 'Clock offset',
                                        'features' => 'Features',
                                        'setup' => 'Setup',
                                        'net_forward_nat' => 'NAT',
                                        'net_forward_route' => 'Route',
                                        'net_created' => 'Network has been created successfully',
+                                       'network-add-ok' => 'Network card has been successfully added to the guest. Changes will take effect on next domain startup.',
+                                       'network-add-error' => 'Cannot add NIC to the guest',
+                                       'network-remove-ok' => 'Network card has been removed successfully. Changes will take effect on next domain startup.',
+                                       'network-remove-error' => 'Cannot remove disk',
                                        );
 ?>
index 6fcce9b..4646eb5 100644 (file)
@@ -5,14 +5,13 @@
   $msg = '';
   $frm = '';
   if (($action == 'del-nic') && ($dev)) {
-    $msg = $lv->domain_nic_remove($name, base64_decode($dev)) ? 'Network card has been removed successfully' :
-               'Cannot remove disk: '.$lv->get_last_error();
+    $msg = $lv->domain_nic_remove($name, base64_decode($dev)) ? $lang->get('network-remove-ok') :
+                               $lang->get('network-remove-error').': '.$lv->get_last_error();
   }
   if ($action == 'add-nic') {
     if (array_key_exists('mac', $_POST))
         $msg = $lv->domain_nic_add($name, $_POST['mac'], $_POST['network'], $_POST['nic_type']) ?
-                                       'Network card has been successfully added to the guest' :
-                                       'Cannot add NIC to the guest: '.$lv->get_last_error();
+                                       $lang->get('network-add-ok') : $lang->get('network-add-error').': '.$lv->get_last_error();
     else {
        $nets = $lv->get_networks();
        $models = $lv->get_nic_models();
index dec1aeb..3bf5acd 100644 (file)
 
 <tr align="center">
     <td colspan="2">
-    <input type="submit" value=" <?= $lang->get('create-vm') ?> " />
+    <input type="submit" value=" <?= $lang->get('create-net') ?> " />
     </td>
 </tr>