- Timestamp:
- Dec 17, 2019 12:32:26 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135492
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
r81612 r82605 152 152 template<> SHARED_LIBRARY_STUFF bool canConvert<KChipsetType>(); 153 153 template<> SHARED_LIBRARY_STUFF bool canConvert<KNATProtocol>(); 154 template<> SHARED_LIBRARY_STUFF bool canConvert<KGuestSessionStatus>();155 template<> SHARED_LIBRARY_STUFF bool canConvert<KProcessStatus>();156 154 157 155 … … 308 306 template<> SHARED_LIBRARY_STUFF QString toInternalString(const KNATProtocol &protocol); 309 307 template<> SHARED_LIBRARY_STUFF KNATProtocol fromInternalString<KNATProtocol>(const QString &strProtocol); 310 template<> SHARED_LIBRARY_STUFF QString toInternalString(const KGuestSessionStatus &status);311 template<> SHARED_LIBRARY_STUFF KGuestSessionStatus fromInternalString<KGuestSessionStatus>(const QString &strStatus);312 template<> SHARED_LIBRARY_STUFF QString toInternalString(const KProcessStatus &status);313 template<> SHARED_LIBRARY_STUFF KProcessStatus fromInternalString<KProcessStatus>(const QString &strStatus);314 308 315 309 -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
r82568 r82605 54 54 template<> bool canConvert<KChipsetType>() { return true; } 55 55 template<> bool canConvert<KNATProtocol>() { return true; } 56 template<> bool canConvert<KGuestSessionStatus>() { return true; }57 template<> bool canConvert<KProcessStatus>() { return true; }58 56 59 57 /* QColor <= KMachineState: */ … … 702 700 return values.at(keys.indexOf(QRegExp(strProtocol, Qt::CaseInsensitive))); 703 701 } 704 705 /// @todo Internal strings never being translated.706 /// If that is user-visible string then it is toString() and then each word should be707 /// translated separately (i.e. "TimedOutKilled" should be "Timed Out Killed").708 /// If that is purely internal thing used to tag something or save value to extra-data709 /// then this is toInternalString() indeed but no QApplication::translate should be used.710 template<> QString toInternalString(const KGuestSessionStatus &enmStatus)711 {712 switch (enmStatus)713 {714 case KGuestSessionStatus_Undefined: return QApplication::translate("UICommon", "Undefined", "GuestSessionStatus");715 case KGuestSessionStatus_Starting: return QApplication::translate("UICommon", "Starting", "GuestSessionStatus");716 case KGuestSessionStatus_Started: return QApplication::translate("UICommon", "Started", "GuestSessionStatus");717 case KGuestSessionStatus_Terminating: return QApplication::translate("UICommon", "Terminating", "GuestSessionStatus");718 case KGuestSessionStatus_Terminated: return QApplication::translate("UICommon", "Terminated", "GuestSessionStatus");719 case KGuestSessionStatus_TimedOutKilled: return QApplication::translate("UICommon", "TimedOutKilled", "GuestSessionStatus");720 case KGuestSessionStatus_TimedOutAbnormally: return QApplication::translate("UICommon", "TimedOutAbnormally", "GuestSessionStatus");721 case KGuestSessionStatus_Down: return QApplication::translate("UICommon", "Down", "GuestSessionStatus");722 case KGuestSessionStatus_Error: return QApplication::translate("UICommon", "Error", "GuestSessionStatus");723 default: AssertMsgFailed(("No text for %d", enmStatus)); break;724 }725 return QString();726 }727 728 /// @todo Internal strings never being translated.729 /// If that is user-visible string then it is fromString() and then each word should be730 /// translated separately (i.e. "TimedOutKilled" should be "Timed Out Killed").731 /// If that is purely internal thing used to tag something or save value to extra-data732 /// then this is fromInternalString() indeed but no QApplication::translate should be used.733 template<> KGuestSessionStatus fromInternalString<KGuestSessionStatus>(const QString &strStatus)734 {735 QHash<QString, KGuestSessionStatus> list;736 list.insert(QApplication::translate("UICommon", "Undefined", "GuestSessionStatus"), KGuestSessionStatus_Undefined);737 list.insert(QApplication::translate("UICommon", "Starting", "GuestSessionStatus"), KGuestSessionStatus_Starting);738 list.insert(QApplication::translate("UICommon", "Started", "GuestSessionStatus"), KGuestSessionStatus_Started);739 list.insert(QApplication::translate("UICommon", "Terminating", "GuestSessionStatus"), KGuestSessionStatus_Terminating);740 list.insert(QApplication::translate("UICommon", "Terminated", "GuestSessionStatus"), KGuestSessionStatus_Terminated);741 list.insert(QApplication::translate("UICommon", "TimedOutKilled", "GuestSessionStatus"), KGuestSessionStatus_TimedOutKilled);742 list.insert(QApplication::translate("UICommon", "TimedOutAbnormally", "GuestSessionStatus"), KGuestSessionStatus_TimedOutAbnormally);743 list.insert(QApplication::translate("UICommon", "Down", "GuestSessionStatus"), KGuestSessionStatus_Down);744 list.insert(QApplication::translate("UICommon", "Error", "GuestSessionStatus"), KGuestSessionStatus_Error);745 if (!list.contains(strStatus))746 {747 AssertMsgFailed(("No value for '%s'", strStatus.toUtf8().constData()));748 }749 return list.value(strStatus, KGuestSessionStatus_Error);750 }751 752 /// @todo Internal strings never being translated.753 /// If that is user-visible string then it is toString() and then each word should be754 /// translated separately (i.e. "TimedOutKilled" should be "Timed Out Killed").755 /// If that is purely internal thing used to tag something or save value to extra-data756 /// then this is toInternalString() indeed but no QApplication::translate should be used.757 template<> QString toInternalString(const KProcessStatus &enmStatus)758 {759 switch (enmStatus)760 {761 case KProcessStatus_Undefined: return QApplication::translate("UICommon", "Undefined", "ProcessStatus");762 case KProcessStatus_Starting: return QApplication::translate("UICommon", "Starting", "ProcessStatus");763 case KProcessStatus_Started: return QApplication::translate("UICommon", "Started", "ProcessStatus");764 case KProcessStatus_Paused: return QApplication::translate("UICommon", "Paused", "ProcessStatus");765 case KProcessStatus_Terminating: return QApplication::translate("UICommon", "Terminating", "ProcessStatus");766 case KProcessStatus_TerminatedNormally: return QApplication::translate("UICommon", "TerminatedNormally", "ProcessStatus");767 case KProcessStatus_TerminatedSignal: return QApplication::translate("UICommon", "TerminatedSignal", "ProcessStatus");768 case KProcessStatus_TerminatedAbnormally: return QApplication::translate("UICommon", "TerminatedAbnormally", "ProcessStatus");769 case KProcessStatus_TimedOutKilled: return QApplication::translate("UICommon", "TimedOutKilled", "ProcessStatus");770 case KProcessStatus_TimedOutAbnormally: return QApplication::translate("UICommon", "TimedOutAbnormally", "ProcessStatus");771 case KProcessStatus_Down: return QApplication::translate("UICommon", "Down", "ProcessStatus");772 case KProcessStatus_Error: return QApplication::translate("UICommon", "Error", "ProcessStatus");773 default: AssertMsgFailed(("No text for %d", enmStatus)); break;774 }775 return QString();776 }777 778 /// @todo Internal strings never being translated.779 /// If that is user-visible string then it is fromString() and then each word should be780 /// translated separately (i.e. "TimedOutKilled" should be "Timed Out Killed").781 /// If that is purely internal thing used to tag something or save value to extra-data782 /// then this is fromInternalString() indeed but no QApplication::translate should be used.783 template<> KProcessStatus fromInternalString<KProcessStatus>(const QString &strStatus)784 {785 QHash<QString, KProcessStatus> list;786 list.insert(QApplication::translate("UICommon", "Undefined", "ProcessStatus"), KProcessStatus_Undefined);787 list.insert(QApplication::translate("UICommon", "Starting", "ProcessStatus"), KProcessStatus_Starting);788 list.insert(QApplication::translate("UICommon", "Started", "ProcessStatus"), KProcessStatus_Started);789 list.insert(QApplication::translate("UICommon", "Paused", "ProcessStatus"), KProcessStatus_Paused);790 list.insert(QApplication::translate("UICommon", "Terminating", "ProcessStatus"), KProcessStatus_Terminating);791 list.insert(QApplication::translate("UICommon", "TerminatedNormally", "ProcessStatus"), KProcessStatus_TerminatedNormally);792 list.insert(QApplication::translate("UICommon", "TerminatedSignal", "ProcessStatus"), KProcessStatus_TerminatedSignal);793 list.insert(QApplication::translate("UICommon", "TerminatedAbnormally", "ProcessStatus"), KProcessStatus_TerminatedAbnormally);794 list.insert(QApplication::translate("UICommon", "TimedOutKilled", "ProcessStatus"), KProcessStatus_TimedOutKilled);795 list.insert(QApplication::translate("UICommon", "TimedOutAbnormally", "ProcessStatus"), KProcessStatus_TimedOutAbnormally);796 list.insert(QApplication::translate("UICommon", "Down", "ProcessStatus"), KProcessStatus_Down);797 list.insert(QApplication::translate("UICommon", "Error", "ProcessStatus"), KProcessStatus_Error);798 799 if (!list.contains(strStatus))800 {801 AssertMsgFailed(("No value for '%s'", strStatus.toUtf8().constData()));802 }803 return list.value(strStatus, KProcessStatus_Error);804 805 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.cpp
r82474 r82605 611 611 m_pRootItem->setData(UICustomFileSystemModel::tr("Owner"), UICustomFileSystemModelColumn_Owner); 612 612 m_pRootItem->setData(UICustomFileSystemModel::tr("Permissions"), UICustomFileSystemModelColumn_Permissions); 613 /// @todo Is this guy really user-readable. If that is so then each word should 614 /// be translated separately (i.e. "LocalPath" should be "Local Path"). 615 m_pRootItem->setData(UICustomFileSystemModel::tr("LocalPath"), UICustomFileSystemModelColumn_LocalPath); 613 m_pRootItem->setData(UICustomFileSystemModel::tr("Local Path"), UICustomFileSystemModelColumn_LocalPath); 616 614 m_pRootItem->setData(UICustomFileSystemModel::tr("Path"), UICustomFileSystemModelColumn_Path); 617 615 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r82474 r82605 1109 1109 return; 1110 1110 1111 /// @todo Is this guy really user-readable. If that is so then each word should 1112 /// be translated separately (i.e. "NewDirectory" should be "New Directory"). 1113 QString newDirectoryName(UICustomFileSystemModel::tr("NewDirectory")); 1111 QString newDirectoryName(UICustomFileSystemModel::tr("New Directory")); 1114 1112 1115 1113 if (!createDirectory(parentFolderItem->path(), newDirectoryName)) … … 1303 1301 /// it does support <br> tags. 1304 1302 if (m_pWarningLabel) 1305 m_pWarningLabel->setText(UIFileManager::tr("No Guest Session \nPlease use the Session Panel to start \naguest session"));1303 m_pWarningLabel->setText(UIFileManager::tr("No Guest Session found!<br>Please use the Session Panel to start a new guest session")); 1306 1304 } 1307 1305 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r82474 r82605 113 113 m_pTabWidget->setTabText(1, tr("&Runtime Information")); 114 114 m_pTabWidget->setTabText(2, tr("Performance &Monitor")); 115 /// @todo Shouldn't that be just "&Guest Control"? 116 m_pTabWidget->setTabText(3, tr("Guest Control &Session Information")); 115 m_pTabWidget->setTabText(3, tr("&Guest Control")); 117 116 } 118 117 -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r82474 r82605 2448 2448 dialog.setWindowTitle(UISoftKeyboard::tr("Provide a file name")); 2449 2449 dialog.setTextValue(currentLayout.name()); 2450 /// @todo Using \n breaks between words of the same sentence isn't allowed. This isn't easily translateable to other 2451 /// languages. Moreover, using of \n isn't allowed at all. This isn't exactly a cross-platform identifier. 2452 /// You can use only <br> between sentenses of the same paragraph. Most of Qt text is HTML by definition, so 2453 /// it does support <br> tags. 2454 dialog.setLabelText(QString("%1 %2").arg(UISoftKeyboard::tr("The file will be saved under:\n")).arg(strHomeFolder)); 2450 dialog.setLabelText(QString("%1 %2").arg(UISoftKeyboard::tr("The file will be saved under:<br>")).arg(strHomeFolder)); 2455 2451 if (dialog.exec() == QDialog::Rejected) 2456 2452 return;
Note:
See TracChangeset
for help on using the changeset viewer.