VirtualBox

Changeset 75662 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 22, 2018 12:47:42 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126854
Message:

FE/Qt: bugref:6699. Some translation work

Location:
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp

    r75643 r75662  
    428428    QString detailsString(m_strProperty);
    429429    detailsString += "<br/>";
    430     detailsString += "<b>Total Size:</b> " + QString::number(directoryStatistics.m_totalSize) + QString(" bytes");
     430    detailsString += "<b>" + UIGuestControlFileManager::tr("Total Size") + "</b> " +
     431        QString::number(directoryStatistics.m_totalSize) + UIGuestControlFileManager::tr(" bytes");
    431432    if (directoryStatistics.m_totalSize >= UIGuestControlFileTable::m_iKiloByte)
    432433        detailsString += " (" + UIGuestControlFileTable::humanReadableSize(directoryStatistics.m_totalSize) + ")";
    433434    detailsString += "<br/>";
    434435
    435     detailsString += "<b>File Count:</b> " + QString::number(directoryStatistics.m_uFileCount);
     436    detailsString += "<b>" + UIGuestControlFileManager::tr("File Count") + ":</b> " +
     437        QString::number(directoryStatistics.m_uFileCount);
    436438
    437439    m_pInfoEdit->setHtml(detailsString);
    438 
    439 }
     440}
     441
    440442
    441443/*********************************************************************************************************************************
    442 *   UIDirectoryStatistics implementation.
    443                                                                                         *
     444*   UIDirectoryStatistics implementation.                                                                                        *
    444445*********************************************************************************************************************************/
    445446
     
    479480        return;
    480481    m_childItems.append(item);
    481 
    482482    m_childMap.insert(item->name(), item);
    483483}
     
    662662        pLayout->addWidget(m_pAskNextTimeCheckBox);
    663663        m_pAskNextTimeCheckBox->setText(UIGuestControlFileManager::tr("Ask for this confirmation next time"));
     664        m_pAskNextTimeCheckBox->setToolTip(UIGuestControlFileManager::tr("Delete confirmation can be "
     665                                                                         "disabled/enabled also from the Options panel."));
    664666    }
    665667}
     
    830832    QVector<QVariant> headData;
    831833    headData.resize(UIGuestControlFileModelColumn_Max);
    832     headData[UIGuestControlFileModelColumn_Name] = "Name";
    833     headData[UIGuestControlFileModelColumn_Size] = "Size";
    834     headData[UIGuestControlFileModelColumn_ChangeTime] = "Change Time";
    835     headData[UIGuestControlFileModelColumn_Owner] = "Owner";
    836     headData[UIGuestControlFileModelColumn_Permissions] = "Permissions";
    837834    m_pRootItem = new UIFileTableItem(headData, 0, FileObjectType_Directory);
    838835    UIFileTableItem* startItem = new UIFileTableItem(createTreeItemData(startPath, 4096, QDateTime(),
     
    12531250void UIGuestControlFileTable::retranslateUi()
    12541251{
     1252    if (m_pRootItem)
     1253    {
     1254        m_pRootItem->setData(UIGuestControlFileManager::tr("Name"), UIGuestControlFileModelColumn_Name);
     1255        m_pRootItem->setData(UIGuestControlFileManager::tr("Size"), UIGuestControlFileModelColumn_Size);
     1256        m_pRootItem->setData(UIGuestControlFileManager::tr("Change Time"), UIGuestControlFileModelColumn_ChangeTime);
     1257        m_pRootItem->setData(UIGuestControlFileManager::tr("Owner"), UIGuestControlFileModelColumn_Owner);
     1258        m_pRootItem->setData(UIGuestControlFileManager::tr("Permissions"), UIGuestControlFileModelColumn_Permissions);
     1259    }
    12551260}
    12561261
     
    13971402QString UIGuestControlFileTable::fileTypeString(FileObjectType type)
    13981403{
    1399     QString strType("Unknown");
     1404    QString strType = UIGuestControlFileManager::tr("Unknown");
    14001405    switch(type)
    14011406    {
    14021407        case FileObjectType_File:
    1403             strType = "File";
     1408            strType = UIGuestControlFileManager::tr("File");
    14041409            break;
    14051410        case FileObjectType_Directory:
    1406             strType = "Directory";
     1411            strType = UIGuestControlFileManager::tr("Directory");
    14071412            break;
    14081413        case FileObjectType_SymLink:
    1409             strType = "Symbolic Link";
     1414            strType = UIGuestControlFileManager::tr("Symbolic Link");
    14101415            break;
    14111416        case FileObjectType_Other:
    1412             strType = "Other";
     1417            strType = UIGuestControlFileManager::tr("Other");
    14131418            break;
    14141419
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp

    r75610 r75662  
    2929# include "UIActionPool.h"
    3030# include "UIErrorString.h"
     31# include "UIGuestControlFileManager.h"
    3132# include "UIGuestFileTable.h"
    3233# include "UIMessageCenter.h"
     
    167168{
    168169    if (m_pLocationLabel)
    169         m_pLocationLabel->setText(QApplication::translate("UIGuestControlFileManager", "Guest System"));
     170        m_pLocationLabel->setText(UIGuestControlFileManager::tr("Guest System"));
    170171    UIGuestControlFileTable::retranslateUi();
    171172}
     
    439440
    440441        /* Name: */
    441         propertyString += "<b>Name:</b> " + UIPathOperations::getObjectName(fileInfo.GetName()) + "\n";
    442         propertyString += "<br/>";
     442        propertyString += "<b>" + UIGuestControlFileManager::tr("Name") + ":</b> " +
     443            UIPathOperations::getObjectName(fileInfo.GetName()) + "\n" + "<br/>";
    443444        /* Size: */
    444445        LONG64 size = fileInfo.GetObjectSize();
    445         propertyString += "<b>Size:</b> " + QString::number(size) + QString(" bytes");
     446        propertyString += "<b>" + UIGuestControlFileManager::tr("Size") + ":</b> " + QString::number(size) +
     447            UIGuestControlFileManager::tr(" bytes");
    446448        if (size >= 1024)
    447             propertyString += " (" + humanReadableSize(size) + ")";
    448         propertyString += "<br/>";
     449            propertyString += " (" + humanReadableSize(size) + ")" + "<br/>";
    449450        /* Type: */
    450         propertyString += "<b>Type:</b> " + fileTypeString(fileType(fileInfo));
    451         propertyString += "<br/>";
     451        propertyString += "<b>" + UIGuestControlFileManager::tr("Type") + ":</b> " + fileTypeString(fileType(fileInfo)) + "<br/>";
    452452        /* Creation Date: */
    453         propertyString += "<b>Created:</b> " + QDateTime::fromMSecsSinceEpoch(fileInfo.GetChangeTime()/1000000).toString();
    454         propertyString += "<br/>";
     453        propertyString += "<b>" + UIGuestControlFileManager::tr("Created") + ":</b> " +
     454            QDateTime::fromMSecsSinceEpoch(fileInfo.GetChangeTime()/1000000).toString() + "<br/>";
    455455        /* Last Modification Date: */
    456         propertyString += "<b>Modified:</b> " + QDateTime::fromMSecsSinceEpoch(fileInfo.GetModificationTime()/1000000).toString();
    457         propertyString += "<br/>";
     456        propertyString += "<b>" + UIGuestControlFileManager::tr("Modified") + ":</b> " +
     457            QDateTime::fromMSecsSinceEpoch(fileInfo.GetModificationTime()/1000000).toString() + "<br/>";
    458458        /* Owner: */
    459         propertyString += "<b>Owner:</b> " + fileInfo.GetUserName();
     459        propertyString += "<b>" + UIGuestControlFileManager::tr("Owner") + ":</b> " + fileInfo.GetUserName();
    460460        return propertyString;
    461461    }
     
    483483    }
    484484    QString propertyString;
    485     propertyString += "<b>Selected:</b> " + QString::number(fileCount) + " files ";
    486     propertyString += "and " + QString::number(directoryCount) + " directories";
    487     propertyString += "<br/>";
    488     propertyString += "<b>Size:</b> " + QString::number(totalSize) + QString(" bytes");
     485    propertyString += "<b>" + UIGuestControlFileManager::tr("Selected:") + "</b> " + QString::number(fileCount) + " files ";
     486    propertyString += UIGuestControlFileManager::tr("and ") + QString::number(directoryCount) + " " +
     487        UIGuestControlFileManager::tr("directories") + "<br/>";
     488    propertyString += "<b>" + UIGuestControlFileManager::tr("Size:") + "</b> " + QString::number(totalSize) +
     489        UIGuestControlFileManager::tr(" bytes");
    489490    if (totalSize >= m_iKiloByte)
    490491        propertyString += " (" + humanReadableSize(totalSize) + ")";
     
    527528    // }
    528529
    529     m_pPropertiesDialog->setWindowTitle("Properties");
     530    m_pPropertiesDialog->setWindowTitle(UIGuestControlFileManager::tr("Properties"));
    530531    m_pPropertiesDialog->setPropertyText(fsPropertyString);
    531532    m_pPropertiesDialog->execute();
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp

    r75619 r75662  
    2828# include "QILabel.h"
    2929# include "UIActionPool.h"
     30# include "UIGuestControlFileManager.h"
    3031# include "UIGuestControlFileModel.h"
    3132# include "UIHostFileTable.h"
     
    142143{
    143144    if (m_pLocationLabel)
    144         m_pLocationLabel->setText(QApplication::translate("UIGuestControlFileManager", "Host System"));
     145        m_pLocationLabel->setText(UIGuestControlFileManager::tr("Host System"));
    145146    UIGuestControlFileTable::retranslateUi();
    146147}
     
    367368        QString propertyString;
    368369        /* Name: */
    369         propertyString += "<b>Name:</b> " + fileInfo.fileName() + "\n";
     370        propertyString += "<b>" + UIGuestControlFileManager::tr("Name") + ":</b> " + fileInfo.fileName() + "\n";
    370371        if (!fileInfo.suffix().isEmpty())
    371372            propertyString += "." + fileInfo.suffix();
    372373        propertyString += "<br/>";
    373374        /* Size: */
    374         propertyString += "<b>Size:</b> " + QString::number(fileInfo.size()) + QString(" bytes");
     375        propertyString += "<b>" + UIGuestControlFileManager::tr("Size") + ":</b> " +
     376            QString::number(fileInfo.size()) + UIGuestControlFileManager::tr(" bytes");
    375377        if (fileInfo.size() >= m_iKiloByte)
    376378            propertyString += " (" + humanReadableSize(fileInfo.size()) + ")";
    377379        propertyString += "<br/>";
    378380        /* Type: */
    379         propertyString += "<b>Type:</b> " + fileTypeString(fileType(fileInfo));
     381        propertyString += "<b>" + UIGuestControlFileManager::tr("Type") + ":</b> " + fileTypeString(fileType(fileInfo));
    380382        propertyString += "<br/>";
    381383        /* Creation Date: */
    382         propertyString += "<b>Created:</b> " + fileInfo.created().toString();
     384        propertyString += "<b>" + UIGuestControlFileManager::tr("Created") + ":</b> " + fileInfo.created().toString();
    383385        propertyString += "<br/>";
    384386        /* Last Modification Date: */
    385         propertyString += "<b>Modified:</b> " + fileInfo.lastModified().toString();
     387        propertyString += "<b>" + UIGuestControlFileManager::tr("Modified") + ":</b> " + fileInfo.lastModified().toString();
    386388        propertyString += "<br/>";
    387389        /* Owner: */
    388         propertyString += "<b>Owner:</b> " + fileInfo.owner();
     390        propertyString += "<b>" + UIGuestControlFileManager::tr("Owner") + ":</b> " + fileInfo.owner();
    389391
    390392        return propertyString;
     
    407409    }
    408410    QString propertyString;
    409     propertyString += "<b>Selected:</b> " + QString::number(fileCount) + " files ";
    410     propertyString += "and " + QString::number(directoryCount) + " directories";
     411    propertyString += "<b>" + UIGuestControlFileManager::tr("Selected") + ":</b> " + QString::number(fileCount) +
     412        " " + UIGuestControlFileManager::tr("files") + " ";
     413    propertyString += UIGuestControlFileManager::tr("and") + " " + QString::number(directoryCount) + " " +
     414        UIGuestControlFileManager::tr("directories");
    411415    propertyString += "<br/>";
    412     propertyString += "<b>Size:</b> " + QString::number(totalSize) + QString(" bytes");
     416    propertyString += "<b>" + UIGuestControlFileManager::tr("Size") + ":</b> " + QString::number(totalSize) + " " +
     417        UIGuestControlFileManager::tr("bytes");
    413418    if (totalSize >= m_iKiloByte)
    414419        propertyString += " (" + humanReadableSize(totalSize) + ")";
Note: See TracChangeset for help on using the changeset viewer.

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