1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 00:03:52 +02:00

Bug 1661 - Default audio track name not being translated

We need a blank name stored in the config, if the name is the local version of "Audio Tracks"
This commit is contained in:
James Crook
2018-03-23 14:17:05 +00:00
parent 40085b384f
commit 0cf7964e38
2 changed files with 8 additions and 4 deletions

View File

@@ -217,7 +217,8 @@ wxString TracksPrefs::GetDefaultAudioTrackNamePreference()
{
const auto name =
gPrefs->Read(wxT("/GUI/TrackNames/DefaultTrackName"), wxT(""));
if (name.empty())
if (name.empty() || ( name == "Audio Track" ))
// When nothing was specified,
// the default-default is whatever translation of...
/* i18n-hint: The default name for an audio track. */
@@ -233,8 +234,9 @@ bool TracksPrefs::Commit()
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
if (gPrefs->Read(wxT("/GUI/TrackNames/DefaultTrackName"),
_("Audio Track")) == _("Audio Track")) {
// Bug 1661: Don't store the name for new tracks if the name is the
// default in that language.
if (GetDefaultAudioTrackNamePreference() == _("Audio Track")) {
gPrefs->DeleteEntry(wxT("/GUI/TrackNames/DefaultTrackName"));
gPrefs->Flush();
}