- Timestamp:
- Jul 29, 2022 2:55:46 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152702
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp
r95618 r95946 29 29 #include "UICommon.h" 30 30 #include "UIFilePathSelector.h" 31 #include "UIWizardCloneVM.h" 31 32 #include "UIWizardCloneVMEditors.h" 32 33 … … 59 60 60 61 bool fInvalidName = m_pNameLineEdit->text().isEmpty(); 61 m_pNameLineEdit->mark(fInvalidName, tr("Clone name cannot be empty"));62 m_pNameLineEdit->mark(fInvalidName, UIWizardCloneVM::tr("Clone name cannot be empty")); 62 63 63 64 const QString &strPath = m_pPathSelector->path(); 64 65 QDir dir(strPath); 65 66 bool fInvalidPath = strPath.isEmpty() || !dir.exists() || !dir.isReadable(); 66 m_pPathSelector->mark(fInvalidPath, tr("Path is invalid"));67 m_pPathSelector->mark(fInvalidPath, UIWizardCloneVM::tr("Path is invalid")); 67 68 68 69 /* Check if there is already a machine folder for this name and path: */ … … 74 75 vbox.ComposeMachineFilename(m_pNameLineEdit->text(), strMachineGroup, QString(), m_pPathSelector->path()); 75 76 fExists = QDir(QDir::toNativeSeparators(QFileInfo(strCloneFilePath).absolutePath())).exists(); 76 m_pNameLineEdit->mark(fExists, tr("The clone name is not unique"));77 m_pNameLineEdit->mark(fExists, UIWizardCloneVM::tr("The clone name is not unique")); 77 78 } 78 79 … … 145 146 { 146 147 m_pContainerLayout->addWidget(m_pNameLineEdit, 0, 1, 1, 1); 147 m_pNameLineEdit->setText( tr("%1 Clone").arg(m_strOriginalName));148 m_pNameLineEdit->setText(UIWizardCloneVM::tr("%1 Clone").arg(m_strOriginalName)); 148 149 connect(m_pNameLineEdit, &UIMarkableLineEdit::textChanged, 149 150 this, &UICloneVMNamePathEditor::sigCloneNameChanged); … … 178 179 { 179 180 if (m_pNameLabel) 180 m_pNameLabel->setText( tr("&Name:"));181 m_pNameLabel->setText(UIWizardCloneVM::tr("&Name:")); 181 182 if (m_pPathLabel) 182 m_pPathLabel->setText( tr("&Path:"));183 m_pPathLabel->setText(UIWizardCloneVM::tr("&Path:")); 183 184 if (m_pNameLineEdit) 184 185 m_pNameLineEdit->setToolTip("Holds a name for the new virtual machine."); … … 320 321 void UICloneVMAdditionalOptionsEditor::retranslateUi() 321 322 { 322 m_pMACComboBoxLabel->setText( tr("MAC Address P&olicy:"));323 m_pMACComboBox->setToolTip( tr("Determines MAC address policy for clonning:"));323 m_pMACComboBoxLabel->setText(UIWizardCloneVM::tr("MAC Address P&olicy:")); 324 m_pMACComboBox->setToolTip(UIWizardCloneVM::tr("Determines MAC address policy for clonning:")); 324 325 for (int i = 0; i < m_pMACComboBox->count(); ++i) 325 326 { … … 329 330 case MACAddressClonePolicy_KeepAllMACs: 330 331 { 331 m_pMACComboBox->setItemText(i, tr("Include all network adapter MAC addresses")); 332 m_pMACComboBox->setItemData(i, tr("Include all network adapter MAC addresses during cloning."), Qt::ToolTipRole); 332 m_pMACComboBox->setItemText(i, UIWizardCloneVM::tr("Include all network adapter MAC addresses")); 333 m_pMACComboBox->setItemData(i, UIWizardCloneVM::tr("Include all network adapter MAC addresses during " 334 "cloning."), Qt::ToolTipRole); 333 335 break; 334 336 } 335 337 case MACAddressClonePolicy_KeepNATMACs: 336 338 { 337 m_pMACComboBox->setItemText(i, tr("Include only NAT network adapter MAC addresses")); 338 m_pMACComboBox->setItemData(i, tr("Include only NAT network adapter MAC addresses during cloning."), Qt::ToolTipRole); 339 m_pMACComboBox->setItemText(i, UIWizardCloneVM::tr("Include only NAT network adapter MAC addresses")); 340 m_pMACComboBox->setItemData(i, UIWizardCloneVM::tr("Include only NAT network adapter MAC addresses during " 341 "cloning."), Qt::ToolTipRole); 339 342 break; 340 343 } 341 344 case MACAddressClonePolicy_StripAllMACs: 342 345 { 343 m_pMACComboBox->setItemText(i, tr("Generate new MAC addresses for all network adapters")); 344 m_pMACComboBox->setItemData(i, tr("Generate new MAC addresses for all network adapters during cloning."), Qt::ToolTipRole); 346 m_pMACComboBox->setItemText(i, UIWizardCloneVM::tr("Generate new MAC addresses for all network adapters")); 347 m_pMACComboBox->setItemData(i, UIWizardCloneVM::tr("Generate new MAC addresses for all network adapters during " 348 "cloning."), Qt::ToolTipRole); 345 349 break; 346 350 } … … 351 355 352 356 if (m_pAdditionalOptionsLabel) 353 m_pAdditionalOptionsLabel->setText( tr("Additional Options:"));357 m_pAdditionalOptionsLabel->setText(UIWizardCloneVM::tr("Additional Options:")); 354 358 if (m_pKeepDiskNamesCheckBox) 355 359 { 356 m_pKeepDiskNamesCheckBox->setToolTip( tr("Enables keeping the disk names during cloning."));357 m_pKeepDiskNamesCheckBox->setText( tr("Keep &Disk Names"));360 m_pKeepDiskNamesCheckBox->setToolTip(UIWizardCloneVM::tr("Enables keeping the disk names during cloning.")); 361 m_pKeepDiskNamesCheckBox->setText(UIWizardCloneVM::tr("Keep &Disk Names")); 358 362 } 359 363 if (m_pKeepHWUUIDsCheckBox) 360 364 { 361 m_pKeepHWUUIDsCheckBox->setToolTip( tr("Enables keeping hardware UUIDs during cloning."));362 m_pKeepHWUUIDsCheckBox->setText( tr("Keep Hard&ware UUIDs"));365 m_pKeepHWUUIDsCheckBox->setToolTip(UIWizardCloneVM::tr("Enables keeping hardware UUIDs during cloning.")); 366 m_pKeepHWUUIDsCheckBox->setText(UIWizardCloneVM::tr("Keep Hard&ware UUIDs")); 363 367 } 364 368 } … … 478 482 if (m_pFullCloneRadio) 479 483 { 480 m_pFullCloneRadio->setText( tr("&Full clone"));481 m_pFullCloneRadio->setToolTip( tr("When chosen, all the virtual disks of the source vm are also cloned."));484 m_pFullCloneRadio->setText(UIWizardCloneVM::tr("&Full clone")); 485 m_pFullCloneRadio->setToolTip(UIWizardCloneVM::tr("When chosen, all the virtual disks of the source vm are also cloned.")); 482 486 } 483 487 if (m_pLinkedCloneRadio) 484 488 { 485 m_pLinkedCloneRadio->setText( tr("&Linked clone"));486 m_pLinkedCloneRadio->setToolTip( tr("When chosen, the cloned vm will save space by sharing the source VM's disk images."));489 m_pLinkedCloneRadio->setText(UIWizardCloneVM::tr("&Linked clone")); 490 m_pLinkedCloneRadio->setToolTip(UIWizardCloneVM::tr("When chosen, the cloned vm will save space by sharing the source VM's disk images.")); 487 491 } 488 492 } … … 548 552 if (m_pMachineRadio) 549 553 { 550 m_pMachineRadio->setText( tr("Current &machine state"));551 m_pMachineRadio->setToolTip( tr("When chosen, only the current state of the source vm is cloned."));554 m_pMachineRadio->setText(UIWizardCloneVM::tr("Current &machine state")); 555 m_pMachineRadio->setToolTip(UIWizardCloneVM::tr("When chosen, only the current state of the source vm is cloned.")); 552 556 } 553 557 if (m_pMachineAndChildsRadio) 554 m_pMachineAndChildsRadio->setText( tr("Current &snapshot tree branch"));558 m_pMachineAndChildsRadio->setText(UIWizardCloneVM::tr("Current &snapshot tree branch")); 555 559 if (m_pAllRadio) 556 560 { 557 m_pAllRadio->setText( tr("&Everything"));558 m_pAllRadio->setToolTip( tr("When chosen, all the saved states of the source vm are also cloned."));561 m_pAllRadio->setText(UIWizardCloneVM::tr("&Everything")); 562 m_pAllRadio->setToolTip(UIWizardCloneVM::tr("When chosen, all the saved states of the source vm are also cloned.")); 559 563 } 560 564 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp
r95169 r95946 184 184 bool fError = !UIWizardNewVMUnattendedCommon::checkGAISOFile(path()); 185 185 if (m_pGAISOFilePathSelector) 186 m_pGAISOFilePathSelector->mark(fError, tr("Invalid Guest Additions installation media"));186 m_pGAISOFilePathSelector->mark(fError, UIWizardNewVM::tr("Invalid Guest Additions installation media")); 187 187 } 188 188 … … 285 285 } 286 286 if (m_pProductKeyLineEdit) 287 m_pProductKeyLineEdit->setToolTip( tr("Holds the product key."));287 m_pProductKeyLineEdit->setToolTip(UIWizardNewVM::tr("Holds the product key.")); 288 288 } 289 289
Note:
See TracChangeset
for help on using the changeset viewer.