- Timestamp:
- Apr 26, 2010 3:34:00 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60641
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r28758 r28759 1978 1978 1979 1979 QString item = QString (sSectionItemTpl2).arg (tr ("Base Memory", "details report"), 1980 tr ("<nobr>%1 M iB</nobr>", "details report"))1980 tr ("<nobr>%1 MB</nobr>", "details report")) 1981 1981 .arg (aMachine.GetMemorySize()) 1982 1982 + QString (sSectionItemTpl2).arg (tr ("Processor(s)", "details report"), … … 2011 2011 QString item = QString(sSectionItemTpl2) 2012 2012 .arg(tr ("Video Memory", "details report"), 2013 tr ("<nobr>%1 M iB</nobr>", "details report"))2013 tr ("<nobr>%1 MB</nobr>", "details report")) 2014 2014 .arg(aMachine.GetVRAMSize()); 2015 2015 ++rows; … … 3832 3832 /** 3833 3833 * Returns the regexp string that defines the format of the human-readable 3834 * size representation, <tt>####[.##] B| kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB</tt>.3834 * size representation, <tt>####[.##] B|KB|MB|GB|TB|PB</tt>. 3835 3835 * 3836 3836 * This regexp will capture 5 groups of text: … … 3847 3847 { 3848 3848 QString regexp = 3849 tr ("^(?:(?:(\\d+)(?:\\s?(B| kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB))?)|(?:(\\d*)%1(\\d{1,2})(?:\\s?(kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB))))$", "regexp for matching ####[.##] B|kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB, %1=decimal point")3849 tr ("^(?:(?:(\\d+)(?:\\s?(B|KB|MB|GB|TB|PB))?)|(?:(\\d*)%1(\\d{1,2})(?:\\s?(KB|MB|GB|TB|PB))))$", "regexp for matching ####[.##] B|KB|MB|GB|TB|PB, %1=decimal point") 3850 3850 .arg (decimalSep()); 3851 3851 return regexp; … … 3854 3854 /** 3855 3855 * Parses the given size string that should be in form of 3856 * <tt>####[.##] B| kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB</tt> and returns3856 * <tt>####[.##] B|KB|MB|GB|TB|PB</tt> and returns 3857 3857 * the size value in bytes. Zero is returned on error. 3858 3858 */ … … 3877 3877 if (suff.isEmpty() || suff == tr ("B", "size suffix Bytes")) 3878 3878 denom = 1; 3879 else if (suff == tr ("kB", "size suffix kBytes=1000 Bytes")) 3880 denom = 1000; 3881 else if ( suff == tr ("KiB", "size suffix KiBytes") 3882 || suff == tr ("KB", "size suffix legacy KB=KiBytes")) 3879 else if (suff == tr ("KB", "size suffix KBytes=1024 Bytes")) 3883 3880 denom = _1K; 3884 else if (suff == tr ("MB", "size suffix MBytes=1000 kBytes")) 3885 denom = 1000000; 3886 else if (suff == tr ("MiB", "size suffix MiBytes")) 3881 else if (suff == tr ("MB", "size suffix MBytes=1024 KBytes")) 3887 3882 denom = _1M; 3888 else if (suff == tr ("GB", "size suffix GBytes=1000 MBytes")) 3889 denom = 1000000000; 3890 else if (suff == tr ("GiB", "size suffix GiBytes")) 3883 else if (suff == tr ("GB", "size suffix GBytes=1024 MBytes")) 3891 3884 denom = _1G; 3892 else if (suff == tr ("TB", "size suffix TBytes=1000 GBytes")) 3893 denom = 1000000000000ULL; 3894 else if (suff == tr ("TiB", "size suffix TiBytes")) 3885 else if (suff == tr ("TB", "size suffix TBytes=1024 GBytes")) 3895 3886 denom = _1T; 3896 else if (suff == tr ("PB", "size suffix PBytes=1000 TBytes")) 3897 denom = 1000000000000000ULL; 3898 else if (suff == tr ("PiB", "size suffix PiBytes")) 3887 else if (suff == tr ("PB", "size suffix PBytes=1024 TBytes")) 3899 3888 denom = _1P; 3900 3889 … … 3914 3903 /** 3915 3904 * Formats the given @a aSize value in bytes to a human readable string 3916 * in form of <tt>####[.##] B|K iB|MiB|GiB|TiB|PiB</tt>.3905 * in form of <tt>####[.##] B|KB|MB|GB|TB|PB</tt>. 3917 3906 * 3918 3907 * The @a aMode and @a aDecimal parameters are used for rounding the resulting 3919 * number when converting the size value to K iB, MiB, etc gives a fractional part:3908 * number when converting the size value to KB, MB, etc gives a fractional part: 3920 3909 * <ul> 3921 3910 * <li>When \a aMode is FormatSize_Round, the result is rounded to the … … 3947 3936 static QString Suffixes [7]; 3948 3937 Suffixes[0] = tr ("B", "size suffix Bytes"); 3949 Suffixes[1] = tr ("K iB", "size suffix KiBytes");3950 Suffixes[2] = tr ("M iB", "size suffix MiBytes");3951 Suffixes[3] = tr ("G iB", "size suffix GiBytes");3952 Suffixes[4] = tr ("T iB", "size suffix TiBytes");3953 Suffixes[5] = tr ("P iB", "size suffix PiBytes");3938 Suffixes[1] = tr ("KB", "size suffix KBytes=1024 Bytes"); 3939 Suffixes[2] = tr ("MB", "size suffix MBytes=1024 KBytes"); 3940 Suffixes[3] = tr ("GB", "size suffix GBytes=1024 MBytes"); 3941 Suffixes[4] = tr ("TB", "size suffix TBytes=1024 GBytes"); 3942 Suffixes[5] = tr ("PB", "size suffix PBytes=1024 TBytes"); 3954 3943 Suffixes[6] = (const char *)NULL; 3955 3944 AssertCompile(6 < RT_ELEMENTS (Suffixes)); … … 4014 4003 decm = 0; 4015 4004 ++ intg; 4016 /* check if we've got 1024 X iB after rounding and scale down if so */4005 /* check if we've got 1024 XB after rounding and scale down if so */ 4017 4006 if (intg == 1024 && Suffixes [suffix + 1] != NULL) 4018 4007 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.cpp
r28758 r28759 267 267 268 268 CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties(); 269 mLbMemoryMin->setText (tr ("<qt>%1 M iB</qt>").arg (m_minVRAM));270 mLbMemoryMax->setText (tr ("<qt>%1 M iB</qt>").arg (m_maxVRAMVisible));269 mLbMemoryMin->setText (tr ("<qt>%1 MB</qt>").arg (m_minVRAM)); 270 mLbMemoryMax->setText (tr ("<qt>%1 MB</qt>").arg (m_maxVRAMVisible)); 271 271 mLbMonitorsMin->setText (tr ("<qt>%1</qt>").arg (1)); 272 272 mLbMonitorsMax->setText (tr ("<qt>%1</qt>").arg (sys.GetMaxGuestMonitors())); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.ui
r28758 r28759 145 145 </property> 146 146 <property name="text"> 147 <string>M iB</string>147 <string>MB</string> 148 148 </property> 149 149 </widget> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsSystem.cpp
r28758 r28759 381 381 382 382 /* Retranslate the memory slider legend */ 383 mLbMemoryMin->setText (tr ("<qt>%1 M iB</qt>").arg (mSlMemory->minRAM()));384 mLbMemoryMax->setText (tr ("<qt>%1 M iB</qt>").arg (mSlMemory->maxRAM()));383 mLbMemoryMin->setText (tr ("<qt>%1 MB</qt>").arg (mSlMemory->minRAM())); 384 mLbMemoryMax->setText (tr ("<qt>%1 MB</qt>").arg (mSlMemory->maxRAM())); 385 385 386 386 /* Retranslate the cpu slider legend */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsSystem.ui
r28758 r28759 145 145 </property> 146 146 <property name="text"> 147 <string>M iB</string>147 <string>MB</string> 148 148 </property> 149 149 </widget> -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp
r28758 r28759 220 220 221 221 /* Setup size-editor field */ 222 m_pSizeEditor->setFixedWidthByText("88888.88 M iB");222 m_pSizeEditor->setFixedWidthByText("88888.88 MB"); 223 223 m_pSizeEditor->setAlignment(Qt::AlignRight); 224 224 m_pSizeEditor->setValidator(new QRegExpValidator(QRegExp(vboxGlobal().sizeRegexp()), this)); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
r28758 r28759 281 281 QString strRecommendedRAM = field("type").value<CGuestOSType>().isNull() ? QString() : 282 282 QString::number(field("type").value<CGuestOSType>().GetRecommendedRAM()); 283 m_pPage3Text2->setText(tr("The recommended base memory size is <b>%1</b> M iB.").arg(strRecommendedRAM));283 m_pPage3Text2->setText(tr("The recommended base memory size is <b>%1</b> MB.").arg(strRecommendedRAM)); 284 284 285 285 /* Translate minimum & maximum 'ram' field values */ 286 m_pRamMin->setText(QString("%1 %2").arg(m_pRamSlider->minRAM()).arg(tr("M iB", "size suffix MiBytes")));287 m_pRamMax->setText(QString("%1 %2").arg(m_pRamSlider->maxRAM()).arg(tr("M iB", "size suffix MiBytes")));286 m_pRamMin->setText(QString("%1 %2").arg(m_pRamSlider->minRAM()).arg(tr("MB", "size suffix MBytes=1024 KBytes"))); 287 m_pRamMax->setText(QString("%1 %2").arg(m_pRamSlider->maxRAM()).arg(tr("MB", "size suffix MBytes=1024 KBytes"))); 288 288 } 289 289 … … 374 374 QString strRecommendedHDD = field("type").value<CGuestOSType>().isNull() ? QString() : 375 375 QString::number(field("type").value<CGuestOSType>().GetRecommendedHDD()); 376 m_pPage4Text2->setText (tr ("The recommended size of the boot hard disk is <b>%1</b> M iB.").arg (strRecommendedHDD));376 m_pPage4Text2->setText (tr ("The recommended size of the boot hard disk is <b>%1</b> MB.").arg (strRecommendedHDD)); 377 377 } 378 378 … … 585 585 .arg(tr("Name", "summary"), name) 586 586 .arg(tr("OS Type", "summary"), type) 587 .arg(tr("Base Memory", "summary"), ram, tr("M iB", "size suffix MiBytes"))587 .arg(tr("Base Memory", "summary"), ram, tr("MB", "size suffix MBytes=1024KBytes")) 588 588 ; 589 589 /* Feat summary to 3 lines */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzdPage3.ui
r28758 r28759 96 96 <widget class="QLabel" name="m_pRamUnits"> 97 97 <property name="text"> 98 <string>M iB</string>98 <string>MB</string> 99 99 </property> 100 100 </widget>
Note:
See TracChangeset
for help on using the changeset viewer.