VirtualBox

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


Ignore:
Timestamp:
Mar 4, 2020 4:32:34 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Details pane: More obvious NLS tags for cloud VM details elements which still being loading.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp

    r83191 r83202  
    149149    /* Domain: */
    150150    if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral_Location)
    151         table << UITextTableLine(QApplication::translate("UIDetails", "Domain", "details (general)"),
    152                                  guiCloudMachine.domain());
     151    {
     152        const QString strDomain = guiCloudMachine.domain();
     153        const QString strResult = !strDomain.isEmpty()
     154                                ? strDomain
     155                                : QApplication::translate("UIDetails", "Checking ...", "details");
     156        table << UITextTableLine(QApplication::translate("UIDetails", "Domain", "details (general)"), strResult);
     157    }
    153158
    154159    return table;
     
    294299
    295300    /* Instance Shape: */
    296     table << UITextTableLine(QApplication::translate("UIDetails", "Shape", "details (system)"),
    297                              guiCloudMachine.instanceShape());
     301    {
     302        const QString strShape = guiCloudMachine.instanceShape();
     303        const QString strResult = !strShape.isEmpty()
     304                                ? strShape
     305                                : QApplication::translate("UIDetails", "Checking ...", "details");
     306        table << UITextTableLine(QApplication::translate("UIDetails", "Shape", "details (system)"), strResult);
     307    }
    298308
    299309    /* Base memory: */
    300310    if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_RAM)
    301         table << UITextTableLine(QApplication::translate("UIDetails", "Base Memory", "details (system)"),
    302                                  QApplication::translate("UIDetails", "%1 MB").arg(guiCloudMachine.memorySize()));
     311    {
     312        const int iMemorySize = guiCloudMachine.memorySize();
     313        const QString strResult = iMemorySize > 0
     314                                ? QApplication::translate("UIDetails", "%1 MB").arg(iMemorySize)
     315                                : QApplication::translate("UIDetails", "Checking ...", "details");
     316        table << UITextTableLine(QApplication::translate("UIDetails", "Base Memory", "details (system)"), strResult);
     317    }
    303318
    304319    /* Processors: */
    305320    if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_CPUCount)
    306         table << UITextTableLine(QApplication::translate("UIDetails", "Processors", "details (system)"),
    307                                  QString::number(guiCloudMachine.cpuCount()));
     321    {
     322        const int cCpuCount = guiCloudMachine.cpuCount();
     323        const QString strResult = cCpuCount > 0
     324                                ? QString::number(cCpuCount)
     325                                : QApplication::translate("UIDetails", "Checking ...", "details");
     326        table << UITextTableLine(QApplication::translate("UIDetails", "Processors", "details (system)"), strResult);
     327    }
    308328
    309329    /* Booting firmware: */
    310330    if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Firmware)
    311         table << UITextTableLine(QApplication::translate("UIDetails", "Booting Firmware", "details (system)"),
    312                                  guiCloudMachine.bootingFirmware());
     331    {
     332        const QString strBottingFirmware = guiCloudMachine.bootingFirmware();
     333        const QString strResult = !strBottingFirmware.isEmpty()
     334                                ? strBottingFirmware
     335                                : QApplication::translate("UIDetails", "Checking ...", "details");
     336        table << UITextTableLine(QApplication::translate("UIDetails", "Booting Firmware", "details (system)"), strResult);
     337    }
    313338
    314339    return table;
     
    559584        const QString strResult = !strImageName.isEmpty() && !strImageSize.isEmpty()
    560585                                ? QString("%1 (%2)").arg(strImageName, strImageSize)
    561                                 : QString();
     586                                : QApplication::translate("UIDetails", "Checking ...", "details");
    562587        table << UITextTableLine(QApplication::translate("UIDetails", "Image", "details (storage)"), strResult);
    563588    }
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