VirtualBox

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


Ignore:
Timestamp:
Jul 9, 2024 1:48:30 PM (7 months ago)
Author:
vboxsync
Message:

FE/Qt: NLS stuff: Make sure B/KB/MB/GB/TB/PB suffixes are located in UITranslator context only.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r103771 r105239  
    111111    switch (sizeSuffix)
    112112    {
    113         case SizeSuffix_Byte:     strResult = QApplication::translate("UICommon", "B", "size suffix Bytes"); break;
    114         case SizeSuffix_KiloByte: strResult = QApplication::translate("UICommon", "KB", "size suffix KBytes=1024 Bytes"); break;
    115         case SizeSuffix_MegaByte: strResult = QApplication::translate("UICommon", "MB", "size suffix MBytes=1024 KBytes"); break;
    116         case SizeSuffix_GigaByte: strResult = QApplication::translate("UICommon", "GB", "size suffix GBytes=1024 MBytes"); break;
    117         case SizeSuffix_TeraByte: strResult = QApplication::translate("UICommon", "TB", "size suffix TBytes=1024 GBytes"); break;
    118         case SizeSuffix_PetaByte: strResult = QApplication::translate("UICommon", "PB", "size suffix PBytes=1024 TBytes"); break;
     113        case SizeSuffix_Byte:     strResult = QApplication::translate("UITranslator", "B", "size suffix Bytes"); break;
     114        case SizeSuffix_KiloByte: strResult = QApplication::translate("UITranslator", "KB", "size suffix KBytes=1024 Bytes"); break;
     115        case SizeSuffix_MegaByte: strResult = QApplication::translate("UITranslator", "MB", "size suffix MBytes=1024 KBytes"); break;
     116        case SizeSuffix_GigaByte: strResult = QApplication::translate("UITranslator", "GB", "size suffix GBytes=1024 MBytes"); break;
     117        case SizeSuffix_TeraByte: strResult = QApplication::translate("UITranslator", "TB", "size suffix TBytes=1024 GBytes"); break;
     118        case SizeSuffix_PetaByte: strResult = QApplication::translate("UITranslator", "PB", "size suffix PBytes=1024 TBytes"); break;
    119119        default:
    120120        {
     
    130130{
    131131    QHash<QString, SizeSuffix> list;
    132     list.insert(QApplication::translate("UICommon", "B", "size suffix Bytes"),               SizeSuffix_Byte);
    133     list.insert(QApplication::translate("UICommon", "KB", "size suffix KBytes=1024 Bytes"),  SizeSuffix_KiloByte);
    134     list.insert(QApplication::translate("UICommon", "MB", "size suffix MBytes=1024 KBytes"), SizeSuffix_MegaByte);
    135     list.insert(QApplication::translate("UICommon", "GB", "size suffix GBytes=1024 MBytes"), SizeSuffix_GigaByte);
    136     list.insert(QApplication::translate("UICommon", "TB", "size suffix TBytes=1024 GBytes"), SizeSuffix_TeraByte);
    137     list.insert(QApplication::translate("UICommon", "PB", "size suffix PBytes=1024 TBytes"), SizeSuffix_PetaByte);
     132    list.insert(QApplication::translate("UITranslator", "B", "size suffix Bytes"),               SizeSuffix_Byte);
     133    list.insert(QApplication::translate("UITranslator", "KB", "size suffix KBytes=1024 Bytes"),  SizeSuffix_KiloByte);
     134    list.insert(QApplication::translate("UITranslator", "MB", "size suffix MBytes=1024 KBytes"), SizeSuffix_MegaByte);
     135    list.insert(QApplication::translate("UITranslator", "GB", "size suffix GBytes=1024 MBytes"), SizeSuffix_GigaByte);
     136    list.insert(QApplication::translate("UITranslator", "TB", "size suffix TBytes=1024 GBytes"), SizeSuffix_TeraByte);
     137    list.insert(QApplication::translate("UITranslator", "PB", "size suffix PBytes=1024 TBytes"), SizeSuffix_PetaByte);
    138138    if (!list.contains(strSizeSuffix))
    139139    {
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp

    r105233 r105239  
    245245            strResult = QString("%1 %2")
    246246                            .arg(comValue.GetInteger())
    247                             .arg(QApplication::translate("UICommon", comValue.GetSuffix().toUtf8().constData()));
     247                            .arg(QApplication::translate("UITranslator", comValue.GetSuffix().toUtf8().constData()));
    248248            break;
    249249        }
     
    253253            strResult = QString("%1 %2")
    254254                            .arg(comValue.GetInteger())
    255                             .arg(QApplication::translate("UICommon", comValue.GetSuffix().toUtf8().constData()));
     255                            .arg(QApplication::translate("UITranslator", comValue.GetSuffix().toUtf8().constData()));
    256256            break;
    257257        }
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp

    r104358 r105239  
    541541                    }
    542542                    case KVirtualSystemDescriptionType_OS:               value = gpGlobalSession->guestOSTypeManager().getDescription(m_strConfigValue); break;
    543                     case KVirtualSystemDescriptionType_Memory:           value = m_strConfigValue + " " + QApplication::translate("UICommon", "MB", "size suffix MBytes=1024 KBytes"); break;
     543                    case KVirtualSystemDescriptionType_Memory:           value = m_strConfigValue + " " + QApplication::translate("UITranslator", "MB", "size suffix MBytes=1024 KBytes"); break;
    544544                    case KVirtualSystemDescriptionType_SoundCard:        value = gpConverter->toString(static_cast<KAudioControllerType>(m_strConfigValue.toInt())); break;
    545545                    case KVirtualSystemDescriptionType_NetworkAdapter:   value = gpConverter->toString(static_cast<KNetworkAdapterType>(m_strConfigValue.toInt())); break;
     
    827827                QSpinBox *pSpinBox = new QSpinBox(pParent);
    828828                pSpinBox->setRange(UIApplianceEditorWidget::minGuestRAM(), UIApplianceEditorWidget::maxGuestRAM());
    829                 pSpinBox->setSuffix(" " + QApplication::translate("UICommon", "MB", "size suffix MBytes=1024 KBytes"));
     829                pSpinBox->setSuffix(" " + QApplication::translate("UITranslator", "MB", "size suffix MBytes=1024 KBytes"));
    830830                pEditor = pSpinBox;
    831831                break;
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