19#include <wx/sstream.h>
20#include <wx/txtstrm.h>
30 return wxString::Format(
"\"#%02X%02X%02X\"",
31 c.Red(), c.Green(), c.Blue() );
34static wxString
WrapText(
const wxString & Text )
36 return wxString(
wxT(
""))+
37 wxT(
"<html><head></head>") +
42 wxT(
"</body></html>");
45static wxString
InnerLink(
const wxString &Key,
const wxString& Text )
47 return wxString(
wxT(
"")) +
48 wxT(
"<a href='innerlink:") +
55static wxString
FileLink(
const wxString &Key,
const wxString& Text )
57 return wxString(
wxT(
"")) +
67static wxString
TypedLink(
const wxString &Key,
const wxString& Text )
69 return wxString(
wxT(
"")) +
81 while( (i=Temp.First(
wxT(
"[[") ))!= wxNOT_FOUND )
83 wxString Key = Temp.Mid(i+2);
84 j = Key.First(
wxT(
"|") );
87 wxString LinkText = Key.Mid( j+1);
88 k = LinkText.First(
wxT(
"]]") );
91 Key = Key.Mid( 0, j );
92 LinkText = LinkText.Mid( 0, k );
96 if( Key.StartsWith(
wxT(
"file:") ))
98 Replacement =
FileLink( Key.Mid( 5 ), LinkText );
100 else if( Key.StartsWith(
wxT(
"http:") ))
102 Replacement =
TypedLink( Key, LinkText );
104 else if( Key.StartsWith(
wxT(
"https:") ))
106 Replacement =
TypedLink( Key, LinkText );
108 else if( Key.StartsWith(
wxT(
"mailto:") ))
110 Replacement =
TypedLink( Key, LinkText );
112 else if( Key.StartsWith(
wxT(
"*URL*") ))
114 Replacement =
TypedLink( Key, LinkText );
118 Replacement =
InnerLink( Key, LinkText );
122 Temp = Temp.Mid( 0, i ) + Replacement + Temp.Mid( i + j + k + 5 );
129 if(Key==
wxT(
"welcome"))
131 return XO(
"Welcome!");
134 if(Key ==
wxT(
"play") )
137 return XO(
"Playing Audio");
139 if((Key ==
wxT(
"record") ) || (Key ==
wxT(
"norecord") ))
142 return XO(
"Recording Audio");
144 if(Key ==
wxT(
"inputdevice") )
147 return XO(
"Recording - Choosing the Recording Device");
149 if(Key ==
wxT(
"inputsource") )
152 return XO(
"Recording - Choosing the Recording Source");
154 if(Key ==
wxT(
"inputlevel") )
157 return XO(
"Recording - Setting the Recording Level");
159 if((Key ==
wxT(
"edit") ) || (Key==
wxT(
"grey")))
162 return XO(
"Editing and greyed out Menus");
164 if(Key ==
wxT(
"export") )
167 return XO(
"Exporting an Audio File");
169 if(Key ==
wxT(
"save") )
172 return XO(
"Saving an Audacity Project");
174 if(Key ==
wxT(
"wma-proprietary") )
177 return XO(
"Support for Other Formats");
179 if(Key ==
wxT(
"burncd") )
182 return XO(
"Burn to CD" );
184 if(Key ==
wxT(
"remotehelp") )
186 return XO(
"No Local Help");
194 if(Key==
wxT(
"wma-proprietary"))
196 wxStringOutputStream o;
197 wxTextOutputStream s(o);
201"Audacity can import unprotected files in many other formats (such as M4A and WMA, \
202compressed WAV files from portable recorders and audio from video files) if you download and install \
203the optional [[https://support.audacityteam.org/basics/installing-ffmpeg| \
204FFmpeg library]] to your computer.")
207"You can also read our help on importing \
208[[https://manual.audacityteam.org/man/playing_and_recording.html#midi|MIDI files]] \
209and tracks from [[https://manual.audacityteam.org/man/faq_opening_and_saving_files.html#fromcd| \
219 if(Key ==
wxT(
"remotehelp") )
221 wxStringOutputStream o;
222 wxTextOutputStream s(o);
226"The Manual does not appear to be installed. \
227Please [[*URL*|view the Manual online]] or \
228[[https://manual.audacityteam.org/man/unzipping_the_manual.html| \
229download the Manual]].<br><br>\
230To always view the Manual online, change \"Location of Manual\" in \
231Interface Preferences to \"From Internet\".")
260 wxString localeStr = wxLocale::GetSystemEncodingName();
263 wxT(
"<html><head><META http-equiv=\"Content-Type\" content=\"text/html; charset=") +
TranslatableString TitleText(const wxString &Key)
static wxString TypedLink(const wxString &Key, const wxString &Text)
static wxString HelpTextBuiltIn(const wxString &Key)
static wxString WrapText(const wxString &Text)
static wxString LinkExpand(const wxString &Text)
wxString FormatHtmlText(const wxString &Text)
static wxString FileLink(const wxString &Key, const wxString &Text)
wxString HelpText(const wxString &Key)
static wxString InnerLink(const wxString &Key, const wxString &Text)
wxString HtmlColourOfIndex(int i)
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
wxColour & Colour(int iIndex)
Holds a msgid for the translation catalog; may also bind format arguments.
FILES_API FilePath HtmlHelpDir()