]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/setup/networking.c
pakfire: use correct tree on x86_64.
[ipfire-2.x.git] / src / setup / networking.c
index edd3c71af0d60560c64b0f41616640c1eb3c60cd..0791764ebddaab149397557ccaf090edbc65a0d9 100644 (file)
@@ -7,7 +7,11 @@
  * The big one: networking. 
  * 
  */
+
+// Translation
+#include <libintl.h>
+#define _(x) dgettext("setup", x)
+
 #include "setup.h"
 
 #define DNS1 0
@@ -18,8 +22,6 @@
 extern FILE *flog;
 extern char *mylog;
 
-extern char **ctr;
-
 extern int automode;
 
 #define HAS_GREEN 1
@@ -105,17 +107,16 @@ int handlenetworking(void)
                if (netaddresschange)
                {
                        runcommandwithstatus("/etc/rc.d/init.d/network stop",
-                               ctr[TR_PUSHING_NETWORK_DOWN]);
+                               _("Networking"), _("Stopping network..."), NULL);
 
                        rename_nics();
 
                        runcommandwithstatus("/etc/rc.d/init.d/network start",
-                               ctr[TR_PULLING_NETWORK_UP]);
+                               _("Networking"), _("Restarting network..."), NULL);
                }
        } else {
                rename_nics();
        }
-       create_udev();
        return 1;
 }
 
@@ -129,7 +130,7 @@ int oktoleave(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }       
 
@@ -141,13 +142,13 @@ int oktoleave(void)
                strcpy(temp, ""); findkey(kv, "GREEN_DEV", temp);
                if (!(strlen(temp)))
                {
-                       errorbox(ctr[TR_NO_GREEN_INTERFACE]);
+                       errorbox(_("No GREEN interface assigned."));
                        freekeyvalues(kv);
                        return 0;
                }
                if (!(interfacecheck(kv, "GREEN")))
                {
-                       errorbox(ctr[TR_MISSING_GREEN_IP]);
+                       errorbox(_("Missing an IP address on GREEN."));
                        freekeyvalues(kv);
                        return 0;
                }
