mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +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:
parent
40085b384f
commit
0cf7964e38
@ -478,7 +478,9 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
gPrefs->Flush();
|
||||
if (mCategories) {
|
||||
// Now apply the changes
|
||||
for (size_t i = 0; i < mCategories->GetPageCount(); i++) {
|
||||
// Reverse order - so Track Name is updated before language change
|
||||
// A workaround for Bug 1661
|
||||
for (int i = (int)mCategories->GetPageCount()-1; i>= 0; i--) {
|
||||
PrefsPanel *panel = (PrefsPanel *)mCategories->GetPage(i);
|
||||
|
||||
panel->Preview();
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user