VirtualBox

Changeset 95913 in vbox


Ignore:
Timestamp:
Jul 28, 2022 2:21:17 PM (2 years ago)
Author:
vboxsync
Message:

FE/Qt/Ds: Fixing redundant NLS contexts for network manager stuff.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetCloudNetwork.cpp

    r94027 r95913  
    3737#include "UIIconPool.h"
    3838#include "UIMessageCenter.h"
     39#include "UINetworkManager.h"
    3940#include "UINetworkManagerUtils.h"
    4041#include "UINotificationCenter.h"
     
    9394void UISubnetSelectionDialog::retranslateUi()
    9495{
    95     setWindowTitle(tr("Select Subnet"));
     96    setWindowTitle(UINetworkManager::tr("Select Subnet"));
    9697}
    9798
     
    241242{
    242243    if (m_pLabelNetworkName)
    243         m_pLabelNetworkName->setText(tr("N&ame:"));
     244        m_pLabelNetworkName->setText(UINetworkManager::tr("N&ame:"));
    244245    if (m_pEditorNetworkName)
    245         m_pEditorNetworkName->setToolTip(tr("Holds the name for this network."));
     246        m_pEditorNetworkName->setToolTip(UINetworkManager::tr("Holds the name for this network."));
    246247    if (m_pLabelProviderName)
    247         m_pLabelProviderName->setText(tr("&Provider:"));
     248        m_pLabelProviderName->setText(UINetworkManager::tr("&Provider:"));
    248249    if (m_pComboProviderName)
    249         m_pComboProviderName->setToolTip(tr("Holds the cloud provider for this network."));
     250        m_pComboProviderName->setToolTip(UINetworkManager::tr("Holds the cloud provider for this network."));
    250251    if (m_pLabelProfileName)
    251         m_pLabelProfileName->setText(tr("P&rofile:"));
     252        m_pLabelProfileName->setText(UINetworkManager::tr("P&rofile:"));
    252253    if (m_pComboProfileName)
    253         m_pComboProfileName->setToolTip(tr("Holds the cloud profile for this network."));
     254        m_pComboProfileName->setToolTip(UINetworkManager::tr("Holds the cloud profile for this network."));
    254255    if (m_pLabelNetworkId)
    255         m_pLabelNetworkId->setText(tr("&Id:"));
     256        m_pLabelNetworkId->setText(UINetworkManager::tr("&Id:"));
    256257    if (m_pEditorNetworkId)
    257         m_pEditorNetworkId->setToolTip(tr("Holds the id for this network."));
     258        m_pEditorNetworkId->setToolTip(UINetworkManager::tr("Holds the id for this network."));
    258259    if (m_pButtonNetworkId)
    259         m_pButtonNetworkId->setToolTip(tr("Selects the id for this network."));
     260        m_pButtonNetworkId->setToolTip(UINetworkManager::tr("Selects the id for this network."));
    260261    if (m_pButtonBoxOptions)
    261262    {
    262         m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
    263         m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     263        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setText(UINetworkManager::tr("Reset"));
     264        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setText(UINetworkManager::tr("Apply"));
    264265        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
    265266        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
    266         m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current interface details"));
    267         m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current interface details"));
     267        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setStatusTip(UINetworkManager::tr("Reset changes in current "
     268                                                                                                 "interface details"));
     269        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setStatusTip(UINetworkManager::tr("Apply changes in current "
     270                                                                                             "interface details"));
    268271        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->
    269             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     272            setToolTip(UINetworkManager::tr("Reset Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->shortcut().toString()));
    270273        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->
    271             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->shortcut().toString()));
     274            setToolTip(UINetworkManager::tr("Apply Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->shortcut().toString()));
    272275    }
    273276}
  • trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetHostNetwork.cpp

    r93996 r95913  
    3131#include "UIDetailsWidgetHostNetwork.h"
    3232#include "UIMessageCenter.h"
     33#include "UINetworkManager.h"
    3334#include "UINetworkManagerUtils.h"
    3435#include "UINotificationCenter.h"
     
    259260#ifdef VBOX_WS_MAC
    260261    if (m_pLabelName)
    261         m_pLabelName->setText(tr("&Name:"));
     262        m_pLabelName->setText(UINetworkManager::tr("&Name:"));
    262263    if (m_pEditorName)
    263         m_pEditorName->setToolTip(tr("Holds the name for this network."));
     264        m_pEditorName->setToolTip(UINetworkManager::tr("Holds the name for this network."));
    264265    if (m_pLabelMask)
    265         m_pLabelMask->setText(tr("&Mask:"));
     266        m_pLabelMask->setText(UINetworkManager::tr("&Mask:"));
    266267    if (m_pEditorMask)
    267         m_pEditorMask->setToolTip(tr("Holds the mask for this network."));
     268        m_pEditorMask->setToolTip(UINetworkManager::tr("Holds the mask for this network."));
    268269    if (m_pLabelLBnd)
    269         m_pLabelLBnd->setText(tr("&Lower Bound:"));
     270        m_pLabelLBnd->setText(UINetworkManager::tr("&Lower Bound:"));
    270271    if (m_pEditorLBnd)
    271         m_pEditorLBnd->setToolTip(tr("Holds the lower address bound for this network."));
     272        m_pEditorLBnd->setToolTip(UINetworkManager::tr("Holds the lower address bound for this network."));
    272273    if (m_pLabelUBnd)
    273         m_pLabelUBnd->setText(tr("&Upper Bound:"));
     274        m_pLabelUBnd->setText(UINetworkManager::tr("&Upper Bound:"));
    274275    if (m_pEditorUBnd)
    275         m_pEditorUBnd->setToolTip(tr("Holds the upper address bound for this network."));
     276        m_pEditorUBnd->setToolTip(UINetworkManager::tr("Holds the upper address bound for this network."));
    276277    if (m_pButtonBox)
    277278    {
    278         m_pButtonBox->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
    279         m_pButtonBox->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     279        m_pButtonBox->button(QDialogButtonBox::Cancel)->setText(UINetworkManager::tr("Reset"));
     280        m_pButtonBox->button(QDialogButtonBox::Ok)->setText(UINetworkManager::tr("Apply"));
    280281        m_pButtonBox->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
    281282        m_pButtonBox->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
    282         m_pButtonBox->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current network details"));
    283         m_pButtonBox->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current network details"));
     283        m_pButtonBox->button(QDialogButtonBox::Cancel)->setStatusTip(UINetworkManager::tr("Reset changes in current network details"));
     284        m_pButtonBox->button(QDialogButtonBox::Ok)->setStatusTip(UINetworkManager::tr("Apply changes in current network details"));
    284285        m_pButtonBox->button(QDialogButtonBox::Cancel)->
    285             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     286            setToolTip(UINetworkManager::tr("Reset Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Cancel)->shortcut().toString()));
    286287        m_pButtonBox->button(QDialogButtonBox::Ok)->
    287             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Ok)->shortcut().toString()));
     288            setToolTip(UINetworkManager::tr("Apply Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Ok)->shortcut().toString()));
    288289    }
    289290
     
    293294    if (m_pTabWidget)
    294295    {
    295         m_pTabWidget->setTabText(0, tr("&Adapter"));
    296         m_pTabWidget->setTabText(1, tr("&DHCP Server"));
     296        m_pTabWidget->setTabText(0, UINetworkManager::tr("&Adapter"));
     297        m_pTabWidget->setTabText(1, UINetworkManager::tr("&DHCP Server"));
    297298    }
    298299
    299300    /* Translate 'Interface' tab content: */
    300301    if (m_pButtonAutomatic)
    301         m_pButtonAutomatic->setText(tr("Configure Adapter &Automatically"));
     302        m_pButtonAutomatic->setText(UINetworkManager::tr("Configure Adapter &Automatically"));
    302303    if (m_pButtonManual)
    303         m_pButtonManual->setText(tr("Configure Adapter &Manually"));
     304        m_pButtonManual->setText(UINetworkManager::tr("Configure Adapter &Manually"));
    304305    if (m_pLabelIPv4)
    305         m_pLabelIPv4->setText(tr("&IPv4 Address:"));
     306        m_pLabelIPv4->setText(UINetworkManager::tr("&IPv4 Address:"));
    306307    if (m_pEditorIPv4)
    307         m_pEditorIPv4->setToolTip(tr("Holds the host IPv4 address for this adapter."));
     308        m_pEditorIPv4->setToolTip(UINetworkManager::tr("Holds the host IPv4 address for this adapter."));
    308309    if (m_pLabelNMv4)
    309         m_pLabelNMv4->setText(tr("IPv4 Network &Mask:"));
     310        m_pLabelNMv4->setText(UINetworkManager::tr("IPv4 Network &Mask:"));
    310311    if (m_pEditorNMv4)
    311         m_pEditorNMv4->setToolTip(tr("Holds the host IPv4 network mask for this adapter."));
     312        m_pEditorNMv4->setToolTip(UINetworkManager::tr("Holds the host IPv4 network mask for this adapter."));
    312313    if (m_pLabelIPv6)
    313         m_pLabelIPv6->setText(tr("I&Pv6 Address:"));
     314        m_pLabelIPv6->setText(UINetworkManager::tr("I&Pv6 Address:"));
    314315    if (m_pEditorIPv6)
    315         m_pEditorIPv6->setToolTip(tr("Holds the host IPv6 address for this adapter if IPv6 is supported."));
     316        m_pEditorIPv6->setToolTip(UINetworkManager::tr("Holds the host IPv6 address for this adapter if IPv6 is supported."));
    316317    if (m_pLabelNMv6)
    317         m_pLabelNMv6->setText(tr("IPv6 Prefix &Length:"));
     318        m_pLabelNMv6->setText(UINetworkManager::tr("IPv6 Prefix &Length:"));
    318319    if (m_pEditorNMv6)
    319         m_pEditorNMv6->setToolTip(tr("Holds the host IPv6 prefix length for this adapter if IPv6 is supported."));
     320        m_pEditorNMv6->setToolTip(UINetworkManager::tr("Holds the host IPv6 prefix length for this adapter if IPv6 is supported."));
    320321    if (m_pButtonBoxInterface)
    321322    {
    322         m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
    323         m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     323        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setText(UINetworkManager::tr("Reset"));
     324        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setText(UINetworkManager::tr("Apply"));
    324325        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
    325326        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
    326         m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current interface details"));
    327         m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current interface details"));
     327        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setStatusTip(UINetworkManager::tr("Reset changes in current interface details"));
     328        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setStatusTip(UINetworkManager::tr("Apply changes in current interface details"));
    328329        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->
    329             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     330            setToolTip(UINetworkManager::tr("Reset Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->shortcut().toString()));
    330331        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->
    331             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->shortcut().toString()));
     332            setToolTip(UINetworkManager::tr("Apply Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->shortcut().toString()));
    332333    }
    333334
     
    335336    if (m_pCheckBoxDHCP)
    336337    {
    337         m_pCheckBoxDHCP->setText(tr("&Enable Server"));
    338         m_pCheckBoxDHCP->setToolTip(tr("When checked, the DHCP Server will be enabled for this network on machine start-up."));
     338        m_pCheckBoxDHCP->setText(UINetworkManager::tr("&Enable Server"));
     339        m_pCheckBoxDHCP->setToolTip(UINetworkManager::tr("When checked, the DHCP Server will be enabled for this network on machine start-up."));
    339340    }
    340341    if (m_pLabelDHCPAddress)
    341         m_pLabelDHCPAddress->setText(tr("Server Add&ress:"));
     342        m_pLabelDHCPAddress->setText(UINetworkManager::tr("Server Add&ress:"));
    342343    if (m_pEditorDHCPAddress)
    343         m_pEditorDHCPAddress->setToolTip(tr("Holds the address of the DHCP server servicing the network associated with this host-only adapter."));
     344        m_pEditorDHCPAddress->setToolTip(UINetworkManager::tr("Holds the address of the DHCP server servicing the network associated with this host-only adapter."));
    344345    if (m_pLabelDHCPMask)
    345         m_pLabelDHCPMask->setText(tr("Server &Mask:"));
     346        m_pLabelDHCPMask->setText(UINetworkManager::tr("Server &Mask:"));
    346347    if (m_pEditorDHCPMask)
    347         m_pEditorDHCPMask->setToolTip(tr("Holds the network mask of the DHCP server servicing the network associated with this host-only adapter."));
     348        m_pEditorDHCPMask->setToolTip(UINetworkManager::tr("Holds the network mask of the DHCP server servicing the network associated with this host-only adapter."));
    348349    if (m_pLabelDHCPLowerAddress)
    349         m_pLabelDHCPLowerAddress->setText(tr("&Lower Address Bound:"));
     350        m_pLabelDHCPLowerAddress->setText(UINetworkManager::tr("&Lower Address Bound:"));
    350351    if (m_pEditorDHCPLowerAddress)
    351         m_pEditorDHCPLowerAddress->setToolTip(tr("Holds the lower address bound offered by the DHCP server servicing the network associated with this host-only adapter."));
     352        m_pEditorDHCPLowerAddress->setToolTip(UINetworkManager::tr("Holds the lower address bound offered by the DHCP server servicing the network associated with this host-only adapter."));
    352353    if (m_pLabelDHCPUpperAddress)
    353         m_pLabelDHCPUpperAddress->setText(tr("&Upper Address Bound:"));
     354        m_pLabelDHCPUpperAddress->setText(UINetworkManager::tr("&Upper Address Bound:"));
    354355    if (m_pEditorDHCPUpperAddress)
    355         m_pEditorDHCPUpperAddress->setToolTip(tr("Holds the upper address bound offered by the DHCP server servicing the network associated with this host-only adapter."));
     356        m_pEditorDHCPUpperAddress->setToolTip(UINetworkManager::tr("Holds the upper address bound offered by the DHCP server servicing the network associated with this host-only adapter."));
    356357    if (m_pButtonBoxServer)
    357358    {
    358         m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
    359         m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     359        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setText(UINetworkManager::tr("Reset"));
     360        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setText(UINetworkManager::tr("Apply"));
    360361        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
    361362        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
    362         m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current DHCP server details"));
    363         m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current DHCP server details"));
     363        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setStatusTip(UINetworkManager::tr("Reset changes in current DHCP server details"));
     364        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setStatusTip(UINetworkManager::tr("Apply changes in current DHCP server details"));
    364365        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->
    365             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     366            setToolTip(UINetworkManager::tr("Reset Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->shortcut().toString()));
    366367        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->
    367             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Ok)->shortcut().toString()));
     368            setToolTip(UINetworkManager::tr("Apply Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Ok)->shortcut().toString()));
    368369    }
    369370#endif /* !VBOX_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetNATNetwork.cpp

    r93975 r95913  
    3232#include "UIDetailsWidgetNATNetwork.h"
    3333#include "UIMessageCenter.h"
     34#include "UINetworkManager.h"
    3435#include "UINetworkManagerUtils.h"
    3536#include "UINotificationCenter.h"
     
    146147    if (m_pTabWidget)
    147148    {
    148         m_pTabWidget->setTabText(0, tr("&General Options"));
    149         m_pTabWidget->setTabText(1, tr("&Port Forwarding"));
     149        m_pTabWidget->setTabText(0, UINetworkManager::tr("&General Options"));
     150        m_pTabWidget->setTabText(1, UINetworkManager::tr("&Port Forwarding"));
    150151    }
    151152
    152153    if (m_pLabelNetworkName)
    153         m_pLabelNetworkName->setText(tr("N&ame:"));
     154        m_pLabelNetworkName->setText(UINetworkManager::tr("N&ame:"));
    154155    if (m_pEditorNetworkName)
    155         m_pEditorNetworkName->setToolTip(tr("Holds the name for this network."));
     156        m_pEditorNetworkName->setToolTip(UINetworkManager::tr("Holds the name for this network."));
    156157    if (m_pLabelNetworkIPv4Prefix)
    157         m_pLabelNetworkIPv4Prefix->setText(tr("IPv&4 Prefix:"));
     158        m_pLabelNetworkIPv4Prefix->setText(UINetworkManager::tr("IPv&4 Prefix:"));
    158159    if (m_pEditorNetworkIPv4Prefix)
    159         m_pEditorNetworkIPv4Prefix->setToolTip(tr("Holds the IPv4 prefix for this network."));
     160        m_pEditorNetworkIPv4Prefix->setToolTip(UINetworkManager::tr("Holds the IPv4 prefix for this network."));
    160161    if (m_pLabelNetworkIPv6Prefix)
    161         m_pLabelNetworkIPv6Prefix->setText(tr("IPv&6 Prefix:"));
     162        m_pLabelNetworkIPv6Prefix->setText(UINetworkManager::tr("IPv&6 Prefix:"));
    162163    if (m_pEditorNetworkIPv6Prefix)
    163         m_pEditorNetworkIPv6Prefix->setToolTip(tr("Holds the IPv6 prefix for this network."));
     164        m_pEditorNetworkIPv6Prefix->setToolTip(UINetworkManager::tr("Holds the IPv6 prefix for this network."));
    164165    if (m_pCheckboxSupportsDHCP)
    165166    {
    166         m_pCheckboxSupportsDHCP->setText(tr("Enable &DHCP"));
    167         m_pCheckboxSupportsDHCP->setToolTip(tr("When checked, this network will support DHCP."));
     167        m_pCheckboxSupportsDHCP->setText(UINetworkManager::tr("Enable &DHCP"));
     168        m_pCheckboxSupportsDHCP->setToolTip(UINetworkManager::tr("When checked, this network will support DHCP."));
    168169    }
    169170    if (m_pCheckboxIPv6)
    170171    {
    171         m_pCheckboxIPv6->setText(tr("&Enable IPv6"));
    172         m_pCheckboxIPv6->setToolTip(tr("When checked, this network will support IPv6."));
     172        m_pCheckboxIPv6->setText(UINetworkManager::tr("&Enable IPv6"));
     173        m_pCheckboxIPv6->setToolTip(UINetworkManager::tr("When checked, this network will support IPv6."));
    173174    }
    174175    if (m_pCheckboxAdvertiseDefaultIPv6Route)
    175176    {
    176         m_pCheckboxAdvertiseDefaultIPv6Route->setText(tr("Advertise Default IPv6 &Route"));
    177         m_pCheckboxAdvertiseDefaultIPv6Route->setToolTip(tr("When checked, this network will be advertised as the default IPv6 route."));
     177        m_pCheckboxAdvertiseDefaultIPv6Route->setText(UINetworkManager::tr("Advertise Default IPv6 &Route"));
     178        m_pCheckboxAdvertiseDefaultIPv6Route->setToolTip(UINetworkManager::tr("When checked, this network will be advertised "
     179                                                                              "as the default IPv6 route."));
    178180    }
    179181    if (m_pButtonBoxOptions)
    180182    {
    181         m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
    182         m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     183        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setText(UINetworkManager::tr("Reset"));
     184        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setText(UINetworkManager::tr("Apply"));
    183185        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
    184186        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
    185         m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current interface details"));
    186         m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current interface details"));
     187        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->setStatusTip(UINetworkManager::tr("Reset changes in current "
     188                                                                                                 "interface details"));
     189        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->setStatusTip(UINetworkManager::tr("Apply changes in current "
     190                                                                                             "interface details"));
    187191        m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->
    188             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     192            setToolTip(UINetworkManager::tr("Reset Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Cancel)->shortcut().toString()));
    189193        m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->
    190             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->shortcut().toString()));
     194            setToolTip(UINetworkManager::tr("Apply Changes (%1)").arg(m_pButtonBoxOptions->button(QDialogButtonBox::Ok)->shortcut().toString()));
    191195    }
    192196
     
    194198    if (m_pTabWidgetForwarding)
    195199    {
    196         m_pTabWidgetForwarding->setTabText(0, tr("IPv&4"));
    197         m_pTabWidgetForwarding->setTabText(1, tr("IPv&6"));
     200        m_pTabWidgetForwarding->setTabText(0, UINetworkManager::tr("IPv&4"));
     201        m_pTabWidgetForwarding->setTabText(1, UINetworkManager::tr("IPv&6"));
    198202    }
    199203    if (m_pButtonBoxForwarding)
    200204    {
    201         m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
    202         m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     205        m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->setText(UINetworkManager::tr("Reset"));
     206        m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->setText(UINetworkManager::tr("Apply"));
    203207        m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
    204208        m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
    205         m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current interface details"));
    206         m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current interface details"));
     209        m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->setStatusTip(UINetworkManager::tr("Reset changes in current "
     210                                                                                                    "interface details"));
     211        m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->setStatusTip(UINetworkManager::tr("Apply changes in current "
     212                                                                                                "interface details"));
    207213        m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->
    208             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     214            setToolTip(UINetworkManager::tr("Reset Changes (%1)").arg(m_pButtonBoxForwarding->button(QDialogButtonBox::Cancel)->shortcut().toString()));
    209215        m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->
    210             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->shortcut().toString()));
     216            setToolTip(UINetworkManager::tr("Apply Changes (%1)").arg(m_pButtonBoxForwarding->button(QDialogButtonBox::Ok)->shortcut().toString()));
    211217    }
    212218}
  • trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp

    r93996 r95913  
    190190
    191191    /* Network information: */
    192     strToolTip += strHeader.arg(tr("Name"), m_strName);
    193     strToolTip += strHeader.arg(tr("Mask"), m_strMask);
    194     strToolTip += strHeader.arg(tr("Lower Bound"), m_strLBnd);
    195     strToolTip += strHeader.arg(tr("Upper Bound"), m_strUBnd);
     192    strToolTip += strHeader.arg(UINetworkManager::tr("Name"), m_strName);
     193    strToolTip += strHeader.arg(UINetworkManager::tr("Mask"), m_strMask);
     194    strToolTip += strHeader.arg(UINetworkManager::tr("Lower Bound"), m_strLBnd);
     195    strToolTip += strHeader.arg(UINetworkManager::tr("Upper Bound"), m_strUBnd);
    196196
    197197#else /* !VBOX_WS_MAC */
     
    203203    setText(HostNetworkColumn_IPv6, m_interface.m_strAddress6.isEmpty() || !m_interface.m_fSupportedIPv6 ? QString() :
    204204                                    QString("%1/%2").arg(m_interface.m_strAddress6).arg(m_interface.m_strPrefixLength6.toInt()));
    205     setText(HostNetworkColumn_DHCP, m_dhcpserver.m_fEnabled ? tr("Enabled", "DHCP Server") : tr("Disabled", "DHCP Server"));
     205    setText(HostNetworkColumn_DHCP, m_dhcpserver.m_fEnabled ? UINetworkManager::tr("Enabled", "DHCP Server")
     206                                                            : UINetworkManager::tr("Disabled", "DHCP Server"));
    206207
    207208    /* Compose item tool-tip: */
     
    212213
    213214    /* Interface information: */
    214     strToolTip += strHeader.arg(tr("Adapter"))
     215    strToolTip += strHeader.arg(UINetworkManager::tr("Adapter"))
    215216                           .arg(m_interface.m_fDHCPEnabled ?
    216                                 tr("Automatically configured", "interface") :
    217                                 tr("Manually configured", "interface"));
    218     strToolTip += strSubHeader.arg(tr("IPv4 Address"))
     217                                UINetworkManager::tr("Automatically configured", "interface") :
     218                                UINetworkManager::tr("Manually configured", "interface"));
     219    strToolTip += strSubHeader.arg(UINetworkManager::tr("IPv4 Address"))
    219220                              .arg(m_interface.m_strAddress.isEmpty() ?
    220                                    tr ("Not set", "address") :
     221                                   UINetworkManager::tr ("Not set", "address") :
    221222                                   m_interface.m_strAddress) +
    222                   strSubHeader.arg(tr("IPv4 Network Mask"))
     223                  strSubHeader.arg(UINetworkManager::tr("IPv4 Network Mask"))
    223224                              .arg(m_interface.m_strMask.isEmpty() ?
    224                                    tr ("Not set", "mask") :
     225                                   UINetworkManager::tr ("Not set", "mask") :
    225226                                   m_interface.m_strMask);
    226227    if (m_interface.m_fSupportedIPv6)
    227228    {
    228         strToolTip += strSubHeader.arg(tr("IPv6 Address"))
     229        strToolTip += strSubHeader.arg(UINetworkManager::tr("IPv6 Address"))
    229230                                  .arg(m_interface.m_strAddress6.isEmpty() ?
    230                                        tr("Not set", "address") :
     231                                       UINetworkManager::tr("Not set", "address") :
    231232                                       m_interface.m_strAddress6) +
    232                       strSubHeader.arg(tr("IPv6 Prefix Length"))
     233                      strSubHeader.arg(UINetworkManager::tr("IPv6 Prefix Length"))
    233234                                  .arg(m_interface.m_strPrefixLength6.isEmpty() ?
    234                                        tr("Not set", "length") :
     235                                       UINetworkManager::tr("Not set", "length") :
    235236                                       m_interface.m_strPrefixLength6);
    236237    }
    237238
    238239    /* DHCP server information: */
    239     strToolTip += strHeader.arg(tr("DHCP Server"))
     240    strToolTip += strHeader.arg(UINetworkManager::tr("DHCP Server"))
    240241                           .arg(m_dhcpserver.m_fEnabled ?
    241                                 tr("Enabled", "server") :
    242                                 tr("Disabled", "server"));
     242                                UINetworkManager::tr("Enabled", "server") :
     243                                UINetworkManager::tr("Disabled", "server"));
    243244    if (m_dhcpserver.m_fEnabled)
    244245    {
    245         strToolTip += strSubHeader.arg(tr("Address"))
     246        strToolTip += strSubHeader.arg(UINetworkManager::tr("Address"))
    246247                                  .arg(m_dhcpserver.m_strAddress.isEmpty() ?
    247                                        tr("Not set", "address") :
     248                                       UINetworkManager::tr("Not set", "address") :
    248249                                       m_dhcpserver.m_strAddress) +
    249                       strSubHeader.arg(tr("Network Mask"))
     250                      strSubHeader.arg(UINetworkManager::tr("Network Mask"))
    250251                                  .arg(m_dhcpserver.m_strMask.isEmpty() ?
    251                                        tr("Not set", "mask") :
     252                                       UINetworkManager::tr("Not set", "mask") :
    252253                                       m_dhcpserver.m_strMask) +
    253                       strSubHeader.arg(tr("Lower Bound"))
     254                      strSubHeader.arg(UINetworkManager::tr("Lower Bound"))
    254255                                  .arg(m_dhcpserver.m_strLowerAddress.isEmpty() ?
    255                                        tr("Not set", "bound") :
     256                                       UINetworkManager::tr("Not set", "bound") :
    256257                                       m_dhcpserver.m_strLowerAddress) +
    257                       strSubHeader.arg(tr("Upper Bound"))
     258                      strSubHeader.arg(UINetworkManager::tr("Upper Bound"))
    258259                                  .arg(m_dhcpserver.m_strUpperAddress.isEmpty() ?
    259                                        tr("Not set", "bound") :
     260                                       UINetworkManager::tr("Not set", "bound") :
    260261                                       m_dhcpserver.m_strUpperAddress);
    261262    }
     
    310311    setText(NATNetworkColumn_IPv4, m_strPrefixIPv4);
    311312    setText(NATNetworkColumn_IPv6, m_strPrefixIPv6);
    312     setText(NATNetworkColumn_DHCP, m_fSupportsDHCP ? tr("Enabled", "DHCP Server") : tr("Disabled", "DHCP Server"));
     313    setText(NATNetworkColumn_DHCP, m_fSupportsDHCP ? UINetworkManager::tr("Enabled", "DHCP Server")
     314                                                   : UINetworkManager::tr("Disabled", "DHCP Server"));
    313315
    314316    /* Compose item tool-tip: */
     
    319321
    320322    /* Network information: */
    321     strToolTip += strHeader.arg(tr("Network Name"), m_strName);
    322     strToolTip += strHeader.arg(tr("Network IPv4 Prefix"), m_strPrefixIPv4);
    323     strToolTip += strHeader.arg(tr("Network IPv6 Prefix"), m_strPrefixIPv6);
    324     strToolTip += strHeader.arg(tr("Supports DHCP"), m_fSupportsDHCP ? tr("yes") : tr("no"));
    325     strToolTip += strHeader.arg(tr("Supports IPv6"), m_fSupportsIPv6 ? tr("yes") : tr("no"));
     323    strToolTip += strHeader.arg(UINetworkManager::tr("Network Name"), m_strName);
     324    strToolTip += strHeader.arg(UINetworkManager::tr("Network IPv4 Prefix"), m_strPrefixIPv4);
     325    strToolTip += strHeader.arg(UINetworkManager::tr("Network IPv6 Prefix"), m_strPrefixIPv6);
     326    strToolTip += strHeader.arg(UINetworkManager::tr("Supports DHCP"), m_fSupportsDHCP ? UINetworkManager::tr("yes")
     327                                                                                       : UINetworkManager::tr("no"));
     328    strToolTip += strHeader.arg(UINetworkManager::tr("Supports IPv6"), m_fSupportsIPv6 ? UINetworkManager::tr("yes")
     329                                                                                       : UINetworkManager::tr("no"));
    326330    if (m_fSupportsIPv6 && m_fAdvertiseDefaultIPv6Route)
    327         strToolTip += strSubHeader.arg(tr("Default IPv6 route"), tr("yes"));
     331        strToolTip += strSubHeader.arg(UINetworkManager::tr("Default IPv6 route"), UINetworkManager::tr("yes"));
    328332
    329333    /* Assign tool-tip finally: */
     
    349353
    350354    /* Network information: */
    351     strToolTip += strHeader.arg(tr("Network Name"), m_strName);
    352     strToolTip += strHeader.arg(tr("Provider"), m_strProvider);
    353     strToolTip += strHeader.arg(tr("Profile"), m_strProfile);
     355    strToolTip += strHeader.arg(UINetworkManager::tr("Network Name"), m_strName);
     356    strToolTip += strHeader.arg(UINetworkManager::tr("Provider"), m_strProvider);
     357    strToolTip += strHeader.arg(UINetworkManager::tr("Profile"), m_strProfile);
    354358
    355359    /* Assign tool-tip finally: */
     
    430434#endif /* !VBOX_WS_MAC */
    431435        m_pTreeWidgetHostNetwork->setHeaderLabels(fields);
    432         m_pTreeWidgetHostNetwork->setWhatsThis(tr("Registered host networks"));
     436        m_pTreeWidgetHostNetwork->setWhatsThis(UINetworkManager::tr("Registered host networks"));
    433437    }
    434438
     
    442446                                   << UINetworkManager::tr("DHCP Server");
    443447        m_pTreeWidgetNATNetwork->setHeaderLabels(fields);
    444         m_pTreeWidgetNATNetwork->setWhatsThis(tr("Registered NAT networks"));
     448        m_pTreeWidgetNATNetwork->setWhatsThis(UINetworkManager::tr("Registered NAT networks"));
    445449    }
    446450
     
    453457                                   << UINetworkManager::tr("Profile");
    454458        m_pTreeWidgetCloudNetwork->setHeaderLabels(fields);
    455         m_pTreeWidgetCloudNetwork->setWhatsThis(tr("Registered cloud networks"));
     459        m_pTreeWidgetCloudNetwork->setWhatsThis(UINetworkManager::tr("Registered cloud networks"));
    456460    }
    457461}
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