add some missed translation strings

This commit is contained in:
Drew Weymouth
2024-07-23 08:53:06 -07:00
parent 60a0ac8328
commit 1814e2a6a3
2 changed files with 36 additions and 19 deletions
+18 -1
View File
@@ -1,4 +1,6 @@
{ {
"A new version is available": "A new version is available",
"About": "About",
"Add Server": "Add Server", "Add Server": "Add Server",
"Add to playlist": "Add to playlist", "Add to playlist": "Add to playlist",
"Add to queue": "Add to queue", "Add to queue": "Add to queue",
@@ -30,6 +32,7 @@
"BPM": "BPM", "BPM": "BPM",
"Broadcast": "Broadcast", "Broadcast": "Broadcast",
"Cancel": "Cancel", "Cancel": "Cancel",
"Check for Updates": "Check for Updates",
"Close": "Close", "Close": "Close",
"Close to system tray": "Close to system tray", "Close to system tray": "Close to system tray",
"Comment": "Comment", "Comment": "Comment",
@@ -76,6 +79,8 @@
"Genre": "Genre", "Genre": "Genre",
"Genres": "Genres", "Genres": "Genres",
"Github page": "Github page", "Github page": "Github page",
"Go to release page": "Go to release page",
"Hide": "Hide",
"Home Page": "Home Page", "Home Page": "Home Page",
"hr": "hr", "hr": "hr",
"hrs": "hrs", "hrs": "hrs",
@@ -86,6 +91,7 @@
"Last played": "Last played", "Last played": "Last played",
"Live": "Live", "Live": "Live",
"Locally": "Locally", "Locally": "Locally",
"Log Out": "Log Out",
"Login to Server": "Login to Server", "Login to Server": "Login to Server",
"Lyrics": "Lyrics", "Lyrics": "Lyrics",
"Lyrics not available": "Lyrics not available", "Lyrics not available": "Lyrics not available",
@@ -95,7 +101,9 @@
"My Server": "My Server", "My Server": "My Server",
"Name": "Name", "Name": "Name",
"Name (A-Z)": "Name (A-Z)", "Name (A-Z)": "Name (A-Z)",
"Next": "Next",
"Nickname": "Nickname", "Nickname": "Nickname",
"No new version found": "No new version found",
"No radio stations available": "No radio stations available", "No radio stations available": "No radio stations available",
"None": "None", "None": "None",
"none": "none", "none": "none",
@@ -104,6 +112,7 @@
"optional": "optional", "optional": "optional",
"or when": "or when", "or when": "or when",
"Password": "Password", "Password": "Password",
"Pause": "Pause",
"Paused": "Paused", "Paused": "Paused",
"Peak Meter": "Peak Meter", "Peak Meter": "Peak Meter",
"percent of track is played": "percent of track is played", "percent of track is played": "percent of track is played",
@@ -121,6 +130,7 @@
"playlist by": "playlist by", "playlist by": "playlist by",
"Plays": "Plays", "Plays": "Plays",
"Prevent clipping": "Prevent clipping", "Prevent clipping": "Prevent clipping",
"Previous": "Previous",
"Private": "Private", "Private": "Private",
"Public": "Public", "Public": "Public",
"Random": "Random", "Random": "Random",
@@ -147,8 +157,10 @@
"Server Type": "Server Type", "Server Type": "Server Type",
"Server unreachable": "Server unreachable", "Server unreachable": "Server unreachable",
"Set rating": "Set rating", "Set rating": "Set rating",
"Settings": "Settings",
"Share": "Share", "Share": "Share",
"Share content": "Share content", "Share content": "Share content",
"Show": "Show",
"Show info": "Show info", "Show info": "Show info",
"Show notification on track change": "Show notification on track change", "Show notification on track change": "Show notification on track change",
"Show year in album grid cards": "Show year in album grid cards", "Show year in album grid cards": "Show year in album grid cards",
@@ -158,11 +170,13 @@
"Similar artists": "Similar artists", "Similar artists": "Similar artists",
"Single": "Single", "Single": "Single",
"Skip duplicate tracks": "Skip duplicate tracks", "Skip duplicate tracks": "Skip duplicate tracks",
"Skip this version": "Skip this version",
"Soundtrack": "Soundtrack", "Soundtrack": "Soundtrack",
"Spoken Word": "Spoken Word", "Spoken Word": "Spoken Word",
"Startup page": "Startup page", "Startup page": "Startup page",
"Stopped": "Stopped", "Stopped": "Stopped",
"Support the project": "Support the project", "Support the project": "Support the project",
"Switch Servers": "Switch Servers",
"Testing connection": "Testing connection", "Testing connection": "Testing connection",
"Theme": "Theme", "Theme": "Theme",
"Title": "Title", "Title": "Title",
@@ -182,10 +196,13 @@
"Use legacy authentication": "Use legacy authentication", "Use legacy authentication": "Use legacy authentication",
"Username": "Username", "Username": "Username",
"version": "version", "version": "version",
"Visualizations": "Visualizations",
"Volume": "Volume",
"wrong URL": "wrong URL", "wrong URL": "wrong URL",
"wrong username/password": "wrong username/password", "wrong username/password": "wrong username/password",
"Year": "Year", "Year": "Year",
"Year (ascending)": "Year (ascending)", "Year (ascending)": "Year (ascending)",
"Year (descending)": "Year (descending)", "Year (descending)": "Year (descending)",
"Year from": "Year from" "Year from": "Year from",
"You are running the latest version of": "You are running the latest version of"
} }
+18 -18
View File
@@ -134,27 +134,27 @@ func NewMainWindow(fyneApp fyne.App, appName, displayAppName, appVersion string,
m.BrowsingPane.ClearHistory() m.BrowsingPane.ClearHistory()
m.Controller.PromptForLoginAndConnect() m.Controller.PromptForLoginAndConnect()
}) })
m.BrowsingPane.AddSettingsMenuItem("Log Out", func() { app.ServerManager.Logout(true) }) m.BrowsingPane.AddSettingsMenuItem(lang.L("Log Out"), func() { app.ServerManager.Logout(true) })
m.BrowsingPane.AddSettingsMenuItem("Switch Servers", func() { app.ServerManager.Logout(false) }) m.BrowsingPane.AddSettingsMenuItem(lang.L("Switch Servers"), func() { app.ServerManager.Logout(false) })
m.BrowsingPane.AddSettingsMenuItem("Rescan Library", func() { app.ServerManager.Server.RescanLibrary() }) m.BrowsingPane.AddSettingsMenuItem(lang.L("Rescan Library"), func() { app.ServerManager.Server.RescanLibrary() })
m.BrowsingPane.AddSettingsMenuSeparator() m.BrowsingPane.AddSettingsMenuSeparator()
m.BrowsingPane.AddSettingsSubmenu(lang.L("Visualizations"), m.BrowsingPane.AddSettingsSubmenu(lang.L("Visualizations"),
fyne.NewMenu("", []*fyne.MenuItem{ fyne.NewMenu("", []*fyne.MenuItem{
fyne.NewMenuItem(lang.L("Peak Meter"), m.Controller.ShowPeakMeter), fyne.NewMenuItem(lang.L("Peak Meter"), m.Controller.ShowPeakMeter),
}...)) }...))
m.BrowsingPane.AddSettingsMenuItem("Check for Updates", func() { m.BrowsingPane.AddSettingsMenuItem(lang.L("Check for Updates"), func() {
go func() { go func() {
if t := app.UpdateChecker.CheckLatestVersionTag(); t != "" && t != app.VersionTag() { if t := app.UpdateChecker.CheckLatestVersionTag(); t != "" && t != app.VersionTag() {
m.ShowNewVersionDialog(displayAppName, t) m.ShowNewVersionDialog(displayAppName, t)
} else { } else {
dialog.ShowInformation("No new version found", dialog.ShowInformation(lang.L("No new version found"),
"You are running the latest version of "+displayAppName, lang.L("You are running the latest version of")+" "+displayAppName,
m.Window) m.Window)
} }
}() }()
}) })
m.BrowsingPane.AddSettingsMenuItem("Settings...", m.showSettingsDialog) m.BrowsingPane.AddSettingsMenuItem(lang.L("Settings")+"...", m.showSettingsDialog)
m.BrowsingPane.AddSettingsMenuItem("About...", m.Controller.ShowAboutDialog) m.BrowsingPane.AddSettingsMenuItem(lang.L("About")+"...", m.Controller.ShowAboutDialog)
m.addNavigationButtons() m.addNavigationButtons()
m.BrowsingPane.DisableNavigationButtons() m.BrowsingPane.DisableNavigationButtons()
m.addShortcuts() m.addShortcuts()
@@ -250,30 +250,30 @@ func (m *MainWindow) RunOnServerConnectedTasks(app *backend.App, displayAppName
func (m *MainWindow) SetupSystemTrayMenu(appName string, fyneApp fyne.App) { func (m *MainWindow) SetupSystemTrayMenu(appName string, fyneApp fyne.App) {
if desk, ok := fyneApp.(desktop.App); ok { if desk, ok := fyneApp.(desktop.App); ok {
menu := fyne.NewMenu(appName, menu := fyne.NewMenu(appName,
fyne.NewMenuItem("Play/Pause", func() { fyne.NewMenuItem(fmt.Sprintf("%s/%s", lang.L("Play"), lang.L("Pause")), func() {
_ = m.App.PlaybackManager.PlayPause() _ = m.App.PlaybackManager.PlayPause()
}), }),
fyne.NewMenuItem("Previous", func() { fyne.NewMenuItem(lang.L("Previous"), func() {
_ = m.App.PlaybackManager.SeekBackOrPrevious() _ = m.App.PlaybackManager.SeekBackOrPrevious()
}), }),
fyne.NewMenuItem("Next", func() { fyne.NewMenuItem(lang.L("Next"), func() {
_ = m.App.PlaybackManager.SeekNext() _ = m.App.PlaybackManager.SeekNext()
}), }),
fyne.NewMenuItemSeparator(), fyne.NewMenuItemSeparator(),
fyne.NewMenuItem("Volume +10%", func() { fyne.NewMenuItem(lang.L("Volume")+" +10%", func() {
vol := m.App.PlaybackManager.Volume() vol := m.App.PlaybackManager.Volume()
vol = vol + int(float64(vol)*0.1) vol = vol + int(float64(vol)*0.1)
// will clamp to range for us // will clamp to range for us
m.App.PlaybackManager.SetVolume(vol) m.App.PlaybackManager.SetVolume(vol)
}), }),
fyne.NewMenuItem("Volume -10%", func() { fyne.NewMenuItem(lang.L("Volume")+" -10%", func() {
vol := m.App.PlaybackManager.Volume() vol := m.App.PlaybackManager.Volume()
vol = vol - int(float64(vol)*0.1) vol = vol - int(float64(vol)*0.1)
m.App.PlaybackManager.SetVolume(vol) m.App.PlaybackManager.SetVolume(vol)
}), }),
fyne.NewMenuItemSeparator(), fyne.NewMenuItemSeparator(),
fyne.NewMenuItem("Show", m.Window.Show), fyne.NewMenuItem(lang.L("Show"), m.Window.Show),
fyne.NewMenuItem("Hide", m.Window.Hide), fyne.NewMenuItem(lang.L("Hide"), m.Window.Hide),
) )
desk.SetSystemTrayMenu(menu) desk.SetSystemTrayMenu(menu)
desk.SetSystemTrayIcon(res.ResAppicon256Png) desk.SetSystemTrayIcon(res.ResAppicon256Png)
@@ -289,8 +289,8 @@ func (m *MainWindow) ShowNewVersionDialog(appName, versionTag string) {
contentStr := fmt.Sprintf("A new version of %s (%s) is available", contentStr := fmt.Sprintf("A new version of %s (%s) is available",
appName, versionTag) appName, versionTag)
m.Controller.QueueShowModalFunc(func() { m.Controller.QueueShowModalFunc(func() {
dialog.ShowCustomConfirm("A new version is available", dialog.ShowCustomConfirm(lang.L("A new version is available"),
"Go to release page", "Skip this version", lang.L("Go to release page"), lang.L("Skip this version"),
widget.NewLabel(contentStr), func(show bool) { widget.NewLabel(contentStr), func(show bool) {
if show { if show {
fyne.CurrentApp().OpenURL(m.App.UpdateChecker.LatestReleaseURL()) fyne.CurrentApp().OpenURL(m.App.UpdateChecker.LatestReleaseURL())
@@ -301,7 +301,7 @@ func (m *MainWindow) ShowNewVersionDialog(appName, versionTag string) {
} }
func (m *MainWindow) ShowWhatsNewDialog() { func (m *MainWindow) ShowWhatsNewDialog() {
dialog.ShowCustom("What's new in "+res.AppVersion, "Close", dialogs.NewWhatsNewDialog(), m.Window) dialog.ShowCustom("What's new in "+res.AppVersion, lang.L("Close"), dialogs.NewWhatsNewDialog(), m.Window)
} }
func (m *MainWindow) addNavigationButtons() { func (m *MainWindow) addNavigationButtons() {