const TCHAR ContributorsPath[] = _T("contributors.txt");
/** @brief Release notes in HTML format. */
-const TCHAR RelNotes[] = _T("\\Docs\\ReleaseNotes.html");
+const TCHAR RelNotes[] = _T("\\Docs\\ReleaseNotes%s.html");
/** @brief GPL Licence local file name. */
const TCHAR LicenseFile[] = _T("Copying");
*/
void CMainFrame::OnHelpReleasenotes()
{
- const String sPath = paths::ConcatPath(env::GetProgPath(), RelNotes);
+ String sPath = paths::ConcatPath(env::GetProgPath(),strutils::format(RelNotes, theApp.GetLangName()));
+ if (paths::DoesPathExist(sPath) != paths::IS_EXISTING_FILE)
+ sPath = paths::ConcatPath(env::GetProgPath(), strutils::format(RelNotes, _T("")));
shell::Open(sPath.c_str());
}
*/
void CMergeApp::ShowHelp(LPCTSTR helpLocation /*= nullptr*/)
{
- String name, ext;
- LANGID LangId = GetLangId();
- paths::SplitFilename(m_pLangDlg->GetFileName(LangId), nullptr, &name, &ext);
- String sPath = paths::ConcatPath(env::GetProgPath(), strutils::format(DocsPath, name.c_str()));
+ String sPath = paths::ConcatPath(env::GetProgPath(), strutils::format(DocsPath, GetLangName()));
if (paths::DoesPathExist(sPath) != paths::IS_EXISTING_FILE)
sPath = paths::ConcatPath(env::GetProgPath(), strutils::format(DocsPath, _T("")));
if (helpLocation == nullptr)
return m_pLangDlg->GetLangId();
}
+String CMergeApp::GetLangName() const
+{
+ String name, ext;
+ paths::SplitFilename(theApp.m_pLangDlg->GetFileName(theApp.GetLangId()), nullptr, &name, &ext);
+ return name;
+}
+
/**
* @brief Lang aware version of CStatusBar::SetIndicators()
*/
std::unique_ptr<SubstitutionFiltersList> m_pSubstitutionFiltersList;
WORD GetLangId() const;
+ String GetLangName() const;
void SetIndicators(CStatusBar &, const UINT *, int) const;
void TranslateMenu(HMENU) const;
void TranslateDialog(HWND) const;