@@ -158,7 +159,8 @@ int oktoleave(void)
                strcpy(temp, ""); findkey(kv, "RED_DEV", temp);
                if (!(strlen(temp)))
                {
-                       rc = newtWinChoice(ctr[TR_ERROR], ctr[TR_OK], ctr[TR_IGNORE], ctr[TR_NO_RED_INTERFACE]);
+                       rc = newtWinChoice(_("Error"), _("OK"), _("Ignore"),
+                               _("No RED interface assigned."));
                        if (rc == 0 || rc == 1)
                        {
                                freekeyvalues(kv);
@@ -167,7 +169,7 @@ int oktoleave(void)
                }
                if (!(interfacecheck(kv, "RED")))
                {
-                       errorbox(ctr[TR_MISSING_RED_IP]);
+                       errorbox(_("Missing an IP address on RED."));
                        freekeyvalues(kv);
                        return 0;
                }
@@ -177,13 +179,13 @@ int oktoleave(void)
                strcpy(temp, ""); findkey(kv, "ORANGE_DEV", temp);
                if (!(strlen(temp)))
                {
-                       errorbox(ctr[TR_NO_ORANGE_INTERFACE]);
+                       errorbox(_("No ORANGE interface assigned."));
                        freekeyvalues(kv);
                        return 0;
                }
                if (!(interfacecheck(kv, "ORANGE")))
                {
-                       errorbox(ctr[TR_MISSING_ORANGE_IP]);
+                       errorbox(_("Missing an IP address on ORANGE."));
                        freekeyvalues(kv);
                        return 0;
                }
@@ -193,13 +195,13 @@ int oktoleave(void)
                strcpy(temp, ""); findkey(kv, "BLUE_DEV", temp);
                if (!(strlen(temp)))
                {
-                       errorbox(ctr[TR_NO_BLUE_INTERFACE]);
+                       errorbox(_("No BLUE interface assigned."));
                        freekeyvalues(kv);
                        return 0;
                }
                if (!(interfacecheck(kv, "BLUE")))
                {
-                       errorbox(ctr[TR_MISSING_BLUE_IP]);
+                       errorbox(_("Missing an IP address on BLUE."));
                        freekeyvalues(kv);
                        return 0;
                }
@@ -211,14 +213,14 @@ int oktoleave(void)
                strcpy(temp, ""); findkey(kv, "DNS1", temp);
                if (!(strlen(temp)))
                {
-                       errorbox(ctr[TR_MISSING_DNS]);
+                       errorbox(_("Misssing DNS."));
                        freekeyvalues(kv);
                        return 0;
                }
                strcpy(temp, ""); findkey(kv, "DEFAULT_GATEWAY", temp);
                if (!(strlen(temp)))
                {
-                       errorbox(ctr[TR_MISSING_DEFAULT]);
+                       errorbox(_("Missing Default Gateway."));
                        freekeyvalues(kv);
                        return 0;
                }
@@ -230,10 +232,13 @@ int oktoleave(void)
 /* Shows the main menu and a summary of the current settings. */
 int firstmenu(void)
 {
-       char *sections[] = { ctr[TR_NETWORK_CONFIGURATION_TYPE],
-               ctr[TR_DRIVERS_AND_CARD_ASSIGNMENTS],
-               ctr[TR_ADDRESS_SETTINGS],
-               ctr[TR_DNS_AND_GATEWAY_SETTINGS], NULL };
+       char *sections[] = {
+               _("Network configuration type"),
+               _("Drivers and card assignments"),
+               _("Address settings"),
+               _("DNS and Gateway settings"),
+               NULL
+       };
        int rc;
        static int choice = 0;
        struct keyvalue *kv = initkeyvalues();
@@ -246,22 +251,21 @@ int firstmenu(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }       
 
        if (netaddresschange) 
-               strcpy(networkrestart, ctr[TR_RESTART_REQUIRED]);
+               strcpy(networkrestart, _("When configuration is complete, a network restart will be required."));
 
        strcpy(temp, ""); findkey(kv, "CONFIG_TYPE", temp); 
        x = atol(temp);
        x--;
        if (x < 0 || x > 4) x = 0;
        /* Format heading bit. */
-       snprintf(message, 1000, ctr[TR_CURRENT_CONFIG], configtypenames[x],
-               networkrestart);
-       rc = newtWinMenu(ctr[TR_NETWORK_CONFIGURATION_MENU], message, 50, 5, 5, 6,
-                       sections, &choice, ctr[TR_OK], ctr[TR_DONE], NULL);
+       snprintf(message, 1000, _("Current config: %s\n\n%s"), configtypenames[x], networkrestart);
+       rc = newtWinMenu(_("Network configuration menu"), message, 50, 5, 5, 6,
+                       sections, &choice, _("OK"), _("Done"), NULL);
 
        if (rc == 0 || rc == 1)
                result = choice + 1;
@@ -283,7 +287,7 @@ int configtypemenu(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }
 
@@ -292,11 +296,15 @@ int configtypemenu(void)
        findkey(kv, "CONFIG_TYPE", temp); choise = atol(temp);
        choise--;
 
-               sprintf(message, ctr[TR_NETWORK_CONFIGURATION_TYPE_LONG], NAME);
-               rc = newtWinMenu(ctr[TR_NETWORK_CONFIGURATION_TYPE], message, 50, 5, 5,
-                       6, configtypenames, &choise, ctr[TR_OK], ctr[TR_CANCEL], NULL);
+               sprintf(message, _("Select the network configuration for %s. "
+                       "The following configuration types list those interfaces which have ethernet attached. "
+                       "If you change this setting, a network restart will be required, and you will have to "
+                       "reconfigure the network driver assignments."), NAME);
+               rc = newtWinMenu(_("Network configuration type"), message, 50, 5, 5,
+                       6, configtypenames, &choise, _("OK"), _("Cancel"), NULL);
                if ( configtypecards[choise] > found ) {
-                       sprintf(message, ctr[TR_NOT_ENOUGH_INTERFACES] , configtypecards[choise], found);
+                       sprintf(message, _("Not enough netcards for your choice.\n\nNeeded: %d - Available: %d\n"),
+                               configtypecards[choise], found);
                        errorbox(message);
                }
 
@@ -334,7 +342,7 @@ int drivermenu(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }
 
@@ -347,42 +355,43 @@ int drivermenu(void)
                writekeyvalues(kv, CONFIG_ROOT "/ethernet/settings");
        }
 
-       strcpy(message, ctr[TR_CONFIGURE_NETWORK_DRIVERS]);
+       strcpy(message, _("Configure network drivers, and which interface each card is assigned to. "
+               "The current configuration is as follows:\n\n"));
 
        kcount = 0;
        neednics = 0;
        if (HAS_GREEN) {
-               sprintf(temp, "GREEN:  %s\n", knics[_GREEN_CARD_].description);
+               sprintf(temp, "%-6s: %s\n", "GREEN", knics[_GREEN_CARD_].description);
                strcat(message, temp);
                if (strlen(knics[_GREEN_CARD_].macaddr) ) {
-                       sprintf(temp, "GREEN:  (%s) %s green0\n", knics[_GREEN_CARD_].macaddr, ctr[TR_AS]);
+                       sprintf(temp, "%-6s: (%s)\n", "GREEN", knics[_GREEN_CARD_].macaddr);
                        strcat(message, temp);
                }
                neednics++;
        }
        if (HAS_RED) {
-               sprintf(temp, "RED:    %s\n", knics[_RED_CARD_].description);
+               sprintf(temp, "%-6s: %s\n", "RED", knics[_RED_CARD_].description);
                strcat(message, temp);
                if (strlen(knics[_RED_CARD_].macaddr) ) {
-                       sprintf(temp, "RED:    (%s) %s red0\n", knics[_RED_CARD_].macaddr, ctr[TR_AS]);
+                       sprintf(temp, "%-6s: (%s)\n", "RED", knics[_RED_CARD_].macaddr);
                        strcat(message, temp);
                }
                neednics++;
        }
        if (HAS_ORANGE) {
-               sprintf(temp, "ORANGE: %s\n", knics[_ORANGE_CARD_].description);
+               sprintf(temp, "%-6s: %s\n", "ORANGE", knics[_ORANGE_CARD_].description);
                strcat(message, temp);
                if ( strlen(knics[_ORANGE_CARD_].macaddr) ) {
-                       sprintf(temp, "ORANGE: (%s) %s orange0\n", knics[_ORANGE_CARD_].macaddr, ctr[TR_AS]);
+                       sprintf(temp, "%-6s: (%s)\n", "ORANGE", knics[_ORANGE_CARD_].macaddr);
                        strcat(message, temp);
                }
                neednics++;
        }
        if (HAS_BLUE) {
-               sprintf(temp, "BLUE:   %s\n", knics[_BLUE_CARD_].description);
+               sprintf(temp, "%-6s: %s\n", "BLUE", knics[_BLUE_CARD_].description);
                strcat(message, temp);
                if (strlen(knics[_BLUE_CARD_].macaddr)) {
-                       sprintf(temp, "BLUE:   (%s) %s blue0\n", knics[_BLUE_CARD_].macaddr, ctr[TR_AS]);
+                       sprintf(temp, "%-6s: (%s)\n", "BLUE", knics[_BLUE_CARD_].macaddr);
                        strcat(message, temp);
                }
                neednics++;
@@ -394,9 +403,10 @@ int drivermenu(void)
 
        if (neednics = kcount)
        {
-               strcat(message, ctr[TR_DO_YOU_WISH_TO_CHANGE_THESE_SETTINGS]);
-               rc = newtWinChoice(ctr[TR_DRIVERS_AND_CARD_ASSIGNMENTS], ctr[TR_OK],
-               ctr[TR_CANCEL], message);
+               strcat(message, "\n");
+               strcat(message, _("Do you wish to change these settings?"));
+               rc = newtWinChoice(_("Drivers and card assignments"), _("OK"),
+                       _("Cancel"), message);
                if (rc == 0 || rc == 1)
                {
                        changedrivers();
@@ -428,12 +438,12 @@ int changedrivers(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }
        if (automode == 0)
                runcommandwithstatus("/etc/rc.d/init.d/network stop red blue orange",
-                       ctr[TR_PUSHING_NON_LOCAL_NETWORK_DOWN]);
+                       _("Networking"), _("Restarting non-local network..."), NULL);
 
        findkey(kv, "CONFIG_TYPE", temp); configtype = atol(temp);
        if (configtype == 1)
@@ -450,16 +460,16 @@ int changedrivers(void)
        do
        {
                count = 0;
-               strcpy(message, ctr[TR_INTERFACE_CHANGE]);
+               strcpy(message, _("Please choose the interface you wish to change.\n\n"));
 
                if (green) {
                        strcpy(MenuInhalt[count], "GREEN");
                        pMenuInhalt[count] = MenuInhalt[count];
                        NicEntry[_GREEN_CARD_] = count;
-                       sprintf(temp, "GREEN:  %s\n", knics[_GREEN_CARD_].description);
+                       sprintf(temp, "%-6s: %s\n", "GREEN", knics[_GREEN_CARD_].description);
                        strcat(message, temp);
                        if ( strlen(knics[_GREEN_CARD_].macaddr) ) {
-                               sprintf(temp, "GREEN:  (%s) %s green0\n", knics[_GREEN_CARD_].macaddr, ctr[TR_AS]);
+                               sprintf(temp, "%-6s: (%s)\n", "GREEN", knics[_GREEN_CARD_].macaddr);
                                strcat(message, temp);
                        }
                        count++;
@@ -469,10 +479,10 @@ int changedrivers(void)
                        strcpy(MenuInhalt[count], "RED");
                        pMenuInhalt[count] = MenuInhalt[count];
                        NicEntry[_RED_CARD_] = count;
-                       sprintf(temp, "RED:    %s\n", knics[_RED_CARD_].description);
+                       sprintf(temp, "%-6s: %s\n", "RED", knics[_RED_CARD_].description);
                        strcat(message, temp);
                        if ( strlen(knics[_RED_CARD_].macaddr) ) {
-                               sprintf(temp, "RED:    (%s) %s red0\n", knics[_RED_CARD_].macaddr, ctr[TR_AS]);
+                               sprintf(temp, "%-6s: (%s)\n", "RED", knics[_RED_CARD_].macaddr);
                                strcat(message, temp);
                        }
                        count++;
@@ -482,10 +492,10 @@ int changedrivers(void)
                        strcpy(MenuInhalt[count], "ORANGE");
                        pMenuInhalt[count] = MenuInhalt[count];
                        NicEntry[_ORANGE_CARD_] = count;
-                       sprintf(temp, "ORANGE: %s\n", knics[_ORANGE_CARD_].description);
+                       sprintf(temp, "%-6s: %s\n", "ORANGE", knics[_ORANGE_CARD_].description);
                        strcat(message, temp);
                        if ( strlen(knics[_ORANGE_CARD_].macaddr) ) {
-                               sprintf(temp, "ORANGE: (%s) %s orange0\n", knics[_ORANGE_CARD_].macaddr, ctr[TR_AS]);
+                               sprintf(temp, "%-6s: (%s)\n", "ORANGE", knics[_ORANGE_CARD_].macaddr);
                                strcat(message, temp);
                        }
                        count++;
@@ -495,17 +505,18 @@ int changedrivers(void)
                        strcpy(MenuInhalt[count], "BLUE");
                        pMenuInhalt[count] = MenuInhalt[count];
                        NicEntry[_BLUE_CARD_] = count;
-                       sprintf(temp, "BLUE:   %s\n", knics[_BLUE_CARD_].description);
+                       sprintf(temp, "%-6s: %s\n", "BLUE", knics[_BLUE_CARD_].description);
                        strcat(message, temp);
                        if ( strlen(knics[_BLUE_CARD_].macaddr) ) {
-                               sprintf(temp, "BLUE:   (%s) %s blue0\n", knics[_BLUE_CARD_].macaddr, ctr[TR_AS]);
+                               sprintf(temp, "%-6s: (%s)\n", "BLUE", knics[_BLUE_CARD_].macaddr);
                                strcat(message, temp);
                        }
                        count++;
                }
                pMenuInhalt[count] = NULL;
 
-               rc = newtWinMenu( ctr[TR_NETCARD_COLOR], message, 70, 5, 5, 6, pMenuInhalt, &choise, ctr[TR_SELECT], ctr[TR_REMOVE], ctr[TR_DONE], NULL);
+               rc = newtWinMenu(_("Assigned Cards"), message, 70, 5, 5, 6, pMenuInhalt,
+                       &choise, _("Select"), _("Remove"), _("Done"), NULL);
                        
                if ( rc == 0 || rc == 1) {
                        if ((green) && ( choise == NicEntry[0])) nicmenu(_GREEN_CARD_);
@@ -537,12 +548,15 @@ int greenaddressmenu(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }
 
-       sprintf(message, ctr[TR_WARNING_LONG], NAME);
-       rc = newtWinChoice(ctr[TR_WARNING], ctr[TR_OK], ctr[TR_CANCEL], message);
+       sprintf(message, _("If you change this IP address, and you are logged in remotely, "
+               "your connection to the %s machine will be broken, and you will have to reconnect "
+               "on the new IP. This is a risky operation, and should only be attempted if you "
+               "have physical access to the machine, should something go wrong."), NAME);
+       rc = newtWinChoice(_("Warning"), _("OK"), _("Cancel"), message);
        
        if (rc == 0 || rc == 1)
        {
@@ -585,14 +599,14 @@ int addressesmenu(void)
        {
                freekeyvalues(kv);
                freekeyvalues(mainkv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }
        if (!(readkeyvalues(mainkv, CONFIG_ROOT "/main/settings")))
        {
                freekeyvalues(kv);
                freekeyvalues(mainkv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }
 
@@ -622,18 +636,20 @@ int addressesmenu(void)
        done = 0;       
        while (!done)
        {
-               rc = newtWinMenu(ctr[TR_ADDRESS_SETTINGS],
-                       ctr[TR_SELECT_THE_INTERFACE_YOU_WISH_TO_RECONFIGURE], 50, 5,
-                       5, 6, sections, &choice, ctr[TR_OK], ctr[TR_DONE], NULL);       
+               rc = newtWinMenu(_("Address settings"),
+                       _("Select the interface you wish to reconfigure."), 50, 5,
+                       5, 6, sections, &choice, _("OK"), _("Done"), NULL);     
 
                if (rc == 0 || rc == 1)
                {
                        if (strcmp(sections[choice], "GREEN") == 0)
                        {
                                findkey(kv, "GREEN_ADDRESS", oldgreenaddress);
-                               sprintf(message, ctr[TR_WARNING_LONG], NAME);
-                               rc = newtWinChoice(ctr[TR_WARNING], ctr[TR_OK], ctr[TR_CANCEL],
-                                       message);
+                               sprintf(message, _("If you change this IP address, and you are logged in remotely, "
+                                       "your connection to the %s machine will be broken, and you will have to reconnect "
+                                       "on the new IP. This is a risky operation, and should only be attempted if you "
+                                       "have physical access to the machine, should something go wrong."), NAME);
+                               rc = newtWinChoice(_("Warning"), _("OK"), _("Cancel"), message);
                                if (rc == 0 || rc == 1)
                                {
                                        if (changeaddress(kv, "GREEN", 0, ""))
@@ -693,23 +709,23 @@ int dnsgatewaymenu(void)
        if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
        {
                freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
+               errorbox(_("Unable to open settings file"));
                return 0;
        }
 
-       entries[DNS1].text = ctr[TR_PRIMARY_DNS];
+       entries[DNS1].text = _("Primary DNS:");
        strcpy(temp, ""); findkey(kv, "DNS1", temp);
        values[DNS1] = strdup(temp);
        entries[DNS1].value = &values[DNS1];
        entries[DNS1].flags = 0;
        
-       entries[DNS2].text = ctr[TR_SECONDARY_DNS];
+       entries[DNS2].text = _("Secondary DNS:");
        strcpy(temp, ""); findkey(kv, "DNS2", temp);
        values[DNS2] = strdup(temp);
        entries[DNS2].value = &values[DNS2];
        entries[DNS2].flags = 0;
        
-       entries[DEFAULT_GATEWAY].text = ctr[TR_DEFAULT_GATEWAY];
+       entries[DEFAULT_GATEWAY].text = _("Default gateway:");
        strcpy(temp, ""); findkey(kv, "DEFAULT_GATEWAY", temp);
        values[DEFAULT_GATEWAY] = strdup(temp);
        entries[DEFAULT_GATEWAY].value = &values[DEFAULT_GATEWAY];
@@ -723,17 +739,20 @@ int dnsgatewaymenu(void)
        {
                error = 0;
                
-               rc = newtWinEntries(ctr[TR_DNS_AND_GATEWAY_SETTINGS], 
-                       ctr[TR_DNS_AND_GATEWAY_SETTINGS_LONG], 50, 5, 5, 18, entries,
-                       ctr[TR_OK], ctr[TR_CANCEL], NULL);
+               rc = newtWinEntries(_("DNS and Gateway settings"),
+                       _("Enter the DNS and gateway information. "
+                       "These settings are used only with Static IP (and DHCP if DNS set) on the RED interface."),
+                       50, 5, 5, 18, entries, _("OK"), _("Cancel"), NULL);
                if (rc == 0 || rc == 1)
                {
-                       strcpy(message, ctr[TR_INVALID_FIELDS]);
+                       strcpy(message, _("The following fields are invalid:"));
+                       strcpy(message, "\n\n");
                        if (strlen(values[DNS1]))
                        {
                                if (inet_addr(values[DNS1]) == INADDR_NONE)
                                {
-                                       strcat(message, ctr[TR_PRIMARY_DNS_CR]);
+                                       strcat(message, _("Primary DNS"));
+                                       strcat(message, "\n");
                                        error = 1;
                                }
                        }
@@ -741,7 +760,8 @@ int dnsgatewaymenu(void)
                        {
                                if (inet_addr(values[DNS2]) == INADDR_NONE)
                                {
-                                       strcat(message, ctr[TR_SECONDARY_DNS_CR]);
+                                       strcat(message, _("Secondary DNS"));
+                                       strcat(message, "\n");
                                        error = 1;
                                }
                        }
@@ -749,13 +769,15 @@ int dnsgatewaymenu(void)
                        {
                                if (inet_addr(values[DEFAULT_GATEWAY]) == INADDR_NONE)
                                {
-                                       strcat(message, ctr[TR_DEFAULT_GATEWAY_CR]);
+                                       strcat(message, _("Default gateway"));
+                                       strcat(message, "\n");
                                        error = 1;
                                }
                        }
                        if (!strlen(values[DNS1]) && strlen(values[DNS2]))
                        {
-                               strcpy(message, ctr[TR_SECONDARY_WITHOUT_PRIMARY_DNS]);
+                               strcpy(message, _("Secondary DNS specified without a Primary DNS"));
+                               strcat(message, "\n");
                                error = 1;
                        }