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();
|
gPrefs->Flush();
|
||||||
if (mCategories) {
|
if (mCategories) {
|
||||||
// Now apply the changes
|
// 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);
|
PrefsPanel *panel = (PrefsPanel *)mCategories->GetPage(i);
|
||||||
|
|
||||||
panel->Preview();
|
panel->Preview();
|
||||||
|
@ -217,7 +217,8 @@ wxString TracksPrefs::GetDefaultAudioTrackNamePreference()
|
|||||||
{
|
{
|
||||||
const auto name =
|
const auto name =
|
||||||
gPrefs->Read(wxT("/GUI/TrackNames/DefaultTrackName"), wxT(""));
|
gPrefs->Read(wxT("/GUI/TrackNames/DefaultTrackName"), wxT(""));
|
||||||
if (name.empty())
|
|
||||||
|
if (name.empty() || ( name == "Audio Track" ))
|
||||||
// When nothing was specified,
|
// When nothing was specified,
|
||||||
// the default-default is whatever translation of...
|
// the default-default is whatever translation of...
|
||||||
/* i18n-hint: The default name for an audio track. */
|
/* i18n-hint: The default name for an audio track. */
|
||||||
@ -233,8 +234,9 @@ bool TracksPrefs::Commit()
|
|||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
if (gPrefs->Read(wxT("/GUI/TrackNames/DefaultTrackName"),
|
// Bug 1661: Don't store the name for new tracks if the name is the
|
||||||
_("Audio Track")) == _("Audio Track")) {
|
// default in that language.
|
||||||
|
if (GetDefaultAudioTrackNamePreference() == _("Audio Track")) {
|
||||||
gPrefs->DeleteEntry(wxT("/GUI/TrackNames/DefaultTrackName"));
|
gPrefs->DeleteEntry(wxT("/GUI/TrackNames/DefaultTrackName"));
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user