banshee r5118 - in trunk/banshee: . po src/Core/Banshee.Core/Banshee.Collection src/Core/Banshee.ThickClient/Banshee.Gui



Author: blorentz
Date: Sun Mar  8 15:50:48 2009
New Revision: 5118
URL: http://svn.gnome.org/viewvc/banshee?rev=5118&view=rev

Log:
2009-03-08  Bertrand Lorentz  <bertrand lorentz gmail com>

	* src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs:
	* src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs: Fix
	localization issues in Playback menu by having separate string for each
	media type. Original patch from Alexander Kojevnikov, modified by me
	(BGO #570546).



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/po/ChangeLog
   trunk/banshee/po/POTFILES.in
   trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs

Modified: trunk/banshee/po/POTFILES.in
==============================================================================
--- trunk/banshee/po/POTFILES.in	(original)
+++ trunk/banshee/po/POTFILES.in	Sun Mar  8 15:50:48 2009
@@ -54,7 +54,9 @@
 src/Core/Banshee.Services/Banshee.Playlists.Formats/AsxPlaylistFormat.cs
 src/Core/Banshee.Services/Banshee.Playlists.Formats/M3uPlaylistFormat.cs
 src/Core/Banshee.Services/Banshee.Playlists.Formats/PlsPlaylistFormat.cs
+src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs
 src/Core/Banshee.Services/Banshee.Preferences/Page.cs
+src/Core/Banshee.Services/Banshee.Preferences/PreferenceService.cs
 src/Core/Banshee.Services/Banshee.Query/BansheeQuery.cs
 src/Core/Banshee.Services/Banshee.ServiceStack/Application.cs
 src/Core/Banshee.Services/Banshee.SmartPlaylist/Migrator.cs
@@ -91,11 +93,12 @@
 src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs
 src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/HelpPage.cs
 src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/LyricsPage.cs
+src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SortingPage.cs
 src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs
 src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
 src/Core/Banshee.ThickClient/Banshee.Gui/ViewActions.cs
 src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ConnectedMessageBar.cs
-src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusButton.cs
+src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusIcon.cs
 src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
 src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/UserJobTile.cs
 src/Core/Banshee.ThickClient/Banshee.Library.Gui/FileImportSource.cs

Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs	Sun Mar  8 15:50:48 2009
@@ -524,22 +524,40 @@
         }
 
         // TODO turn this into a PrimarySource-owned delegate?
-        private static string type_podcast = Catalog.GetString ("Podcast");
-        private static string type_video = Catalog.GetString ("Video");
-        private static string type_song = Catalog.GetString ("Song");
-        private static string type_item = Catalog.GetString ("Item");
-        public string MediaTypeName {
+        private static readonly string restart_podcast = Catalog.GetString ("_Restart Podcast");
+        private static readonly string restart_video = Catalog.GetString ("_Restart Video");
+        private static readonly string restart_song = Catalog.GetString ("_Restart Song");
+        private static readonly string restart_item = Catalog.GetString ("_Restart Item");
+
+        public string RestartLabel {
             get {
                 if (HasAttribute (TrackMediaAttributes.Podcast))
-                    return type_podcast;
+                    return restart_podcast;
                 if (HasAttribute (TrackMediaAttributes.VideoStream))
-                    return type_video;
+                    return restart_video;
                 if (HasAttribute (TrackMediaAttributes.Music))
-                    return type_song;
-                return type_item;
+                    return restart_song;
+                return restart_item;
             }
         }
-        
+
+        private static readonly string jump_to_podcast = Catalog.GetString ("_Jump to Playing Podcast");
+        private static readonly string jump_to_video = Catalog.GetString ("_Jump to Playing Video");
+        private static readonly string jump_to_song = Catalog.GetString ("_Jump to Playing Song");
+        private static readonly string jump_to_item = Catalog.GetString ("_Jump to Playing Item");
+
+        public string JumpToLabel {
+            get {
+                if (HasAttribute (TrackMediaAttributes.Podcast))
+                    return jump_to_podcast;
+                if (HasAttribute (TrackMediaAttributes.VideoStream))
+                    return jump_to_video;
+                if (HasAttribute (TrackMediaAttributes.Music))
+                    return jump_to_song;
+                return jump_to_item;
+            }
+        }
+
 #region Exportable Properties
         
         public static void ExportableMerge (TrackInfo source, TrackInfo dest)

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs	Sun Mar  8 15:50:48 2009
@@ -163,8 +163,8 @@
                 this["SeekToAction"].Sensitive = !track.IsLive;
                 this["RestartSongAction"].Sensitive = !track.IsLive;
 
-                this["RestartSongAction"].Label = String.Format (Catalog.GetString ("_Restart {0}"), track.MediaTypeName);
-                this["JumpToPlayingTrackAction"].Label = String.Format (Catalog.GetString ("_Jump to Playing {0}"), track.MediaTypeName);
+                this["RestartSongAction"].Label = track.RestartLabel;
+                this["JumpToPlayingTrackAction"].Label = track.JumpToLabel;
                 this["JumpToPlayingTrackAction"].Sensitive = true;
             } else {
                 this["JumpToPlayingTrackAction"].Sensitive = false;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]