| 596 | } |
| 597 | |
| 598 | wxString CommandManager::FormatLabelForMenu( |
| 599 | const CommandID &id, const TranslatableString *pLabel) const |
| 600 | { |
| 601 | NormalizedKeyString keyStr; |
| 602 | if (auto iter = mCommandNameHash.find(id); iter != mCommandNameHash.end()) { |
| 603 | if (auto pEntry = iter->second) { |
| 604 | keyStr = pEntry->key; |
| 605 | if (!pLabel) |
| 606 | pLabel = &pEntry->label; |
| 607 | } |
| 608 | } |
| 609 | if (pLabel) |
| 610 | return CommandListEntry::FormatLabelForMenu(*pLabel, keyStr); |
| 611 | return {}; |
| 612 | } |
| 613 | |
| 614 | wxString CommandManager::CommandListEntry::FormatLabelForMenu( |
| 615 | const TranslatableString &translatableLabel, |
no test coverage detected