VirtualBox

Ignore:
Timestamp:
Oct 1, 2021 8:57:59 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147192
Message:

Main: bugref:1909: Added missed translation marks, removed redundant ones. Expanded one macro to make the lupdate get string correctly. Removed GuestBase::setErrorExternal and changed calls from it to setErrorBoth to handle translation correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/generic/NetIf-generic.cpp

    r85267 r91503  
    3939#include "ProgressImpl.h"
    4040#include "VirtualBoxImpl.h"
     41#include "VBoxNls.h"
    4142#include "Global.h"
    4243#include "netif.h"
    4344
    4445#define VBOXNETADPCTL_NAME "VBoxNetAdpCtl"
     46
     47DECLARE_TRANSLATION_CONTEXT(NetIfGeneric);
     48
    4549
    4650static int NetIfAdpCtl(const char * pcszIfName, const char *pszAddr, const char *pszOption, const char *pszMask)
     
    204208    {
    205209        hrc = progress->init(pVirtualBox, host,
    206                              "Creating host only network interface",
     210                             NetIfGeneric::tr("Creating host only network interface"),
    207211                             FALSE /* aCancelable */);
    208212        if (SUCCEEDED(hrc))
     
    217221                                           COM_IIDOF(IHostNetworkInterface),
    218222                                           HostNetworkInterface::getStaticComponentName(),
    219                                            "Failed to get program path, vrc=%Rrc\n", vrc);
     223                                           NetIfGeneric::tr("Failed to get program path, vrc=%Rrc\n"), vrc);
    220224                return vrc;
    221225            }
     
    266270                                                       COM_IIDOF(IHostNetworkInterface),
    267271                                                       HostNetworkInterface::getStaticComponentName(),
    268                                                        "Failed to get config info for %s (as reported by '" VBOXNETADPCTL_NAME " add')\n", szBuf);
     272                                                       NetIfGeneric::tr("Failed to get config info for %s (as reported by 'VBoxNetAdpCtl add')\n"),
     273                                                       szBuf);
    269274                        }
    270275                        else
     
    285290                                                   COM_IIDOF(IHostNetworkInterface),
    286291                                                   HostNetworkInterface::getStaticComponentName(),
    287                                                    "Failed to execute '%s' - exit status: %d", szAdpCtl, vrc);
     292                                                   NetIfGeneric::tr("Failed to execute '%s' - exit status: %d"), szAdpCtl, vrc);
    288293                        vrc = VERR_INTERNAL_ERROR;
    289294                    }
     
    295300                                               COM_IIDOF(IHostNetworkInterface),
    296301                                               HostNetworkInterface::getStaticComponentName(),
    297                                                "Failed to execute '%s' (errno %d). Check permissions!",
     302                                               NetIfGeneric::tr("Failed to execute '%s' (errno %d). Check permissions!"),
    298303                                               szAdpCtl, errno);
    299304                    pclose(fp);
     
    307312                                           COM_IIDOF(IHostNetworkInterface),
    308313                                           HostNetworkInterface::getStaticComponentName(),
    309                                            "Failed to execute '%s' (errno %d / %Rrc). Check permissions!",
     314                                           NetIfGeneric::tr("Failed to execute '%s' (errno %d / %Rrc). Check permissions!"),
    310315                                           szAdpCtl, errno, vrc);
    311316            }
     
    352357        Utf8Str strIfName(ifname);
    353358
    354         hrc = progress->init(pVirtualBox, host, "Removing host network interface", FALSE /* aCancelable */);
     359        hrc = progress->init(pVirtualBox, host, NetIfGeneric::tr("Removing host network interface"), FALSE /* aCancelable */);
    355360        if (SUCCEEDED(hrc))
    356361        {
     
    361366                                           COM_IIDOF(IHostNetworkInterface),
    362367                                           HostNetworkInterface::getStaticComponentName(),
    363                                            "Failed to execute '" VBOXNETADPCTL_NAME " %s remove' (%Rrc)",
     368                                           NetIfGeneric::tr("Failed to execute 'VBoxNetAdpCtl %s remove' (%Rrc)"),
    364369                                           strIfName.c_str(), vrc);
    365370            else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette