PopupMenu ViewMenuBarItem::createPopupMenu() { static const char* const items[] = { NEEDS_TRANS("Error List"), NEEDS_TRANS("Output"), nullptr }; return createPopupMenuWithItems (StringArray (items)); }
PopupMenu FileMenuBarItem::createPopupMenu() { static const char* const items[] = { NEEDS_TRANS("New"), NEEDS_TRANS("Open"), "-", NEEDS_TRANS("Save"), "-", NEEDS_TRANS("Exit"), nullptr }; return createPopupMenuWithItems (StringArray (items)); }
PopupMenu ToolsMenuBarItem::createPopupMenu() { static const char* const items[] = { NEEDS_TRANS("Convert Tabs to Spaces"), NEEDS_TRANS("Trim Whitespace"), "-", NEEDS_TRANS("Change Theme"), NEEDS_TRANS("Edit Current Theme"), "-", NEEDS_TRANS("Options"), nullptr }; return createPopupMenuWithItems (StringArray (items)); }
juce::StringArray LineEndingsConverter::getEndingFormatsAsStrings() noexcept { static const char* const ops[] = { NEEDS_TRANS ("None [Puts everything on the same line]"), NEEDS_TRANS ("Line-Feed Only [e.g.: Mac, Unix-based]"), NEEDS_TRANS ("Carriage Return Only"), NEEDS_TRANS ("Both CR/LF [e.g.: Windows, typical code line-endings]"), NEEDS_TRANS ("Both LF/CR"), nullptr }; juce::StringArray names (ops); translate (names); return names; }
PopupMenu BuildMenuBarItem::createPopupMenu() { static const char* const items[] = { NEEDS_TRANS("Build Project"), nullptr }; return createPopupMenuWithItems (StringArray (items)); }
void InternalPluginFormat::createPluginInstance (const PluginDescription& desc, double /*initialSampleRate*/, int /*initialBufferSize*/, void* userData, void (*callback) (void*, AudioPluginInstance*, const String&)) { AudioPluginInstance* p = nullptr; if (desc.name == audioOutDesc.name) p = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode); if (desc.name == audioInDesc.name) p = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode); if (desc.name == midiInDesc.name) p = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::midiInputNode); callback (userData, p, p == nullptr ? NEEDS_TRANS ("Invalid internal filter name") : String()); }
AudioPluginFormat* AudioPluginFormatManager::findFormatForDescription (const PluginDescription& description, String& errorMessage) const { errorMessage = String(); for (int i = 0; i < formats.size(); ++i) { AudioPluginFormat* format; if ((format = formats.getUnchecked (i))->getName() == description.pluginFormatName && format->fileMightContainThisPluginType (description.fileOrIdentifier)) return format; } errorMessage = NEEDS_TRANS ("No compatible plug-in format exists for this plug-in"); return nullptr; }
PopupMenu HelpMenuBarItem::createPopupMenu() { static const char* const items[] = { NEEDS_TRANS("Undo"), NEEDS_TRANS("Redo"), "-", NEEDS_TRANS("Cut"), NEEDS_TRANS("Copy"), NEEDS_TRANS("Paste"), NEEDS_TRANS("Delete"), "-", NEEDS_TRANS("Select All"), nullptr }; return createPopupMenuWithItems (StringArray (items)); }
String AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type) { if (type >= discreteChannel0) return String ("Discrete ") + String (type - discreteChannel0 + 1); switch (type) { case left: return NEEDS_TRANS("Left"); case right: return NEEDS_TRANS("Right"); case centre: return NEEDS_TRANS("Centre"); case subbass: return NEEDS_TRANS("Subbass"); case leftSurround: return NEEDS_TRANS("Left Surround"); case rightSurround: return NEEDS_TRANS("Right Surround"); case leftCentre: return NEEDS_TRANS("Left Centre"); case rightCentre: return NEEDS_TRANS("Right Centre"); case surround: return NEEDS_TRANS("Surround"); case leftRearSurround: return NEEDS_TRANS("Left Rear Surround"); case rightRearSurround: return NEEDS_TRANS("Right Rear Surround"); case topMiddle: return NEEDS_TRANS("Top Middle"); case topFrontLeft: return NEEDS_TRANS("Top Front Left"); case topFrontCentre: return NEEDS_TRANS("Top Front Centre"); case topFrontRight: return NEEDS_TRANS("Top Front Right"); case topRearLeft: return NEEDS_TRANS("Top Rear Left"); case topRearCentre: return NEEDS_TRANS("Top Rear Centre"); case topRearRight: return NEEDS_TRANS("Top Rear Right"); case wideLeft: return NEEDS_TRANS("Wide Left"); case wideRight: return NEEDS_TRANS("Wide Right"); case subbass2: return NEEDS_TRANS("Subbass 2"); case leftSurroundDirect: return NEEDS_TRANS ("Left Surround Direct"); case rightSurroundDirect: return NEEDS_TRANS ("Right Surround Direct"); case ambisonicW: return NEEDS_TRANS("Ambisonic W"); case ambisonicX: return NEEDS_TRANS("Ambisonic X"); case ambisonicY: return NEEDS_TRANS("Ambisonic Y"); case ambisonicZ: return NEEDS_TRANS("Ambisonic Z"); default: break; } return "Unknown"; }
String RelativeTime::getDescription (const String& returnValueForZeroTime) const { if (numSeconds < 0.001 && numSeconds > -0.001) return returnValueForZeroTime; String result; result.preallocateBytes (32); if (numSeconds < 0) result << '-'; int fieldsShown = 0; int n = std::abs ((int) inWeeks()); if (n > 0) { translateTimeField (result, n, NEEDS_TRANS("1 week"), NEEDS_TRANS("2 weeks")); ++fieldsShown; } n = std::abs ((int) inDays()) % 7; if (n > 0) { translateTimeField (result, n, NEEDS_TRANS("1 day"), NEEDS_TRANS("2 days")); ++fieldsShown; } if (fieldsShown < 2) { n = std::abs ((int) inHours()) % 24; if (n > 0) { translateTimeField (result, n, NEEDS_TRANS("1 hour"), NEEDS_TRANS("2 hours")); ++fieldsShown; } if (fieldsShown < 2) { n = std::abs ((int) inMinutes()) % 60; if (n > 0) { translateTimeField (result, n, NEEDS_TRANS("1 minute"), NEEDS_TRANS("2 minutes")); ++fieldsShown; } if (fieldsShown < 2) { n = std::abs ((int) inSeconds()) % 60; if (n > 0) { translateTimeField (result, n, NEEDS_TRANS("1 seconds"), NEEDS_TRANS("2 seconds")); ++fieldsShown; } if (fieldsShown == 0) { n = std::abs ((int) inMilliseconds()) % 1000; if (n > 0) result << n << ' ' << TRANS ("ms"); } } } } return result.trimEnd(); }
//============================================================================== EditMenuBarItem::EditMenuBarItem() : MenuBarItem (NEEDS_TRANS ("Edit")) { }
//============================================================================== FileMenuBarItem::FileMenuBarItem() : MenuBarItem (NEEDS_TRANS ("File")) { }
//============================================================================== HelpMenuBarItem::HelpMenuBarItem() : MenuBarItem (NEEDS_TRANS ("Help")) { }
//============================================================================== ToolsMenuBarItem::ToolsMenuBarItem() : MenuBarItem (NEEDS_TRANS ("Tools")) { }
//============================================================================== BuildMenuBarItem::BuildMenuBarItem() : MenuBarItem (NEEDS_TRANS ("Build")) { }
//============================================================================== ViewMenuBarItem::ViewMenuBarItem() : MenuBarItem (NEEDS_TRANS ("View")) { }