mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Remove 56 macro _ calls and fix a few i8n mistakes
This commit is contained in:
commit
f2b96ff640
@ -449,7 +449,7 @@ void DependencyDialog::PopulateList()
|
||||
mFileListCtrl->SetItemState(i, 0, wxLIST_STATE_SELECTED); // Deselect.
|
||||
mFileListCtrl->SetItemTextColour(i, *wxRED);
|
||||
}
|
||||
mFileListCtrl->SetItem(i, 1, Internat::FormatSize(byteCount));
|
||||
mFileListCtrl->SetItem(i, 1, Internat::FormatSize(byteCount).Translation());
|
||||
mFileListCtrl->SetItemData(i, long(bOriginalExists));
|
||||
|
||||
++i;
|
||||
@ -541,25 +541,24 @@ void DependencyDialog::OnRightClick( wxListEvent& event)
|
||||
PopupMenu(&menu);
|
||||
}
|
||||
|
||||
void DependencyDialog::OnCopyToClipboard( wxCommandEvent& evt )
|
||||
void DependencyDialog::OnCopyToClipboard( wxCommandEvent& )
|
||||
{
|
||||
static_cast<void>(evt);
|
||||
wxString Files;
|
||||
TranslatableString Files;
|
||||
for (const auto &aliasedFile : mAliasedFiles) {
|
||||
const wxFileName & fileName = aliasedFile.mFileName;
|
||||
wxLongLong byteCount = (aliasedFile.mByteCount * 124) / 100;
|
||||
bool bOriginalExists = aliasedFile.mbOriginalExists;
|
||||
// All fields quoted, as e.g. size may contain a comma in the number.
|
||||
Files += wxString::Format( "\"%s\", \"%s\", \"%s\"\n",
|
||||
Files += XO( "\"%s\", \"%s\", \"%s\"\n").Format(
|
||||
fileName.GetFullPath(),
|
||||
Internat::FormatSize( byteCount),
|
||||
bOriginalExists ? "OK":"Missing" );
|
||||
Internat::FormatSize( byteCount),
|
||||
bOriginalExists ? XO("OK") : XO("Missing") );
|
||||
}
|
||||
|
||||
// copy data onto clipboard
|
||||
if (wxTheClipboard->Open()) {
|
||||
// Clipboard owns the data you give it
|
||||
wxTheClipboard->SetData(safenew wxTextDataObject(Files));
|
||||
wxTheClipboard->SetData(safenew wxTextDataObject(Files.Translation()));
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ wxFileNameWrapper DirManager::MakeBlockFilePath(const wxString &value) {
|
||||
|
||||
if(!dir.DirExists() && !dir.Mkdir(0777,wxPATH_MKDIR_FULL))
|
||||
{ // need braces to avoid compiler warning about ambiguous else, see the macro
|
||||
wxLogSysError(_("mkdir in DirManager::MakeBlockFilePath failed."));
|
||||
wxLogSysError(wxT("mkdir in DirManager::MakeBlockFilePath failed."));
|
||||
}
|
||||
}
|
||||
return dir;
|
||||
@ -906,7 +906,7 @@ bool DirManager::AssignFile(wxFileNameWrapper &fileName,
|
||||
wxString collision;
|
||||
checkit.GetFirst(&collision,filespec);
|
||||
|
||||
wxLogWarning(_("Audacity found an orphan block file: %s. \nPlease consider saving and reloading the project to perform a complete project check."),
|
||||
wxLogWarning(wxT("Audacity found an orphan block file: %s. \nPlease consider saving and reloading the project to perform a complete project check."),
|
||||
collision);
|
||||
|
||||
return FALSE;
|
||||
@ -1495,7 +1495,7 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
|
||||
wxFile testFile(renamedFullPath, wxFile::write);
|
||||
if (!testFile.IsOpened()) {
|
||||
{ // need braces to avoid compiler warning about ambiguous else, see the macro
|
||||
wxLogSysError(_("Unable to open/create test file."),
|
||||
wxLogSysError(wxT("Unable to open/create test file."),
|
||||
renamedFullPath);
|
||||
}
|
||||
return false;
|
||||
@ -1507,7 +1507,7 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
|
||||
if (!wxRemoveFile(renamedFullPath)) {
|
||||
{ // need braces to avoid compiler warning about ambiguous else, see the macro
|
||||
/* i18n-hint: %s is the name of a file.*/
|
||||
wxLogSysError(_("Unable to remove '%s'."),
|
||||
wxLogSysError(wxT("Unable to remove '%s'."),
|
||||
renamedFullPath);
|
||||
}
|
||||
return false;
|
||||
@ -1548,7 +1548,7 @@ bool DirManager::EnsureSafeFilename(const wxFileName &fName)
|
||||
// just in case!!!
|
||||
|
||||
// Print error message and cancel the export
|
||||
wxLogSysError(_("Unable to rename '%s' to '%s'."),
|
||||
wxLogSysError(wxT("Unable to rename '%s' to '%s'."),
|
||||
fullPath,
|
||||
renamedFullPath);
|
||||
|
||||
@ -1619,7 +1619,7 @@ void DirManager::FindMissingAliasFiles(
|
||||
iter = missingAliasFilesPathHash.begin();
|
||||
while (iter != missingAliasFilesPathHash.end())
|
||||
{
|
||||
wxLogWarning(_("Missing aliased audio file: '%s'"), iter->first);
|
||||
wxLogWarning(wxT("Missing aliased audio file: '%s'"), iter->first);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
@ -1643,7 +1643,7 @@ void DirManager::FindMissingAUFs(
|
||||
if (!fileName.FileExists())
|
||||
{
|
||||
missingAUFHash[key] = b;
|
||||
wxLogWarning(_("Missing alias (.auf) block file: '%s'"),
|
||||
wxLogWarning(wxT("Missing alias (.auf) block file: '%s'"),
|
||||
fileName.GetFullPath());
|
||||
}
|
||||
}
|
||||
@ -1673,7 +1673,7 @@ void DirManager::FindMissingAUs(
|
||||
wxFile{ path }.Length() == 0)
|
||||
{
|
||||
missingAUHash[key] = b;
|
||||
wxLogWarning(_("Missing data block file: '%s'"), path);
|
||||
wxLogWarning(wxT("Missing data block file: '%s'"), path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1716,7 +1716,7 @@ void DirManager::FindOrphanBlockFiles(
|
||||
}
|
||||
}
|
||||
for ( const auto &orphan : orphanFilePathArray )
|
||||
wxLogWarning(_("Orphan block file: '%s'"), orphan);
|
||||
wxLogWarning(wxT("Orphan block file: '%s'"), orphan);
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,9 +33,9 @@ License: GPL v2. See License.txt.
|
||||
#if !defined(USE_FFMPEG)
|
||||
/// FFmpeg support may or may not be compiled in,
|
||||
/// but Preferences dialog requires this function nevertheless
|
||||
wxString GetFFmpegVersion(wxWindow *parent)
|
||||
TranslatableString GetFFmpegVersion()
|
||||
{
|
||||
return wxString(_("FFmpeg support not compiled in"));
|
||||
return XO("FFmpeg support not compiled in");
|
||||
}
|
||||
|
||||
#else
|
||||
@ -110,14 +110,14 @@ void FFmpegStartup()
|
||||
}
|
||||
}
|
||||
|
||||
wxString GetFFmpegVersion(wxWindow * WXUNUSED(parent))
|
||||
TranslatableString GetFFmpegVersion()
|
||||
{
|
||||
PickFFmpegLibs();
|
||||
|
||||
wxString versionString = _("FFmpeg library not found");
|
||||
auto versionString = XO("FFmpeg library not found");
|
||||
|
||||
if (FFmpegLibsInst()->ValidLibsLoaded()) {
|
||||
versionString = FFmpegLibsInst()->GetLibraryVersion();
|
||||
versionString = Verbatim( FFmpegLibsInst()->GetLibraryVersion() );
|
||||
}
|
||||
|
||||
DropFFmpegLibs();
|
||||
|
@ -168,7 +168,7 @@ void av_log_wx_callback(void* ptr, int level, const char* fmt, va_list vl);
|
||||
//----------------------------------------------------------------------------
|
||||
// Get FFmpeg library version
|
||||
//----------------------------------------------------------------------------
|
||||
wxString GetFFmpegVersion(wxWindow *parent);
|
||||
TranslatableString GetFFmpegVersion();
|
||||
|
||||
/* from here on in, this stuff only applies when ffmpeg is available */
|
||||
#if defined(USE_FFMPEG)
|
||||
|
@ -204,18 +204,17 @@ void HistoryDialog::DoUpdate()
|
||||
wxLongLong_t total = 0;
|
||||
mSelected = mManager->GetCurrentState() - 1;
|
||||
for (i = 0; i < (int)mManager->GetNumStates(); i++) {
|
||||
TranslatableString desc;
|
||||
wxString size;
|
||||
TranslatableString desc, size;
|
||||
|
||||
total += mManager->GetLongDescription(i + 1, &desc, &size);
|
||||
mList->InsertItem(i, desc.Translation(), i == mSelected ? 1 : 0);
|
||||
mList->SetItem(i, 1, size);
|
||||
mList->SetItem(i, 1, size.Translation());
|
||||
}
|
||||
|
||||
mTotal->SetValue(Internat::FormatSize(total));
|
||||
mTotal->SetValue(Internat::FormatSize(total).Translation());
|
||||
|
||||
auto clipboardUsage = mManager->GetClipboardSpaceUsage();
|
||||
mClipboard->SetValue(Internat::FormatSize(clipboardUsage));
|
||||
mClipboard->SetValue(Internat::FormatSize(clipboardUsage).Translation());
|
||||
FindWindowById(ID_DISCARD_CLIPBOARD)->Enable(clipboardUsage > 0);
|
||||
|
||||
mList->EnsureVisible(mSelected);
|
||||
|
@ -188,7 +188,7 @@ wxString Internat::ToDisplayString(double numberToConvert,
|
||||
return result;
|
||||
}
|
||||
|
||||
wxString Internat::FormatSize(wxLongLong size)
|
||||
TranslatableString Internat::FormatSize(wxLongLong size)
|
||||
{
|
||||
/* wxLongLong contains no built-in conversion to double */
|
||||
double dSize = size.GetHi() * pow(2.0, 32); // 2 ^ 32
|
||||
@ -197,27 +197,27 @@ wxString Internat::FormatSize(wxLongLong size)
|
||||
return FormatSize(dSize);
|
||||
}
|
||||
|
||||
wxString Internat::FormatSize(double size)
|
||||
TranslatableString Internat::FormatSize(double size)
|
||||
{
|
||||
wxString sizeStr;
|
||||
TranslatableString sizeStr;
|
||||
|
||||
if (size == -1)
|
||||
sizeStr = _("Unable to determine");
|
||||
sizeStr = XO("Unable to determine");
|
||||
else {
|
||||
/* make it look nice, by formatting into k, MB, etc */
|
||||
if (size < 1024.0)
|
||||
sizeStr = ToDisplayString(size) + wxT(" ") + _("bytes");
|
||||
sizeStr = XO("%s bytes").Format( ToDisplayString(size) );
|
||||
else if (size < 1024.0 * 1024.0) {
|
||||
/* i18n-hint: Abbreviation for Kilo bytes */
|
||||
sizeStr = ToDisplayString(size / 1024.0, 1) + wxT(" ") + _("KB");
|
||||
sizeStr = XO("%s KB").Format( ToDisplayString(size / 1024.0, 1) );
|
||||
}
|
||||
else if (size < 1024.0 * 1024.0 * 1024.0) {
|
||||
/* i18n-hint: Abbreviation for Mega bytes */
|
||||
sizeStr = ToDisplayString(size / (1024.0 * 1024.0), 1) + wxT(" ") + _("MB");
|
||||
sizeStr = XO("%s MB").Format( ToDisplayString(size / (1024.0 * 1024.0), 1) );
|
||||
}
|
||||
else {
|
||||
/* i18n-hint: Abbreviation for Giga bytes */
|
||||
sizeStr = ToDisplayString(size / (1024.0 * 1024.0 * 1024.0), 1) + wxT(" ") + _("GB");
|
||||
sizeStr = XO("%s GB").Format( ToDisplayString(size / (1024.0 * 1024.0 * 1024.0), 1) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,19 +247,6 @@ bool Internat::SanitiseFilename(wxString &name, const wxString &sub)
|
||||
return result;
|
||||
}
|
||||
|
||||
wxString Internat::StripAccelerators(const wxString &s)
|
||||
{
|
||||
wxString result;
|
||||
result.reserve(s.length());
|
||||
for(size_t i = 0; i < s.length(); i++) {
|
||||
if (s[i] == '\t')
|
||||
break;
|
||||
if (s[i] != '&' && s[i] != '.')
|
||||
result += s[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
TranslatableStrings Msgids(
|
||||
const EnumValueSymbol strings[], size_t nStrings)
|
||||
{
|
||||
|
@ -123,8 +123,8 @@ public:
|
||||
|
||||
/** \brief Convert a number to a string while formatting it in bytes, KB,
|
||||
* MB, GB */
|
||||
static wxString FormatSize(wxLongLong size);
|
||||
static wxString FormatSize(double size);
|
||||
static TranslatableString FormatSize(wxLongLong size);
|
||||
static TranslatableString FormatSize(double size);
|
||||
|
||||
/** \brief Check a proposed file name string for illegal characters and
|
||||
* remove them
|
||||
@ -133,15 +133,6 @@ public:
|
||||
*/
|
||||
static bool SanitiseFilename(wxString &name, const wxString &sub);
|
||||
|
||||
/** \brief Remove accelerator characters from strings
|
||||
*
|
||||
* Utility function - takes a translatable string to be used as a menu item,
|
||||
* for example _("&Splash...\tAlt+S"), and strips all of the menu
|
||||
* accelerator stuff from it, to make "Splash". That way the same
|
||||
* translatable string can be used both when accelerators are needed and
|
||||
* when they aren't, saving translators effort. */
|
||||
static wxString StripAccelerators(const wxString& str);
|
||||
|
||||
static const wxArrayString &GetExcludedCharacters()
|
||||
{ return exclude; }
|
||||
|
||||
@ -151,8 +142,6 @@ private:
|
||||
static wxArrayString exclude;
|
||||
};
|
||||
|
||||
#define _NoAcc(X) Internat::StripAccelerators(_(X))
|
||||
|
||||
// Convert C strings to wxString
|
||||
#define UTF8CTOWX(X) wxString((X), wxConvUTF8)
|
||||
#define LAT1CTOWX(X) wxString((X), wxConvISO8859_1)
|
||||
|
@ -133,18 +133,22 @@ void LabelDialog::PopulateLabels()
|
||||
mGrid->CreateGrid(0, Col_Max);
|
||||
mGrid->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTER);
|
||||
|
||||
/* i18n-hint: (noun). A track contains waves, audio etc.*/
|
||||
mGrid->SetColLabelValue(0,_("Track"));
|
||||
/* i18n-hint: (noun)*/
|
||||
mGrid->SetColLabelValue(1,_("Label"));
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
mGrid->SetColLabelValue(2,_("Start Time"));
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
mGrid->SetColLabelValue(3,_("End Time"));
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
mGrid->SetColLabelValue(4,_("Low Frequency"));
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
mGrid->SetColLabelValue(5,_("High Frequency"));
|
||||
size_t ii = 0;
|
||||
for ( const auto &label : {
|
||||
/* i18n-hint: (noun). A track contains waves, audio etc.*/
|
||||
XO("Track"),
|
||||
/* i18n-hint: (noun)*/
|
||||
XO("Label"),
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
XO("Start Time"),
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
XO("End Time"),
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
XO("Low Frequency"),
|
||||
/* i18n-hint: (noun) of a label*/
|
||||
XO("High Frequency"),
|
||||
})
|
||||
mGrid->SetColLabelValue( ii++, label.Translation() );
|
||||
|
||||
// Create and remember editors. No need to DELETE these as the wxGrid will
|
||||
// do it for us. (The DecRef() that is needed after GetDefaultEditorForType
|
||||
|
@ -1187,9 +1187,10 @@ void MixerBoard::UpdateWidth()
|
||||
//
|
||||
|
||||
|
||||
void MixerBoard::MakeButtonBitmap( wxMemoryDC & dc, wxBitmap & WXUNUSED(bitmap), wxRect & bev, const wxString & str, bool up )
|
||||
void MixerBoard::MakeButtonBitmap( wxMemoryDC & dc, wxBitmap & WXUNUSED(bitmap), wxRect & bev, const TranslatableString & str, bool up )
|
||||
{
|
||||
|
||||
const auto translation = str.Translation();
|
||||
int textWidth, textHeight;
|
||||
|
||||
int fontSize = 10;
|
||||
@ -1197,7 +1198,7 @@ void MixerBoard::MakeButtonBitmap( wxMemoryDC & dc, wxBitmap & WXUNUSED(bitmap),
|
||||
fontSize = 8;
|
||||
#endif
|
||||
wxFont font(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
GetTextExtent(str, &textWidth, &textHeight, NULL, NULL, &font);
|
||||
GetTextExtent(translation, &textWidth, &textHeight, NULL, NULL, &font);
|
||||
|
||||
AColor::UseThemeColour( &dc, clrMedium );
|
||||
dc.DrawRectangle(bev);
|
||||
@ -1209,15 +1210,15 @@ void MixerBoard::MakeButtonBitmap( wxMemoryDC & dc, wxBitmap & WXUNUSED(bitmap),
|
||||
dc.SetFont(font);
|
||||
dc.SetTextForeground(theTheme.Colour(clrTrackPanelText));
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
dc.DrawText(str, x, y);
|
||||
// dc.DrawText(str, 0, 0);
|
||||
dc.DrawText(translation, x, y);
|
||||
// dc.DrawText(translation, 0, 0);
|
||||
}
|
||||
|
||||
void MixerBoard::CreateMuteSoloImages()
|
||||
{
|
||||
// Much of this is similar to TrackInfo::MuteOrSoloDrawFunction.
|
||||
wxMemoryDC dc;
|
||||
wxString str = _("Mute");
|
||||
auto str = XO("Mute");
|
||||
|
||||
//mMuteSoloWidth = textWidth + kQuadrupleInset;
|
||||
//if (mMuteSoloWidth < kRightSideStackWidth - kInset)
|
||||
@ -1243,7 +1244,7 @@ void MixerBoard::CreateMuteSoloImages()
|
||||
|
||||
mImageMuteDisabled = std::make_unique<wxImage>(mMuteSoloWidth, MUTE_SOLO_HEIGHT); // Leave empty because unused.
|
||||
|
||||
str = _("Solo");
|
||||
str = XO("Solo");
|
||||
MakeButtonBitmap( dc, bitmap, bev, str, up );
|
||||
mImageSoloUp = std::make_unique<wxImage>(bitmap.ConvertToImage());
|
||||
mImageSoloOver = std::make_unique<wxImage>(bitmap.ConvertToImage()); // Same as up, for now.
|
||||
|
@ -224,7 +224,7 @@ private:
|
||||
void ResetMeters(const bool bResetClipping);
|
||||
void RemoveTrackCluster(size_t nIndex);
|
||||
void MakeButtonBitmap( wxMemoryDC & dc, wxBitmap & bitmap,
|
||||
wxRect & bev, const wxString & str, bool up );
|
||||
wxRect & bev, const TranslatableString & str, bool up );
|
||||
void CreateMuteSoloImages();
|
||||
int FindMixerTrackCluster(const PlayableTrack* pTrack,
|
||||
MixerTrackCluster** hMixerTrackCluster) const;
|
||||
|
@ -112,7 +112,7 @@ bool Module::Load()
|
||||
auto Error = wxString(wxSysErrorMsg());
|
||||
AudacityMessageBox(XO("Unable to load the \"%s\" module.\n\nError: %s").Format(ShortName, Error),
|
||||
XO("Module Unsuitable"));
|
||||
wxLogMessage(_("Unable to load the module \"%s\". Error: %s").Format(mName, Error));
|
||||
wxLogMessage(wxT("Unable to load the module \"%s\". Error: %s"), mName, Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ bool Module::Load()
|
||||
XO("The module \"%s\" does not provide a version string.\n\nIt will not be loaded.")
|
||||
.Format( ShortName),
|
||||
XO("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module \"%s\" does not provide a version string. It will not be loaded."), mName));
|
||||
wxLogMessage(wxT("The module \"%s\" does not provide a version string. It will not be loaded."), mName);
|
||||
mLib->Unload();
|
||||
return false;
|
||||
}
|
||||
@ -134,7 +134,7 @@ bool Module::Load()
|
||||
XO("The module \"%s\" is matched with Audacity version \"%s\".\n\nIt will not be loaded.")
|
||||
.Format(ShortName, moduleVersion),
|
||||
XO("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module \"%s\" is matched with Audacity version \"%s\". It will not be loaded."), mName, moduleVersion));
|
||||
wxLogMessage(wxT("The module \"%s\" is matched with Audacity version \"%s\". It will not be loaded."), mName, moduleVersion);
|
||||
mLib->Unload();
|
||||
return false;
|
||||
}
|
||||
@ -159,7 +159,7 @@ bool Module::Load()
|
||||
AudacityMessageBox(
|
||||
XO("The module \"%s\" failed to initialize.\n\nIt will not be loaded.").Format(ShortName),
|
||||
XO("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module \"%s\" failed to initialize.\nIt will not be loaded."), mName));
|
||||
wxLogMessage(wxT("The module \"%s\" failed to initialize.\nIt will not be loaded."), mName);
|
||||
mLib->Unload();
|
||||
|
||||
return false;
|
||||
@ -342,7 +342,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
|
||||
AudacityMessageBox(
|
||||
XO("The module \"%s\" does not provide any of the required functions.\n\nIt will not be loaded.").Format(ShortName),
|
||||
XO("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module \"%s\" does not provide any of the required functions. It will not be loaded."), files[i]));
|
||||
wxLogMessage(wxT("The module \"%s\" does not provide any of the required functions. It will not be loaded."), files[i]);
|
||||
module->Unload();
|
||||
}
|
||||
else
|
||||
|
@ -168,7 +168,7 @@ XO("Project check of \"%s\" folder \
|
||||
++iter;
|
||||
}
|
||||
if ((action == 2) && bAutoRecoverMode)
|
||||
wxLogWarning(_(" Project check replaced missing aliased file(s) with silence."));
|
||||
wxLogWarning(wxT(" Project check replaced missing aliased file(s) with silence."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ XO("Project check of \"%s\" folder \
|
||||
++iter;
|
||||
}
|
||||
if ((action == 0) && bAutoRecoverMode)
|
||||
wxLogWarning(_(" Project check regenerated missing alias summary file(s)."));
|
||||
wxLogWarning(wxT(" Project check regenerated missing alias summary file(s)."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,7 +316,7 @@ XO("Project check of \"%s\" folder \
|
||||
++iter;
|
||||
}
|
||||
if ((action == 2) && bAutoRecoverMode)
|
||||
wxLogWarning(_(" Project check replaced missing audio data block file(s) with silence."));
|
||||
wxLogWarning(wxT(" Project check replaced missing audio data block file(s) with silence."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,7 +332,7 @@ XO("Project check of \"%s\" folder \
|
||||
// They will be deleted when project is saved the first time.
|
||||
if (bAutoRecoverMode)
|
||||
{
|
||||
wxLogWarning(_(" Project check ignored orphan block file(s). They will be deleted when project is saved."));
|
||||
wxLogWarning(wxT(" Project check ignored orphan block file(s). They will be deleted when project is saved."));
|
||||
action = 1;
|
||||
}
|
||||
else
|
||||
@ -391,7 +391,7 @@ other projects. \
|
||||
!missingAUHash.empty() ||
|
||||
!orphanFilePathArray.empty())
|
||||
{
|
||||
wxLogWarning(_("Project check found file inconsistencies inspecting the loaded project data."));
|
||||
wxLogWarning(wxT("Project check found file inconsistencies inspecting the loaded project data."));
|
||||
wxLog::FlushActive(); // Flush is modal and will clear the log (both desired).
|
||||
|
||||
// In auto-recover mode, we didn't do any ShowMultiDialog calls above, so put up an alert.
|
||||
|
@ -177,7 +177,7 @@ bool ProjectFileIO::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
||||
auto &dirManager = DirManager::Get( project );
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
bool bFileVersionFound = false;
|
||||
wxString fileVersion = _("<unrecognized version -- possibly corrupt project file>");
|
||||
wxString fileVersion;
|
||||
wxString audacityVersion = _("<unrecognized version -- possibly corrupt project file>");
|
||||
int requiredTags = 0;
|
||||
long longVpos = 0;
|
||||
|
@ -165,7 +165,7 @@ void UndoManager::CalculateSpaceUsage()
|
||||
}
|
||||
|
||||
wxLongLong_t UndoManager::GetLongDescription(
|
||||
unsigned int n, TranslatableString *desc, wxString *size)
|
||||
unsigned int n, TranslatableString *desc, TranslatableString *size)
|
||||
{
|
||||
n -= 1; // 1 based to zero based
|
||||
|
||||
|
@ -141,7 +141,7 @@ class AUDACITY_DLL_API UndoManager final
|
||||
void GetShortDescription(unsigned int n, TranslatableString *desc);
|
||||
// Return value must first be calculated by CalculateSpaceUsage():
|
||||
wxLongLong_t GetLongDescription(
|
||||
unsigned int n, TranslatableString *desc, wxString *size);
|
||||
unsigned int n, TranslatableString *desc, TranslatableString *size);
|
||||
void SetLongDescription(unsigned int n, const TranslatableString &desc);
|
||||
|
||||
// These functions accept a callback that uses the state,
|
||||
|
@ -434,18 +434,18 @@ namespace {
|
||||
return format0.Format( value );
|
||||
}
|
||||
|
||||
wxString FormatDifference( float diffdB )
|
||||
TranslatableString FormatDifference( float diffdB )
|
||||
{
|
||||
if( diffdB != diffdB ) // test for NaN, reliant on IEEE implementation
|
||||
return _("indeterminate");
|
||||
return XO("indeterminate");
|
||||
else {
|
||||
if( diffdB != std::numeric_limits<float>::infinity() )
|
||||
/* i18n-hint: dB abbreviates decibels
|
||||
* RMS abbreviates root mean square, a certain averaging method */
|
||||
return wxString::Format(_("%.2f dB RMS"), diffdB);
|
||||
return XO("%.2f dB RMS").Format( diffdB );
|
||||
else
|
||||
/* i18n-hint: dB abbreviates decibels */
|
||||
return _("Infinite dB difference");
|
||||
return XO("Infinite dB difference");
|
||||
}
|
||||
}
|
||||
|
||||
@ -494,7 +494,7 @@ void ContrastDialog::results()
|
||||
|
||||
/* i18n-hint: i.e. difference in loudness at the moment. */
|
||||
mDiffText->SetName(_("Current difference"));
|
||||
mDiffText->ChangeValue( FormatDifference( diffdB ) );
|
||||
mDiffText->ChangeValue( FormatDifference( diffdB ).Translation() );
|
||||
}
|
||||
|
||||
if (mForegroundIsDefined) {
|
||||
|
@ -542,7 +542,7 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath(
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
wxLogMessage(_("VST plugin registration failed for %s\n"), path);
|
||||
wxLogMessage(wxT("VST plugin registration failed for %s\n"), path);
|
||||
error = true;
|
||||
}
|
||||
|
||||
@ -2176,7 +2176,7 @@ bool VSTEffect::Load()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
wxLogMessage(_("VST plugin initialization failed\n"));
|
||||
wxLogMessage(wxT("VST plugin initialization failed\n"));
|
||||
mAEffect = NULL;
|
||||
}
|
||||
|
||||
|
@ -1827,7 +1827,7 @@ void AudioUnitEffect::ExportPresets()
|
||||
|
||||
if (!fn.Mkdir(fn.GetFullPath(), 0755, wxPATH_MKDIR_FULL))
|
||||
{
|
||||
wxLogError(_("Couldn't create the \"%s\" directory").Format(fn.GetPath()));
|
||||
wxLogError(wxT("Couldn't create the \"%s\" directory"), fn.GetPath());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1131,7 +1131,7 @@ size_t LV2Effect::ProcessBlock(float **inbuf, float **outbuf, size_t size)
|
||||
else
|
||||
{
|
||||
zix_ring_skip(ring, atom.size);
|
||||
wxLogError(_("LV2 sequence buffer overflow"));
|
||||
wxLogError(wxT("LV2 sequence buffer overflow"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1303,7 +1303,7 @@ bool LV2Effect::RealtimeProcessStart()
|
||||
else
|
||||
{
|
||||
zix_ring_skip(ring, atom.size);
|
||||
wxLogError(_("LV2 sequence buffer overflow"));
|
||||
wxLogError(wxT("LV2 sequence buffer overflow"));
|
||||
}
|
||||
}
|
||||
lv2_atom_forge_pop(&mForge, &seqFrame);
|
||||
@ -1911,7 +1911,7 @@ bool LV2Effect::CheckFeatures(const LilvNode *subject, const LilvNode *predicate
|
||||
{
|
||||
if (required)
|
||||
{
|
||||
wxLogError(_("%s requires unsupported feature %s"), lilv_node_as_string(lilv_plugin_get_uri(mPlug)), uri);
|
||||
wxLogError(wxT("%s requires unsupported feature %s"), lilv_node_as_string(lilv_plugin_get_uri(mPlug)), uri);
|
||||
printf(_("%s requires unsupported feature %s\n"), lilv_node_as_string(lilv_plugin_get_uri(mPlug)), uri);
|
||||
break;
|
||||
}
|
||||
@ -1975,7 +1975,7 @@ bool LV2Effect::CheckOptions(const LilvNode *subject, const LilvNode *predicate,
|
||||
{
|
||||
if (required)
|
||||
{
|
||||
wxLogError(_("%s requires unsupported option %s"), lilv_node_as_string(lilv_plugin_get_uri(mPlug)), uri);
|
||||
wxLogError(wxT("%s requires unsupported option %s"), lilv_node_as_string(lilv_plugin_get_uri(mPlug)), uri);
|
||||
printf(_("%s requires unsupported option %s\n"), lilv_node_as_string(lilv_plugin_get_uri(mPlug)), uri);
|
||||
break;
|
||||
}
|
||||
@ -2823,7 +2823,7 @@ void LV2Effect::OnIdle(wxIdleEvent &evt)
|
||||
else
|
||||
{
|
||||
zix_ring_skip(ring, atom->size);
|
||||
wxLogError(_("LV2 sequence buffer overflow"));
|
||||
wxLogError(wxT("LV2 sequence buffer overflow"));
|
||||
}
|
||||
}
|
||||
free(atom);
|
||||
|
@ -1379,7 +1379,7 @@ bool NyquistEffect::ProcessOne()
|
||||
const auto output = mDebugOutput.Translation();
|
||||
if (!output.empty() && !mDebug && !mTrace) {
|
||||
/* i18n-hint: An effect "returned" a message.*/
|
||||
wxLogMessage(_("\'%s\' returned:\n%s"),
|
||||
wxLogMessage(wxT("\'%s\' returned:\n%s"),
|
||||
mName.Translation(), output);
|
||||
}
|
||||
|
||||
@ -2166,7 +2166,7 @@ bool NyquistEffect::Parse(
|
||||
else
|
||||
{
|
||||
wxString str;
|
||||
str.Printf(_("Bad Nyquist 'control' type specification: '%s' in plug-in file '%s'.\nControl not created."),
|
||||
str.Printf(wxT("Bad Nyquist 'control' type specification: '%s' in plug-in file '%s'.\nControl not created."),
|
||||
tokens[3], mFileName.GetFullPath());
|
||||
|
||||
// Too disturbing to show alert before Audacity frame is up.
|
||||
|
@ -2211,10 +2211,10 @@ static Exporter::RegisteredExportPlugin sRegisteredPlugin{ "MP3",
|
||||
// Return library version
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
wxString GetMP3Version(wxWindow *parent, bool prompt)
|
||||
TranslatableString GetMP3Version(wxWindow *parent, bool prompt)
|
||||
{
|
||||
MP3Exporter exporter;
|
||||
wxString versionString = _("MP3 export library not found");
|
||||
auto versionString = XO("MP3 export library not found");
|
||||
|
||||
#ifndef DISABLE_DYNAMIC_LOADING_LAME
|
||||
if (prompt) {
|
||||
@ -2223,10 +2223,9 @@ wxString GetMP3Version(wxWindow *parent, bool prompt)
|
||||
|
||||
if (exporter.LoadLibrary(parent, prompt ? MP3Exporter::Yes : MP3Exporter::No)) {
|
||||
#endif // DISABLE_DYNAMIC_LOADING_LAME
|
||||
versionString = exporter.GetLibraryVersion();
|
||||
versionString = Verbatim( exporter.GetLibraryVersion() );
|
||||
#ifdef MP3_EXPORT_BUILT_IN
|
||||
versionString += " ";
|
||||
versionString += _("(Built-in)");
|
||||
versionString.Join( XO("(Built-in)"), " " );
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_DYNAMIC_LOADING_LAME
|
||||
|
@ -29,13 +29,13 @@ extern EnumSetting< MP3RateMode > MP3RateModeSetting;
|
||||
#define MP3_EXPORT_BUILT_IN 1
|
||||
#endif
|
||||
|
||||
class wxString;
|
||||
class TranslatableString;
|
||||
class wxWindow;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Get MP3 library version
|
||||
//----------------------------------------------------------------------------
|
||||
wxString GetMP3Version(wxWindow *parent, bool prompt);
|
||||
TranslatableString GetMP3Version(wxWindow *parent, bool prompt);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -19,22 +19,22 @@ struct FoundTrack {
|
||||
int trackNum{};
|
||||
bool channel{};
|
||||
|
||||
wxString ComposeTrackName() const
|
||||
TranslatableString ComposeTrackName() const
|
||||
{
|
||||
auto name = waveTrack->GetName();
|
||||
auto shortName = name == waveTrack->GetDefaultName()
|
||||
/* i18n-hint: compose a name identifying an unnamed track by number */
|
||||
? wxString::Format( _("Track %d"), trackNum )
|
||||
: name;
|
||||
? XO("Track %d").Format( trackNum )
|
||||
: Verbatim(name);
|
||||
auto longName = shortName;
|
||||
if (channel) {
|
||||
// TODO: more-than-two-channels-message
|
||||
if ( waveTrack->IsLeader() )
|
||||
/* i18n-hint: given the name of a track, specify its left channel */
|
||||
longName = wxString::Format(_("%s left"), shortName);
|
||||
longName = XO("%s left").Format(shortName);
|
||||
else
|
||||
/* i18n-hint: given the name of a track, specify its right channel */
|
||||
longName = wxString::Format(_("%s right"), shortName);
|
||||
longName = XO("%s right").Format(shortName);
|
||||
}
|
||||
return longName;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void DirectoriesPrefs::OnChooseTempDir(wxCommandEvent & e)
|
||||
void DirectoriesPrefs::UpdateFreeSpace(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
wxString tempDir;
|
||||
wxString label;
|
||||
TranslatableString label;
|
||||
|
||||
if (mTempDir != NULL) {
|
||||
tempDir = mTempDir->GetValue();
|
||||
@ -212,12 +212,12 @@ void DirectoriesPrefs::UpdateFreeSpace(wxCommandEvent & WXUNUSED(event))
|
||||
label = Internat::FormatSize(space);
|
||||
}
|
||||
else {
|
||||
label = _("unavailable - above location doesn't exist");
|
||||
label = XO("unavailable - above location doesn't exist");
|
||||
}
|
||||
|
||||
if( mFreeSpace != NULL ) {
|
||||
mFreeSpace->SetLabel(label);
|
||||
mFreeSpace->SetName(label); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
mFreeSpace->SetLabel(label.Translation());
|
||||
mFreeSpace->SetName(label.Translation()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ void LibraryPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
/// of the MP3 Library version.
|
||||
void LibraryPrefs::SetMP3VersionText(bool prompt)
|
||||
{
|
||||
mMP3Version->SetLabel(GetMP3Version(this, prompt));
|
||||
mMP3Version->SetLabel(GetMP3Version(this, prompt).Translation());
|
||||
mMP3Version->SetName(mMP3Version->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ void LibraryPrefs::OnMP3DownButton(wxCommandEvent & WXUNUSED(event))
|
||||
|
||||
void LibraryPrefs::SetFFmpegVersionText()
|
||||
{
|
||||
mFFmpegVersion->SetLabel(GetFFmpegVersion(this));
|
||||
mFFmpegVersion->SetLabel(GetFFmpegVersion().Translation());
|
||||
mFFmpegVersion->SetName(mFFmpegVersion->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user