19#include <wx/sstream.h>
20#include <wx/txtstrm.h>
31const char* WhatsNewURL =
"https://audacityteam.org/3.2.0-video";
38 return wxString::Format(
"\"#%02X%02X%02X\"",
39 c.Red(), c.Green(), c.Blue() );
42static wxString
WrapText(
const wxString & Text )
44 return wxString(
wxT(
""))+
45 wxT(
"<html><head></head>") +
50 wxT(
"</body></html>");
53static wxString
InnerLink(
const wxString &Key,
const wxString& Text )
55 return wxString(
wxT(
"")) +
56 wxT(
"<a href='innerlink:") +
63static wxString
WikiLink(
const wxString &Key,
const wxString& Text )
65 return wxString(
wxT(
"")) +
66 wxT(
"<a href='https://www.audacityteam.org/wiki/index.php?title=") +
73static wxString
FileLink(
const wxString &Key,
const wxString& Text )
75 return wxString(
wxT(
"")) +
85static wxString
TypedLink(
const wxString &Key,
const wxString& Text )
87 return wxString(
wxT(
"")) +
99 while( (i=Temp.First(
wxT(
"[[") ))!= wxNOT_FOUND )
101 wxString Key = Temp.Mid(i+2);
102 j = Key.First(
wxT(
"|") );
105 wxString LinkText = Key.Mid( j+1);
106 k = LinkText.First(
wxT(
"]]") );
109 Key = Key.Mid( 0, j );
110 LinkText = LinkText.Mid( 0, k );
112 LinkText=wxString(
"<font color=") +
HtmlColourOfIndex(clrSample) +
wxT(
">") +LinkText+
"</font>";
113 wxString Replacement;
114 if( Key.StartsWith(
wxT(
"wiki:") ))
116 Replacement =
WikiLink( Key.Mid( 5 ), LinkText );
118 else if( Key.StartsWith(
wxT(
"file:") ))
120 Replacement =
FileLink( Key.Mid( 5 ), LinkText );
122 else if( Key.StartsWith(
wxT(
"http:") ))
124 Replacement =
TypedLink( Key, LinkText );
126 else if( Key.StartsWith(
wxT(
"https:") ))
128 Replacement =
TypedLink( Key, LinkText );
130 else if( Key.StartsWith(
wxT(
"mailto:") ))
132 Replacement =
TypedLink( Key, LinkText );
134 else if( Key.StartsWith(
wxT(
"*URL*") ))
136 Replacement =
TypedLink( Key, LinkText );
140 Replacement =
InnerLink( Key, LinkText );
144 Temp = Temp.Mid( 0, i ) + Replacement + Temp.Mid( i + j + k + 5 );
151 if(Key==
wxT(
"welcome"))
153 return XO(
"Welcome!");
156 if(Key ==
wxT(
"play") )
159 return XO(
"Playing Audio");
161 if((Key ==
wxT(
"record") ) || (Key ==
wxT(
"norecord") ))
164 return XO(
"Recording Audio");
166 if(Key ==
wxT(
"inputdevice") )
169 return XO(
"Recording - Choosing the Recording Device");
171 if(Key ==
wxT(
"inputsource") )
174 return XO(
"Recording - Choosing the Recording Source");
176 if(Key ==
wxT(
"inputlevel") )
179 return XO(
"Recording - Setting the Recording Level");
181 if((Key ==
wxT(
"edit") ) || (Key==
wxT(
"grey")))
184 return XO(
"Editing and greyed out Menus");
186 if(Key ==
wxT(
"export") )
189 return XO(
"Exporting an Audio File");
191 if(Key ==
wxT(
"save") )
194 return XO(
"Saving an Audacity Project");
196 if(Key ==
wxT(
"wma-proprietary") )
199 return XO(
"Support for Other Formats");
201 if(Key ==
wxT(
"burncd") )
204 return XO(
"Burn to CD" );
206 if(Key ==
wxT(
"remotehelp") )
208 return XO(
"No Local Help");
217 const auto alphamsg =
XO(
218"<br><br>The version of Audacity you are using is an <b>Alpha test version</b>.");
219 const auto betamsg =
XO(
220"<br><br>The version of Audacity you are using is a <b>Beta test version</b>.");
222 if (Key ==
wxT(
"welcome"))
224 wxStringOutputStream o;
225 wxTextOutputStream s(o);
227#if defined(IS_ALPHA) || defined(IS_BETA)
228 <<
wxT(
"<hr><center><h3>")
229 <<
XO(
"Get the Official Released Version of Audacity")
230 <<
wxT(
"</h3></center>")
239"We strongly recommend that you use our latest stable released version, which has full documentation and support.<br><br>")
241"You can help us get Audacity ready for release by joining our [[https://www.audacityteam.org/community/|community]].<hr><br><br>")
244 <<
wxT(
"<center><h3>")
246 <<
wxT(
"Audacity ") << AUDACITY_VERSION_STRING
249 <<
XO(
"What's new in Audacity %s").Format(AUDACITY_VERSION_STRING)
250 <<
wxT(R
"(<p><a href=")") << WhatsNewURL << wxT(R"(">)")
251 << wxT(R"(<img src="memory:whats_new_btn.jpeg" width="263" height="148" /></a></p>)")
254 <<
XO(
"How to get help")
255 <<
wxT(
"</h3></center>")
256 <<
XO(
"These are our support methods:")
257 <<
wxT(
"<p><ul><li>")
259 <<
XO(
"[[help:Quick_Help|Quick Help]]")
263" [[help:Main_Page|Manual]]")
265 <<
XO(
"[[https://support.audacityteam.org/|Tutorials & How-tos]]")
268" [[https://forum.audacityteam.org/|Forum]] - ask your question directly, online.")
269 <<
wxT(
"</li></ul></p>")
272 auto result = o.GetString();
276 if(Key==
wxT(
"wma-proprietary"))
278 wxStringOutputStream o;
279 wxTextOutputStream s(o);
283"Audacity can import unprotected files in many other formats (such as M4A and WMA, \
284compressed WAV files from portable recorders and audio from video files) if you download and install \
285the optional [[https://manual.audacityteam.org/man/faq_opening_and_saving_files.html#foreign| \
286FFmpeg library]] to your computer.")
289"You can also read our help on importing \
290[[https://manual.audacityteam.org/man/playing_and_recording.html#midi|MIDI files]] \
291and tracks from [[https://manual.audacityteam.org/man/faq_opening_and_saving_files.html#fromcd| \
301 if(Key ==
wxT(
"remotehelp") )
303 wxStringOutputStream o;
304 wxTextOutputStream s(o);
308#ifdef EXPERIMENTAL_DA
310"The Manual does not appear to be installed. \
311Please [[*URL*|view the Manual online]].<br><br>\
312To always view the Manual online, change \"Location of Manual\" in \
313Interface Preferences to \"From Internet\".")
316"The Manual does not appear to be installed. \
317Please [[*URL*|view the Manual online]] or \
318[[https://manual.audacityteam.org/man/unzipping_the_manual.html| \
319download the Manual]].<br><br>\
320To always view the Manual online, change \"Location of Manual\" in \
321Interface Preferences to \"From Internet\".")
351 wxString localeStr = wxLocale::GetSystemEncodingName();
354 wxT(
"<html><head><META http-equiv=\"Content-Type\" content=\"text/html; charset=") +
363 wxString result = wxString(
"from_ver=") + AUDACITY_VERSION_STRING;
365 result += wxString(
"&CommitId=")+wxString(REV_LONG).Left(6);
367 result += wxString(
"&Time=") + wxString( __DATE__ ) + wxString( __TIME__ );
368 result.Replace(
" ",
"");
375 wxStringOutputStream o;
376 wxTextOutputStream s(o);
381 <<
XO(
"Check Online")
383 return o.GetString();
390#define VER_CHECK_URL "https://www.audacityteam.org/download/?"
TranslatableString TitleText(const wxString &Key)
static wxString TypedLink(const wxString &Key, const wxString &Text)
const wxString VerCheckArgs()
static wxString HelpTextBuiltIn(const wxString &Key)
static wxString WrapText(const wxString &Text)
static wxString LinkExpand(const wxString &Text)
wxString FormatHtmlText(const wxString &Text)
const URLString VerCheckUrl()
const wxString VerCheckHtml()
static wxString WikiLink(const wxString &Key, 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.
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
Template generates different TaggedIdentifier classes that don't interconvert implicitly.
wxColour & Colour(int iIndex)
Holds a msgid for the translation catalog; may also bind format arguments.
FILES_API FilePath HtmlHelpDir()