VirtualBox

Changeset 28020 in vbox for trunk/src


Ignore:
Timestamp:
Apr 6, 2010 7:31:59 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: new core: Change back the translation context to the old locations, so this stuff has not to be translated twice.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp

    r27599 r28020  
    174174    void retranslateUi()
    175175    {
    176         menu()->setTitle(UIActionsPool::tr("&Machine"));
     176        menu()->setTitle(QApplication::translate("VBoxConsoleWnd", "&Machine"));
    177177    }
    178178};
     
    196196    void retranslateUi()
    197197    {
    198         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Fullscreen Mode"), "F"));
    199         setStatusTip(UIActionsPool::tr("Switch to fullscreen mode"));
     198        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Fullscreen Mode"), "F"));
     199        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to fullscreen mode"));
    200200    }
    201201};
     
    219219    void retranslateUi()
    220220    {
    221         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Seam&less Mode"), "L"));
    222         setStatusTip(UIActionsPool::tr("Switch to seamless desktop integration mode"));
     221        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Seam&less Mode"), "L"));
     222        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to seamless desktop integration mode"));
    223223    }
    224224};
     
    242242    void retranslateUi()
    243243    {
    244         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Auto-resize &Guest Display"), "G"));
    245         setStatusTip(UIActionsPool::tr("Automatically resize the guest display when the window is resized (requires Guest Additions)"));
     244        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Auto-resize &Guest Display"), "G"));
     245        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Automatically resize the guest display when the window is resized (requires Guest Additions)"));
    246246    }
    247247};
     
    264264    void retranslateUi()
    265265    {
    266         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Adjust Window Size"), "A"));
    267         setStatusTip(UIActionsPool::tr("Adjust window size and position to best fit the guest display"));
     266        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Adjust Window Size"), "A"));
     267        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Adjust window size and position to best fit the guest display"));
    268268    }
    269269};
     
    308308        if (!isChecked())
    309309        {
    310             setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Disable &Mouse Integration"), "I"));
    311             setStatusTip(UIActionsPool::tr("Temporarily disable host mouse pointer integration"));
     310            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Disable &Mouse Integration"), "I"));
     311            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Temporarily disable host mouse pointer integration"));
    312312        }
    313313        else
    314314        {
    315             setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Enable &Mouse Integration"), "I"));
    316             setStatusTip(UIActionsPool::tr("Enable temporarily disabled host mouse pointer integration"));
     315            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Enable &Mouse Integration"), "I"));
     316            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Enable temporarily disabled host mouse pointer integration"));
    317317        }
    318318    }
     
    336336    void retranslateUi()
    337337    {
    338         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Insert Ctrl-Alt-Del"), "Del"));
    339         setStatusTip(UIActionsPool::tr("Send the Ctrl-Alt-Del sequence to the virtual machine"));
     338        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Insert Ctrl-Alt-Del"), "Del"));
     339        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Send the Ctrl-Alt-Del sequence to the virtual machine"));
    340340    }
    341341};
     
    359359    void retranslateUi()
    360360    {
    361         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Insert Ctrl-Alt-Backspace"), "Backspace"));
    362         setStatusTip(UIActionsPool::tr("Send the Ctrl-Alt-Backspace sequence to the virtual machine"));
     361        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Insert Ctrl-Alt-Backspace"), "Backspace"));
     362        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Send the Ctrl-Alt-Backspace sequence to the virtual machine"));
    363363    }
    364364};
     
    382382    void retranslateUi()
    383383    {
    384         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Take &Snapshot..."), "S"));
    385         setStatusTip(UIActionsPool::tr("Take a snapshot of the virtual machine"));
     384        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Take &Snapshot..."), "S"));
     385        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Take a snapshot of the virtual machine"));
    386386    }
    387387};
     
    404404    void retranslateUi()
    405405    {
    406         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Session I&nformation Dialog"), "N"));
    407         setStatusTip(UIActionsPool::tr("Show Session Information Dialog"));
     406        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Session I&nformation Dialog"), "N"));
     407        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Show Session Information Dialog"));
    408408    }
    409409};
     
    428428        if (!isChecked())
    429429        {
    430             setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Pause"), "P"));
    431             setStatusTip(UIActionsPool::tr("Suspend the execution of the virtual machine"));
     430            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Pause"), "P"));
     431            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Suspend the execution of the virtual machine"));
    432432        }
    433433        else
    434434        {
    435             setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("R&esume"), "P"));
    436             setStatusTip(UIActionsPool::tr("Resume the execution of the virtual machine"));
     435            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "R&esume"), "P"));
     436            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Resume the execution of the virtual machine"));
    437437        }
    438438    }
     
    456456    void retranslateUi()
    457457    {
    458         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Reset"), "R"));
    459         setStatusTip(UIActionsPool::tr("Reset the virtual machine"));
     458        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Reset"), "R"));
     459        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Reset the virtual machine"));
    460460    }
    461461};
     
    480480#ifdef Q_WS_MAC
    481481        /* Host+H is Hide on the mac */
    482         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("ACPI Sh&utdown"), "U"));
     482        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "ACPI Sh&utdown"), "U"));
    483483#else /* Q_WS_MAC */
    484         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("ACPI S&hutdown"), "H"));
     484        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "ACPI S&hutdown"), "H"));
    485485#endif /* !Q_WS_MAC */
    486         setStatusTip(UIActionsPool::tr("Send the ACPI Power Button press event to the virtual machine"));
     486        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Send the ACPI Power Button press event to the virtual machine"));
    487487    }
    488488};
     
    506506    void retranslateUi()
    507507    {
    508         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Close..." ), "Q"));
    509         setStatusTip(UIActionsPool::tr("Close the virtual machine"));
     508        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Close..." ), "Q"));
     509        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Close the virtual machine"));
    510510    }
    511511};
     
    527527    void retranslateUi()
    528528    {
    529         menu()->setTitle(UIActionsPool::tr("&View"));
     529        menu()->setTitle(QApplication::translate("VBoxConsoleWnd", "&View"));
    530530    }
    531531};
     
    547547    void retranslateUi()
    548548    {
    549         menu()->setTitle(UIActionsPool::tr("&Devices"));
     549        menu()->setTitle(QApplication::translate("VBoxConsoleWnd", "&Devices"));
    550550    }
    551551};
     
    568568    void retranslateUi()
    569569    {
    570         menu()->setTitle(UIActionsPool::tr("&CD/DVD Devices"));
     570        menu()->setTitle(QApplication::translate("VBoxConsoleWnd", "&CD/DVD Devices"));
    571571    }
    572572};
     
    589589    void retranslateUi()
    590590    {
    591         menu()->setTitle(UIActionsPool::tr("&Floppy Devices"));
     591        menu()->setTitle(QApplication::translate("VBoxConsoleWnd", "&Floppy Devices"));
    592592    }
    593593};
     
    610610    void retranslateUi()
    611611    {
    612         menu()->setTitle(UIActionsPool::tr("&USB Devices"));
     612        menu()->setTitle(QApplication::translate("VBoxConsoleWnd", "&USB Devices"));
    613613    }
    614614};
     
    650650    void retranslateUi()
    651651    {
    652         setText(UIActionsPool::tr("&Network Adapters..."));
    653         setStatusTip(UIActionsPool::tr("Change the settings of network adapters"));
     652        setText(QApplication::translate("VBoxConsoleWnd", "&Network Adapters..."));
     653        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Change the settings of network adapters"));
    654654    }
    655655};
     
    691691    void retranslateUi()
    692692    {
    693         setText(UIActionsPool::tr("&Shared Folders..."));
    694         setStatusTip(UIActionsPool::tr("Create or modify shared folders"));
     693        setText(QApplication::translate("VBoxConsoleWnd", "&Shared Folders..."));
     694        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Create or modify shared folders"));
    695695    }
    696696};
     
    714714    void retranslateUi()
    715715    {
    716         setText(UIActionsPool::tr("&Remote Display"));
    717         setStatusTip(UIActionsPool::tr("Enable or disable remote desktop (RDP) connections to this machine"));
     716        setText(QApplication::translate("VBoxConsoleWnd", "&Remote Display"));
     717        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Enable or disable remote desktop (RDP) connections to this machine"));
    718718    }
    719719};
     
    736736    void retranslateUi()
    737737    {
    738         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Install Guest Additions..."), "D"));
    739         setStatusTip(UIActionsPool::tr("Mount the Guest Additions installation image"));
     738        setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Install Guest Additions..."), "D"));
     739        setStatusTip(QApplication::translate("VBoxConsoleWnd", "Mount the Guest Additions installation image"));
    740740    }
    741741};
     
    758758    void retranslateUi()
    759759    {
    760         menu()->setTitle(UIActionsPool::tr("De&bug"));
     760        menu()->setTitle(QApplication::translate("VBoxConsoleWnd", "De&bug"));
    761761    }
    762762};
     
    778778    void retranslateUi()
    779779    {
    780         setText(UIActionsPool::tr("&Statistics...", "debug action"));
     780        setText(QApplication::translate("VBoxConsoleWnd", "&Statistics...", "debug action"));
    781781    }
    782782};
     
    798798    void retranslateUi()
    799799    {
    800         setText(UIActionsPool::tr("&Command Line...", "debug action"));
     800        setText(QApplication::translate("VBoxConsoleWnd", "&Command Line...", "debug action"));
    801801    }
    802802};
     
    818818    void retranslateUi()
    819819    {
    820         setText(UIActionsPool::tr("&Logging...", "debug action"));
     820        setText(QApplication::translate("VBoxConsoleWnd", "&Logging...", "debug action"));
    821821    }
    822822};
     
    839839    void retranslateUi()
    840840    {
    841         setText(UIActionsPool::tr("&Help"));
     841        setText(QApplication::translate("VBoxConsoleWnd", "&Help"));
    842842    }
    843843};
     
    861861    {
    862862        setShortcut(QKeySequence::HelpContents);
    863         setText(UIActionsPool::tr("&Contents..."));
    864         setStatusTip(UIActionsPool::tr("Show the online help contents"));
     863        setText(QApplication::translate("VBoxProblemReporter", "&Contents..."));
     864        setStatusTip(QApplication::translate("VBoxProblemReporter", "Show the online help contents"));
    865865    }
    866866};
     
    883883    void retranslateUi()
    884884    {
    885         setText(UIActionsPool::tr("&VirtualBox Web Site..."));
    886         setStatusTip(UIActionsPool::tr("Open the browser and go to the VirtualBox product web site"));
     885        setText(QApplication::translate("VBoxProblemReporter", "&VirtualBox Web Site..."));
     886        setStatusTip(QApplication::translate("VBoxProblemReporter", "Open the browser and go to the VirtualBox product web site"));
    887887    }
    888888};
     
    905905    void retranslateUi()
    906906    {
    907         setText(UIActionsPool::tr("&Reset All Warnings"));
    908         setStatusTip(UIActionsPool::tr("Go back to showing all suppressed warnings and messages"));
     907        setText(QApplication::translate("VBoxProblemReporter", "&Reset All Warnings"));
     908        setStatusTip(QApplication::translate("VBoxProblemReporter", "Go back to showing all suppressed warnings and messages"));
    909909    }
    910910};
     
    930930    void retranslateUi()
    931931    {
    932         setText(UIActionsPool::tr("R&egister VirtualBox..."));
    933         setStatusTip(UIActionsPool::tr("Open VirtualBox registration form"));
     932        setText(QApplication::translate("VBoxProblemReporter", "R&egister VirtualBox..."));
     933        setStatusTip(QApplication::translate("VBoxProblemReporter", "Open VirtualBox registration form"));
    934934    }
    935935};
     
    954954    void retranslateUi()
    955955    {
    956         setText(UIActionsPool::tr("C&heck for Updates..."));
    957         setStatusTip(UIActionsPool::tr("Check for a new VirtualBox version"));
     956        setText(QApplication::translate("VBoxProblemReporter", "C&heck for Updates..."));
     957        setStatusTip(QApplication::translate("VBoxProblemReporter", "Check for a new VirtualBox version"));
    958958    }
    959959};
     
    977977    void retranslateUi()
    978978    {
    979         setText(UIActionsPool::tr("&About VirtualBox..."));
    980         setStatusTip(UIActionsPool::tr("Show a dialog with product information"));
     979        setText(QApplication::translate("VBoxProblemReporter", "&About VirtualBox..."));
     980        setStatusTip(QApplication::translate("VBoxProblemReporter", "Show a dialog with product information"));
    981981    }
    982982};
     
    10161016    void retranslateUi()
    10171017    {
    1018         setText(UIActionsPool::tr("Dock Icon"));
     1018        setText(QApplication::translate("VBoxConsoleWnd", "Dock Icon"));
    10191019    }
    10201020};
     
    10361036    void retranslateUi()
    10371037    {
    1038         setText(UIActionsPool::tr("Show Monitor Preview"));
     1038        setText(QApplication::translate("VBoxConsoleWnd", "Show Monitor Preview"));
    10391039    }
    10401040};
     
    10561056    void retranslateUi()
    10571057    {
    1058         setText(UIActionsPool::tr("Show Application Icon"));
     1058        setText(QApplication::translate("VBoxConsoleWnd", "Show Application Icon"));
    10591059    }
    10601060};
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r26773 r28020  
    5656        const CMachine &machine = m_session.GetMachine();
    5757
    58         QString strToolTip = tr("<p style='white-space:pre'><nobr>Indicates the activity "
     58        QString strToolTip = QApplication::translate("VBoxConsoleWnd", "<p style='white-space:pre'><nobr>Indicates the activity "
    5959                                "of the virtual hard disks:</nobr>%1</p>", "HDD tooltip");
    6060
     
    8181
    8282        if (!bAttachmentsPresent)
    83             strFullData += tr("<br><nobr><b>No hard disks attached</b></nobr>", "HDD tooltip");
     83            strFullData += QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>No hard disks attached</b></nobr>", "HDD tooltip");
    8484
    8585        setToolTip(strToolTip.arg(strFullData));
     
    120120        const CMachine &machine = m_session.GetMachine();
    121121
    122         QString strToolTip = tr("<p style='white-space:pre'><nobr>Indicates the activity "
     122        QString strToolTip = QApplication::translate("VBoxConsoleWnd", "<p style='white-space:pre'><nobr>Indicates the activity "
    123123                                "of the CD/DVD devices:</nobr>%1</p>", "CD/DVD tooltip");
    124124
     
    147147
    148148        if (strFullData.isNull())
    149             strFullData = tr("<br><nobr><b>No CD/DVD devices attached</b></nobr>", "CD/DVD tooltip");
     149            strFullData = QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>No CD/DVD devices attached</b></nobr>", "CD/DVD tooltip");
    150150
    151151        setToolTip(strToolTip.arg(strFullData));
     
    186186        const CMachine &machine = m_session.GetMachine();
    187187
    188         QString tip = tr ("<p style='white-space:pre'><nobr>Indicates the activity "
     188        QString tip = QApplication::translate("VBoxConsoleWnd", "<p style='white-space:pre'><nobr>Indicates the activity "
    189189                          "of the floppy devices:</nobr>%1</p>", "FD tooltip");
    190190        QString data;
     
    212212
    213213        if (data.isNull())
    214             data = tr ("<br><nobr><b>No floppy devices attached</b></nobr>", "FD tooltip");
     214            data = QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>No floppy devices attached</b></nobr>", "FD tooltip");
    215215
    216216        setToolTip (tip.arg (data));
     
    258258        setState(uCount > 0 ? KDeviceActivity_Idle : KDeviceActivity_Null);
    259259
    260         QString strToolTip = tr("<p style='white-space:pre'><nobr>Indicates the activity of the "
     260        QString strToolTip = QApplication::translate("VBoxConsoleWnd", "<p style='white-space:pre'><nobr>Indicates the activity of the "
    261261                                "network interfaces:</nobr>%1</p>", "Network adapters tooltip");
    262262        QString strFullData;
     
    266266            CNetworkAdapter adapter = machine.GetNetworkAdapter(uSlot);
    267267            if (adapter.GetEnabled())
    268                 strFullData += tr("<br><nobr><b>Adapter %1 (%2)</b>: cable %3</nobr>", "Network adapters tooltip")
     268                strFullData += QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>Adapter %1 (%2)</b>: cable %3</nobr>", "Network adapters tooltip")
    269269                    .arg(uSlot + 1)
    270270                    .arg(vboxGlobal().toString(adapter.GetAttachmentType()))
    271271                    .arg(adapter.GetCableConnected() ?
    272                           tr("connected", "Network adapters tooltip") :
    273                           tr("disconnected", "Network adapters tooltip"));
     272                          QApplication::translate("VBoxConsoleWnd", "connected", "Network adapters tooltip") :
     273                          QApplication::translate("VBoxConsoleWnd", "disconnected", "Network adapters tooltip"));
    274274        }
    275275
    276276        if (strFullData.isNull())
    277             strFullData = tr("<br><nobr><b>All network adapters are disabled</b></nobr>", "Network adapters tooltip");
     277            strFullData = QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>All network adapters are disabled</b></nobr>", "Network adapters tooltip");
    278278
    279279        setToolTip(strToolTip.arg(strFullData));
     
    313313        const CMachine &machine = m_session.GetMachine();
    314314
    315         QString strToolTip = tr("<p style='white-space:pre'><nobr>Indicates the activity of "
     315        QString strToolTip = QApplication::translate("VBoxConsoleWnd", "<p style='white-space:pre'><nobr>Indicates the activity of "
    316316                                "the attached USB devices:</nobr>%1</p>", "USB device tooltip");
    317317        QString strFullData;
     
    329329            }
    330330            if (strFullData.isNull())
    331                 strFullData = tr("<br><nobr><b>No USB devices attached</b></nobr>", "USB device tooltip");
     331                strFullData = QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>No USB devices attached</b></nobr>", "USB device tooltip");
    332332        }
    333333        else
    334             strFullData = tr("<br><nobr><b>USB Controller is disabled</b></nobr>", "USB device tooltip");
     334            strFullData = QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>USB Controller is disabled</b></nobr>", "USB device tooltip");
    335335
    336336        setToolTip(strToolTip.arg(strFullData));
     
    371371        const CConsole &console = m_session.GetConsole();
    372372
    373         QString strToolTip = tr("<p style='white-space:pre'><nobr>Indicates the activity of "
     373        QString strToolTip = QApplication::translate("VBoxConsoleWnd", "<p style='white-space:pre'><nobr>Indicates the activity of "
    374374                                "the machine's shared folders:</nobr>%1</p>", "Shared folders tooltip");
    375375
     
    407407
    408408        if (sfs.count() == 0)
    409             strFullData = tr("<br><nobr><b>No shared folders</b></nobr>", "Shared folders tooltip");
     409            strFullData = QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>No shared folders</b></nobr>", "Shared folders tooltip");
    410410
    411411        setToolTip(strToolTip.arg(strFullData));
     
    449449            setState(fVRDPEnabled ? 1 : 0);
    450450
    451             QString tip = tr("Indicates whether the Remote Display (VRDP Server) "
     451            QString tip = QApplication::translate("VBoxConsoleWnd", "Indicates whether the Remote Display (VRDP Server) "
    452452                             "is enabled (<img src=:/vrdp_16px.png/>) or not "
    453453                             "(<img src=:/vrdp_disabled_16px.png/>).");
    454454            if (vrdpsrv.GetEnabled())
    455                 tip += tr ("<hr>The VRDP Server is listening on port %1").arg(vrdpsrv.GetPorts());
     455                tip += QApplication::translate("VBoxConsoleWnd", "<hr>The VRDP Server is listening on port %1").arg(vrdpsrv.GetPorts());
    456456            setToolTip(tip);
    457457        }
     
    499499            VBoxGlobal::tr("Disabled", "nested paging");
    500500
    501         QString tip(tr("Indicates the status of the hardware virtualization "
     501        QString tip(QApplication::translate("VBoxConsoleWnd", "Indicates the status of the hardware virtualization "
    502502                       "features used by this virtual machine:"
    503503                       "<br><nobr><b>%1:</b>&nbsp;%2</nobr>"
     
    509509        int cpuCount = console.GetMachine().GetCPUCount();
    510510        if (cpuCount > 1)
    511             tip += tr("<br><nobr><b>%1:</b>&nbsp;%2</nobr>", "Virtualization Stuff LED")
     511            tip += QApplication::translate("VBoxConsoleWnd", "<br><nobr><b>%1:</b>&nbsp;%2</nobr>", "Virtualization Stuff LED")
    512512                      .arg(VBoxGlobal::tr("Processor(s)", "details report")).arg(cpuCount);
    513513
     
    543543    void retranslateUi()
    544544    {
    545         setToolTip(tr("Indicates whether the host mouse pointer is captured by the guest OS:<br>"
     545        setToolTip(QApplication::translate("VBoxConsoleWnd", "Indicates whether the host mouse pointer is captured by the guest OS:<br>"
    546546                      "<nobr><img src=:/mouse_disabled_16px.png/>&nbsp;&nbsp;pointer is not captured</nobr><br>"
    547547                      "<nobr><img src=:/mouse_16px.png/>&nbsp;&nbsp;pointer is captured</nobr><br>"
     
    594594    void retranslateUi()
    595595    {
    596         setToolTip(tr("Indicates whether the keyboard is captured by the guest OS "
     596        setToolTip(QApplication::translate("VBoxConsoleWnd", "Indicates whether the keyboard is captured by the guest OS "
    597597                      "(<img src=:/hostkey_captured_16px.png/>) or not (<img src=:/hostkey_16px.png/>)."));
    598598    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r27678 r28020  
    136136    void retranslateUi()
    137137    {
    138         setWindowTitle(tr("Network Adapters"));
     138        setWindowTitle(QApplication::translate("VBoxNetworkDialog", "Network Adapters"));
    139139    }
    140140
     
    210210    void retranslateUi()
    211211    {
    212         setWindowTitle(tr("Shared Folders"));
     212        setWindowTitle(QApplication::translate("VBoxSFDialog", "Shared Folders"));
    213213    }
    214214
     
    241241    CSession &m_session;
    242242};
    243 
    244 #if 0 // TODO: Rework additions downloader logic!
    245 class UIAdditionsDownloader : public VBoxDownloaderWgt
    246 {
    247     Q_OBJECT;
    248 
    249 public:
    250 
    251     UIAdditionsDownloader (const QString &aSource, const QString &aTarget, QAction *aAction)
    252         : VBoxDownloaderWgt (aSource, aTarget)
    253         , mAction (aAction)
    254     {
    255         mAction->setEnabled (false);
    256         retranslateUi();
    257     }
    258 
    259     void start()
    260     {
    261         acknowledgeStart();
    262     }
    263 
    264 protected:
    265 
    266     void retranslateUi()
    267     {
    268         mCancelButton->setText (tr ("Cancel"));
    269         mProgressBar->setToolTip (tr ("Downloading the VirtualBox Guest Additions "
    270                                       "CD image from <nobr><b>%1</b>...</nobr>")
    271                                       .arg (mSource.toString()));
    272         mCancelButton->setToolTip (tr ("Cancel the VirtualBox Guest "
    273                                        "Additions CD image download"));
    274     }
    275 
    276 private slots:
    277 
    278     void downloadFinished (bool aError)
    279     {
    280         if (aError)
    281             VBoxDownloaderWgt::downloadFinished (aError);
    282         else
    283         {
    284             QByteArray receivedData (mHttp->readAll());
    285             /* Serialize the incoming buffer into the .iso image. */
    286             while (true)
    287             {
    288                 QFile file (mTarget);
    289                 if (file.open (QIODevice::WriteOnly))
    290                 {
    291                     file.write (receivedData);
    292                     file.close();
    293                     //if (vboxProblem().confirmMountAdditions (mSource.toString(),QDir::toNativeSeparators (mTarget)))
    294                     //    vboxGlobal().consoleWnd().installGuestAdditionsFrom (mTarget);
    295                     QTimer::singleShot (0, this, SLOT (suicide()));
    296                     break;
    297                 }
    298                 else
    299                 {
    300                     vboxProblem().message (window(), VBoxProblemReporter::Error,
    301                         tr ("<p>Failed to save the downloaded file as "
    302                             "<nobr><b>%1</b>.</nobr></p>")
    303                         .arg (QDir::toNativeSeparators (mTarget)));
    304                 }
    305 
    306                 QString target = QIFileDialog::getExistingDirectory (
    307                     QFileInfo (mTarget).absolutePath(), this,
    308                     tr ("Select folder to save Guest Additions image to"), true);
    309                 if (target.isNull())
    310                     QTimer::singleShot (0, this, SLOT (suicide()));
    311                 else
    312                     mTarget = QDir (target).absoluteFilePath (QFileInfo (mTarget).fileName());
    313             }
    314         }
    315     }
    316 
    317     void suicide()
    318     {
    319         QStatusBar *sb = qobject_cast <QStatusBar*> (parent());
    320         Assert (sb);
    321         sb->removeWidget (this);
    322         mAction->setEnabled (true);
    323         VBoxDownloaderWgt::suicide();
    324     }
    325 
    326 private:
    327 
    328     bool confirmDownload()
    329     {
    330         return vboxProblem().confirmDownloadAdditions (mSource.toString(),
    331             mHttp->lastResponse().contentLength());
    332     }
    333 
    334     void warnAboutError (const QString &aError)
    335     {
    336         return vboxProblem().cannotDownloadGuestAdditions (mSource.toString(), aError);
    337     }
    338 
    339     QAction *mAction;
    340 };
    341 #endif
    342243
    343244UIMachineLogic* UIMachineLogic::create(QObject *pParent,
     
    469370        {
    470371            QAction *pAction = actions.at(i);
    471             pAction->setText(tr("Preview Monitor %1").arg(pAction->data().toInt() + 1));
     372            pAction->setText(QApplication::translate("VBoxConsoleWnd", "Preview Monitor %1").arg(pAction->data().toInt() + 1));
    472373        }
    473374    }
     
    993894
    994895    /* Search for the max available filter index. */
    995     QString strNameTemplate = tr("Snapshot %1");
     896    QString strNameTemplate = QApplication::translate("VBoxConsoleWnd", "Snapshot %1");
    996897    int iMaxSnapshotIndex = searchMaxSnapshotIndex(machine, machine.GetSnapshot(QString()), strNameTemplate);
    997898    dlg.mLeName->setText(strNameTemplate.arg(++ iMaxSnapshotIndex));
     
    12091110            {
    12101111                case VBoxDefs::MediumType_DVD:
    1211                     callVMMAction->setText(tr("More CD/DVD Images..."));
    1212                     unmountMediumAction->setText(tr("Unmount CD/DVD Device"));
     1112                    callVMMAction->setText(QApplication::translate("VBoxConsoleWnd", "More CD/DVD Images..."));
     1113                    unmountMediumAction->setText(QApplication::translate("VBoxConsoleWnd", "Unmount CD/DVD Device"));
    12131114                    unmountMediumAction->setIcon(VBoxGlobal::iconSet(":/cd_unmount_16px.png",
    12141115                                                                     ":/cd_unmount_dis_16px.png"));
    12151116                    break;
    12161117                case VBoxDefs::MediumType_Floppy:
    1217                     callVMMAction->setText(tr("More Floppy Images..."));
    1218                     unmountMediumAction->setText(tr("Unmount Floppy Device"));
     1118                    callVMMAction->setText(QApplication::translate("VBoxConsoleWnd", "More Floppy Images..."));
     1119                    unmountMediumAction->setText(QApplication::translate("VBoxConsoleWnd", "Unmount Floppy Device"));
    12191120                    unmountMediumAction->setIcon(VBoxGlobal::iconSet(":/fd_unmount_16px.png",
    12201121                                                                     ":/fd_unmount_dis_16px.png"));
     
    12351136        {
    12361137            case VBoxDefs::MediumType_DVD:
    1237                 pEmptyMenuAction->setText(tr("No CD/DVD Devices Attached"));
    1238                 pEmptyMenuAction->setToolTip(tr("No CD/DVD devices attached to that VM"));
     1138                pEmptyMenuAction->setText(QApplication::translate("VBoxConsoleWnd", "No CD/DVD Devices Attached"));
     1139                pEmptyMenuAction->setToolTip(QApplication::translate("VBoxConsoleWnd", "No CD/DVD devices attached to that VM"));
    12391140                break;
    12401141            case VBoxDefs::MediumType_Floppy:
    1241                 pEmptyMenuAction->setText(tr("No Floppy Devices Attached"));
    1242                 pEmptyMenuAction->setToolTip(tr("No floppy devices attached to that VM"));
     1142                pEmptyMenuAction->setText(QApplication::translate("VBoxConsoleWnd", "No Floppy Devices Attached"));
     1143                pEmptyMenuAction->setToolTip(QApplication::translate("VBoxConsoleWnd", "No floppy devices attached to that VM"));
    12431144                break;
    12441145            default:
     
    13441245        QAction *pEmptyMenuAction = new QAction(pMenu);
    13451246        pEmptyMenuAction->setEnabled(false);
    1346         pEmptyMenuAction->setText(tr("No USB Devices Connected"));
     1247        pEmptyMenuAction->setText(QApplication::translate("VBoxConsoleWnd", "No USB Devices Connected"));
    13471248        pEmptyMenuAction->setIcon(VBoxGlobal::iconSet(":/delete_16px.png", ":/delete_dis_16px.png"));
    1348         pEmptyMenuAction->setToolTip(tr("No supported devices connected to the host PC"));
     1249        pEmptyMenuAction->setToolTip(QApplication::translate("VBoxConsoleWnd", "No supported devices connected to the host PC"));
    13491250    }
    13501251    else
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r27695 r28020  
    242242
    243243    m_pNameHostkey->setToolTip(
    244         tr("Shows the currently assigned Host key.<br>"
     244        QApplication::translate("VBoxConsoleWnd", "Shows the currently assigned Host key.<br>"
    245245           "This key, when pressed alone, toggles the keyboard and mouse "
    246246           "capture state. It can also be used in combination with other keys "
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