Fixed Translation issue in Korean language 45/316445/4
authorMd. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
Wed, 21 Aug 2024 09:41:03 +0000 (15:41 +0600)
committerMd. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
Thu, 22 Aug 2024 11:23:38 +0000 (17:23 +0600)
[Problem] [TNINE-437] Words that need Korean language translation[9.0]

[Cause & Measure]
 Cause   : 1. Some words weren't added to Resources.resx file.
   2. TextLabel wasn't properly created to show translated words.
 Measure : 1. Added words that neded tranlation in Resources.resx file
   2. Used TranslatableText property of TextLabel instead of Text property.

Change-Id: I3ead22d9f01f9b5cfcbbec02b33acef1dcbc603c
Signed-off-by: Md. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
30 files changed:
music-player/Common/AppConstants.cs
music-player/Models/Album.cs
music-player/Models/Artist.cs
music-player/Models/Track.cs
music-player/Models/TrackExtension.cs
music-player/TextResources/Resources.Designer.cs
music-player/TextResources/Resources.en-US.resx
music-player/TextResources/Resources.ko-KR.resx
music-player/TextResources/Resources.resx
music-player/ViewModels/AlbumDetailViewModel.cs
music-player/ViewModels/ArtistDetailViewModel.cs
music-player/ViewModels/PlaylistDetailViewModel.cs
music-player/ViewModels/PlaylistSelectorViewModel.cs
music-player/ViewModels/PlaylistViewModel.cs
music-player/Views/AlbumDetailView.cs
music-player/Views/AlbumView.cs
music-player/Views/ArtistDetailView.cs
music-player/Views/ArtistView.cs
music-player/Views/BaseContentView.cs
music-player/Views/BaseSubContentView.cs
music-player/Views/BaseView.cs
music-player/Views/PlaylistDetailView.cs
music-player/Views/PlaylistView.cs
music-player/Views/SearchView.cs
music-player/Views/SelectorView.cs
music-player/Views/TrackView.cs
music-player/Views/Utils/ViewLibrary.cs
music-player/Views/ViewManager.cs
music-player/music-player.csproj
packaging/org.tizen.MusicPlayer-1.0.1.tpk

index bea06b63daea297bccd891c658a38ffa095a6ce8..c6c4a96436ab0da0e704a07c57da515a151f9d21 100755 (executable)
@@ -12,8 +12,6 @@
         public const string TimeFormat = @"mm\:ss";
         public const string LightPlatformThemeId = "org.tizen.default-light-theme";
         public const string DarkPlatformThemeId = "org.tizen.default-dark-theme";
-        public const string FavouritePlaylist = "Favourite";
-        public const string RecentlyAddedPlaylist = "Recently Added";
 
         /// <summary>
         /// Maxcount 102 is including User playlist and System Playlist [Favourite, Recently Added].
index ecffa2efd77028736d1eb44e9aa6e5e4ab444da0..5f8a4f346c087ab943f6d887b95d38996c7f4ce5 100755 (executable)
@@ -30,7 +30,7 @@ namespace MusicPlayer.Models
             get => albumName;\r
             set\r
             {\r
-                string text = string.IsNullOrEmpty(value) ? "Unknown" : value;\r
+                string text = string.IsNullOrEmpty(value) ? TextResources.Resources.IDS_UNKNOWN : value;\r
                 SetProperty(ref albumName, text);\r
             }\r
         }\r
@@ -42,7 +42,7 @@ namespace MusicPlayer.Models
             get => artistName;\r
             set\r
             {\r
-                string text = string.IsNullOrEmpty(value) ? "Unknown" : value;\r
+                string text = string.IsNullOrEmpty(value) ? TextResources.Resources.IDS_UNKNOWN : value;\r
                 SetProperty(ref artistName, text);\r
             }\r
         }\r
index c3a83cfd4c1358e0974af55ecb7fb1dfec1a60b3..78f1225e0244e6caf5419db24a40e088a43c5597 100755 (executable)
@@ -26,7 +26,7 @@ namespace MusicPlayer.Models
             get => artistName;
             set
             {
-                string text = string.IsNullOrEmpty(value) ? "Unknown" : value;
+                string text = string.IsNullOrEmpty(value) ? TextResources.Resources.IDS_UNKNOWN : value;
                 SetProperty(ref artistName, text);
             }
         }
index c72e1f8c52ea819cca6060ec78c97c800671165f..8e49e2b42f42b141c07e112c0fb1c55cc709188d 100755 (executable)
@@ -40,7 +40,7 @@ namespace MusicPlayer.Models
             get => albumName;\r
             set\r
             {\r
-                string name = string.IsNullOrEmpty(value) ? "Unknown" : value;\r
+                string name = string.IsNullOrEmpty(value) ? TextResources.Resources.IDS_UNKNOWN : value;\r
                 SetProperty(ref albumName, name);\r
             }\r
         }\r
@@ -52,7 +52,7 @@ namespace MusicPlayer.Models
             get => artistName;\r
             set\r
             {\r
-                string name = string.IsNullOrEmpty(value) ? "Unknown" : value;\r
+                string name = string.IsNullOrEmpty(value) ? TextResources.Resources.IDS_UNKNOWN : value;\r
                 SetProperty(ref artistName, name);\r
             }\r
         }\r
index 28d1aa58c349ac787131b97c6990361c2535127e..02bcd852475ee8430d058ce49f99f441840a0815 100755 (executable)
@@ -82,7 +82,7 @@ namespace MusicPlayer.Models
         {
             if(string.IsNullOrEmpty(value))
             {
-                return "Unknown";
+                return TextResources.Resources.IDS_UNKNOWN;
             }
             return value;
         }
index 1ec8839091118cf869a2d2e4cd02c08e4b79d581..51a4b7fa958092150f1edb79f22f95fb108b5f00 100644 (file)
@@ -22,21 +22,21 @@ namespace MusicPlayer.TextResources {
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
+    public class Resources {
+
         private static global::System.Resources.ResourceManager resourceMan;
-        
+
         private static global::System.Globalization.CultureInfo resourceCulture;
-        
+
         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
         internal Resources() {
         }
-        
+
         /// <summary>
         ///   Returns the cached ResourceManager instance used by this class.
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
+        public static global::System.Resources.ResourceManager ResourceManager {
             get {
                 if (object.ReferenceEquals(resourceMan, null)) {
                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("music-player.TextResources.Resources", typeof(Resources).Assembly);
@@ -45,13 +45,13 @@ namespace MusicPlayer.TextResources {
                 return resourceMan;
             }
         }
-        
+
         /// <summary>
         ///   Overrides the current thread's CurrentUICulture property for all
         ///   resource lookups using this strongly typed resource class.
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
+        public static global::System.Globalization.CultureInfo Culture {
             get {
                 return resourceCulture;
             }
@@ -59,320 +59,347 @@ namespace MusicPlayer.TextResources {
                 resourceCulture = value;
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Add.
         /// </summary>
-        internal static string IDS_ADD {
+        public static string IDS_ADD {
             get {
                 return ResourceManager.GetString("IDS_ADD", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Add playlist name.
         /// </summary>
-        internal static string IDS_ADD_PLAYLIST_NAME {
+        public static string IDS_ADD_PLAYLIST_NAME {
             get {
                 return ResourceManager.GetString("IDS_ADD_PLAYLIST_NAME", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Add to playlist.
         /// </summary>
-        internal static string IDS_ADD_TO_PLAYLIST {
+        public static string IDS_ADD_TO_PLAYLIST {
             get {
                 return ResourceManager.GetString("IDS_ADD_TO_PLAYLIST", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Album.
         /// </summary>
-        internal static string IDS_ALBUM {
+        public static string IDS_ALBUM {
             get {
                 return ResourceManager.GetString("IDS_ALBUM", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Albums.
         /// </summary>
-        internal static string IDS_ALBUMS {
+        public static string IDS_ALBUMS {
             get {
                 return ResourceManager.GetString("IDS_ALBUMS", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Artist.
         /// </summary>
-        internal static string IDS_ARTIST {
+        public static string IDS_ARTIST {
             get {
                 return ResourceManager.GetString("IDS_ARTIST", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Artists.
         /// </summary>
-        internal static string IDS_ARTISTS {
+        public static string IDS_ARTISTS {
             get {
                 return ResourceManager.GetString("IDS_ARTISTS", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Cancel.
         /// </summary>
-        internal static string IDS_CANCEL {
+        public static string IDS_CANCEL {
             get {
                 return ResourceManager.GetString("IDS_CANCEL", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Can&apos;t enter more than 64 characters..
         /// </summary>
-        internal static string IDS_CANT_ENTER_MORE_CHAR {
+        public static string IDS_CANT_ENTER_MORE_CHAR {
             get {
                 return ResourceManager.GetString("IDS_CANT_ENTER_MORE_CHAR", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Create.
         /// </summary>
-        internal static string IDS_CREATE {
+        public static string IDS_CREATE {
             get {
                 return ResourceManager.GetString("IDS_CREATE", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to + Create new playlist.
         /// </summary>
-        internal static string IDS_CREATE_NEW_PLAYLIST {
+        public static string IDS_CREATE_NEW_PLAYLIST {
             get {
                 return ResourceManager.GetString("IDS_CREATE_NEW_PLAYLIST", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Create playlist.
         /// </summary>
-        internal static string IDS_CREATE_PLAYLIST {
+        public static string IDS_CREATE_PLAYLIST {
             get {
                 return ResourceManager.GetString("IDS_CREATE_PLAYLIST", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Delete.
         /// </summary>
-        internal static string IDS_DELETE {
+        public static string IDS_DELETE {
             get {
                 return ResourceManager.GetString("IDS_DELETE", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Details.
         /// </summary>
-        internal static string IDS_DETAILS {
+        public static string IDS_DETAILS {
             get {
                 return ResourceManager.GetString("IDS_DETAILS", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Done.
         /// </summary>
-        internal static string IDS_DONE {
+        public static string IDS_DONE {
             get {
                 return ResourceManager.GetString("IDS_DONE", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Enter Playlist Name.
         /// </summary>
-        internal static string IDS_ENTER_PLAYLIST_NAME {
+        public static string IDS_ENTER_PLAYLIST_NAME {
             get {
                 return ResourceManager.GetString("IDS_ENTER_PLAYLIST_NAME", resourceCulture);
             }
         }
-        
+
+        /// <summary>
+        ///   Looks up a localized string similar to Favourite.
+        /// </summary>
+        public static string IDS_FAVOURITE {
+            get {
+                return ResourceManager.GetString("IDS_FAVOURITE", resourceCulture);
+            }
+        }
+
         /// <summary>
         ///   Looks up a localized string similar to Music.
         /// </summary>
-        internal static string IDS_MUSIC {
+        public static string IDS_MUSIC {
             get {
                 return ResourceManager.GetString("IDS_MUSIC", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to No items in folder.
         /// </summary>
-        internal static string IDS_NO_ITEMS_IN_FOLDER {
+        public static string IDS_NO_ITEMS_IN_FOLDER {
             get {
                 return ResourceManager.GetString("IDS_NO_ITEMS_IN_FOLDER", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to No playlists available.
         /// </summary>
-        internal static string IDS_NO_PLAYLIST_AVAIL {
+        public static string IDS_NO_PLAYLIST_AVAIL {
             get {
                 return ResourceManager.GetString("IDS_NO_PLAYLIST_AVAIL", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to No results found.
         /// </summary>
-        internal static string IDS_NO_RESULT_FOUND {
+        public static string IDS_NO_RESULT_FOUND {
             get {
                 return ResourceManager.GetString("IDS_NO_RESULT_FOUND", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Ok.
         /// </summary>
-        internal static string IDS_OK {
+        public static string IDS_OK {
             get {
                 return ResourceManager.GetString("IDS_OK", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Playlist.
         /// </summary>
-        internal static string IDS_PLAYLIST {
+        public static string IDS_PLAYLIST {
             get {
                 return ResourceManager.GetString("IDS_PLAYLIST", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Playlist name already in use..
         /// </summary>
-        internal static string IDS_PLAYLIST_NAME_USED {
+        public static string IDS_PLAYLIST_NAME_USED {
             get {
                 return ResourceManager.GetString("IDS_PLAYLIST_NAME_USED", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Playlists.
         /// </summary>
-        internal static string IDS_PLAYLISTS {
+        public static string IDS_PLAYLISTS {
             get {
                 return ResourceManager.GetString("IDS_PLAYLISTS", resourceCulture);
             }
         }
-        
+
+        /// <summary>
+        ///   Looks up a localized string similar to Recently Added.
+        /// </summary>
+        public static string IDS_RECENTLY_ADDED {
+            get {
+                return ResourceManager.GetString("IDS_RECENTLY_ADDED", resourceCulture);
+            }
+        }
+
         /// <summary>
         ///   Looks up a localized string similar to Remove.
         /// </summary>
-        internal static string IDS_REMOVE {
+        public static string IDS_REMOVE {
             get {
                 return ResourceManager.GetString("IDS_REMOVE", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Search.
         /// </summary>
-        internal static string IDS_SEARCH {
+        public static string IDS_SEARCH {
             get {
                 return ResourceManager.GetString("IDS_SEARCH", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Search music.
         /// </summary>
-        internal static string IDS_SEARCH_MUSIC {
+        public static string IDS_SEARCH_MUSIC {
             get {
                 return ResourceManager.GetString("IDS_SEARCH_MUSIC", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Select All.
         /// </summary>
-        internal static string IDS_SELECT_ALL {
+        public static string IDS_SELECT_ALL {
             get {
                 return ResourceManager.GetString("IDS_SELECT_ALL", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Select Items.
         /// </summary>
-        internal static string IDS_SELECT_ITEMS {
+        public static string IDS_SELECT_ITEMS {
             get {
                 return ResourceManager.GetString("IDS_SELECT_ITEMS", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Selected.
         /// </summary>
-        internal static string IDS_SELECTED {
+        public static string IDS_SELECTED {
             get {
                 return ResourceManager.GetString("IDS_SELECTED", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Share.
         /// </summary>
-        internal static string IDS_SHARE {
+        public static string IDS_SHARE {
             get {
                 return ResourceManager.GetString("IDS_SHARE", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to This Track will be Deleted.
         /// </summary>
-        internal static string IDS_THIS_TRACK_WILL_BE_DELETED {
+        public static string IDS_THIS_TRACK_WILL_BE_DELETED {
             get {
                 return ResourceManager.GetString("IDS_THIS_TRACK_WILL_BE_DELETED", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Track.
         /// </summary>
-        internal static string IDS_TRACK {
+        public static string IDS_TRACK {
             get {
                 return ResourceManager.GetString("IDS_TRACK", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Tracks.
         /// </summary>
-        internal static string IDS_TRACKS {
+        public static string IDS_TRACKS {
             get {
                 return ResourceManager.GetString("IDS_TRACKS", resourceCulture);
             }
         }
-        
+
         /// <summary>
         ///   Looks up a localized string similar to Type Here.
         /// </summary>
-        internal static string IDS_TYPE_HERE {
+        public static string IDS_TYPE_HERE {
             get {
                 return ResourceManager.GetString("IDS_TYPE_HERE", resourceCulture);
             }
         }
+
+        /// <summary>
+        ///   Looks up a localized string similar to Unknown.
+        /// </summary>
+        public static string IDS_UNKNOWN {
+            get {
+                return ResourceManager.GetString("IDS_UNKNOWN", resourceCulture);
+            }
+        }
     }
 }
index 4c78371707555a4b23563fe42ea5e5acc4c78d31..ed1aec05fd01c6b7bf5077da570783f4e36d721a 100644 (file)
   <data name="IDS_ENTER_PLAYLIST_NAME" xml:space="preserve">
     <value>Enter Playlist Name</value>
   </data>
+  <data name="IDS_FAVOURITE" xml:space="preserve">
+    <value>Favourite</value>
+  </data>
   <data name="IDS_MUSIC" xml:space="preserve">
     <value>Music</value>
   </data>
   <data name="IDS_PLAYLIST_NAME_USED" xml:space="preserve">
     <value>Playlist name already in use.</value>
   </data>
+  <data name="IDS_RECENTLY_ADDED" xml:space="preserve">
+    <value>Recently Added</value>
+  </data>
   <data name="IDS_REMOVE" xml:space="preserve">
     <value>Remove</value>
   </data>
   <data name="IDS_TYPE_HERE" xml:space="preserve">
     <value>Type Here</value>
   </data>
+  <data name="IDS_UNKNOWN" xml:space="preserve">
+    <value>Unknown</value>
+  </data>
 </root>
\ No newline at end of file
index 4cda68943f994ba82133dc737bb25ab5a48449d0..8b8cbc4ff9d6fed2a474e02e7b3c509be6160cba 100644 (file)
   <data name="IDS_ENTER_PLAYLIST_NAME" xml:space="preserve">
     <value>재생 목록 이름 입력</value>
   </data>
+  <data name="IDS_FAVOURITE" xml:space="preserve">
+    <value>파부라이트</value>
+  </data>
   <data name="IDS_MUSIC" xml:space="preserve">
     <value>음악</value>
   </data>
   <data name="IDS_PLAYLIST_NAME_USED" xml:space="preserve">
     <value>이미 사용 중인 재생 목록 이름입니다.</value>
   </data>
+  <data name="IDS_RECENTLY_ADDED" xml:space="preserve">
+    <value>최근에 추가되었습니다.</value>
+  </data>
   <data name="IDS_REMOVE" xml:space="preserve">
     <value>제거하다</value>
   </data>
   <data name="IDS_TYPE_HERE" xml:space="preserve">
     <value>여기에 입력</value>
   </data>
+  <data name="IDS_UNKNOWN" xml:space="preserve">
+    <value>미상</value>
+  </data>
 </root>
\ No newline at end of file
index 1824c485e10b1f1c26839883cd3c9507914035e6..0e00b19e69db1755117b0afc02f5caf9ce827f98 100644 (file)
   <data name="IDS_ENTER_PLAYLIST_NAME" xml:space="preserve">
     <value>Enter Playlist Name</value>
   </data>
+  <data name="IDS_FAVOURITE" xml:space="preserve">
+    <value>Favourite</value>
+  </data>
   <data name="IDS_MUSIC" xml:space="preserve">
     <value>Music</value>
   </data>
   <data name="IDS_PLAYLIST_NAME_USED" xml:space="preserve">
     <value>Playlist name already in use.</value>
   </data>
+  <data name="IDS_RECENTLY_ADDED" xml:space="preserve">
+    <value>Recently Added</value>
+  </data>
   <data name="IDS_REMOVE" xml:space="preserve">
     <value>Remove</value>
   </data>
   <data name="IDS_TYPE_HERE" xml:space="preserve">
     <value>Type Here</value>
   </data>
+  <data name="IDS_UNKNOWN" xml:space="preserve">
+    <value>Unknown</value>
+  </data>
 </root>
\ No newline at end of file
index 747dea5022e8f2f4bf85ca0553c30ea6694bbf84..b7dacf687169637bc16ea0f0162d6dac702aa523 100755 (executable)
@@ -48,7 +48,7 @@ namespace MusicPlayer.ViewModels
             get => albumName;\r
             set\r
             {\r
-                string text = string.Equals(value,"Unknown") ? null : value;\r
+                string text = string.Equals(value, TextResources.Resources.IDS_UNKNOWN) ? null : value;\r
                 SetProperty(ref albumName, text);\r
             }\r
         }\r
@@ -60,7 +60,7 @@ namespace MusicPlayer.ViewModels
             get => artistName;\r
             set\r
             {\r
-                string text = string.Equals(value, "Unknown") ? null : value;\r
+                string text = string.Equals(value, TextResources.Resources.IDS_UNKNOWN) ? null : value;\r
                 SetProperty(ref artistName, text);\r
             }\r
         }\r
index f0e73a435687fd6ba5180d77a7df7fe19982be81..60e4094e388b97ac57e94607b82b74f155667ea4 100755 (executable)
@@ -94,7 +94,7 @@ namespace MusicPlayer.ViewModels
             albumListViewModel.Clear();
             groupListViewModel.Clear();
 
-            string text = string.Equals(ArtistName, "Unknown") ? "" : ArtistName;
+            string text = string.Equals(ArtistName, TextResources.Resources.IDS_UNKNOWN) ? "" : ArtistName;
 
             List<Album> albumList = ArtistDataProvider.GetArtistAlbumList(text);
             albumListViewModel.CreateData(albumList);
index a43c1732a876774e5f92d548534be14a5efd5b08..442e89772fc67ed90d02e0c160432c5126f0462a 100755 (executable)
@@ -17,7 +17,7 @@ namespace MusicPlayer.ViewModels
             PlaylistId = playlistId;
             PlaylistName = playlist.Name;
             IsDefaultPlaylist = false;
-            if(PlaylistName == AppConstants.RecentlyAddedPlaylist || PlaylistName == AppConstants.FavouritePlaylist)
+            if(PlaylistName == TextResources.Resources.IDS_RECENTLY_ADDED || PlaylistName == TextResources.Resources.IDS_FAVOURITE)
             {
                 IsDefaultPlaylist = true;
             }
index 28a30d2c119442a9074cb215c3a95253be763a77..42b03c3b9c17c95da321f3636999373f3771d60a 100755 (executable)
@@ -114,7 +114,7 @@ namespace MusicPlayer.ViewModels
             {
                 if (playlist != null)
                 {
-                    if (playlist.Name == AppConstants.FavouritePlaylist || playlist.Name == AppConstants.RecentlyAddedPlaylist)
+                    if (playlist.Name == TextResources.Resources.IDS_FAVOURITE || playlist.Name == TextResources.Resources.IDS_RECENTLY_ADDED)
                     {
                         continue;
                     }
index 6c9291b8119156d62bdf8b4e56a9fd7431bfba4d..8ed57ee0b27e38f460b444bda4cb26b26d586c14 100755 (executable)
@@ -122,8 +122,8 @@ namespace MusicPlayer.ViewModels
         private void AddDefaultPlaylist(List<PlaylistData> list)
         {
             // Deleting the Favourite and Recently Added first always so that we can add member correctly again.
-            Playlist favouritePlaylist = CreateDefaultPlaylist(AppConstants.FavouritePlaylist, Resources.GetImagePath() + "favourite_playlist.png");
-            Playlist recentlyAddedPlaylist = CreateDefaultPlaylist(AppConstants.RecentlyAddedPlaylist, Resources.GetImagePath() + "recently_added_playlist.png");
+            Playlist favouritePlaylist = CreateDefaultPlaylist(TextResources.Resources.IDS_FAVOURITE, Resources.GetImagePath() + "favourite_playlist.png");
+            Playlist recentlyAddedPlaylist = CreateDefaultPlaylist(TextResources.Resources.IDS_RECENTLY_ADDED, Resources.GetImagePath() + "recently_added_playlist.png");
             Tuple<int, int> memberCounts = AddMemberToDefaultList(favouritePlaylist, recentlyAddedPlaylist);
             list.Add(new PlaylistData(recentlyAddedPlaylist.Id, recentlyAddedPlaylist.Name, GetTrackCountText(memberCounts.Item1), recentlyAddedPlaylist.ThumbnailPath));
             list.Add(new PlaylistData(favouritePlaylist.Id, favouritePlaylist.Name, GetTrackCountText(memberCounts.Item2), favouritePlaylist.ThumbnailPath));
@@ -141,7 +141,7 @@ namespace MusicPlayer.ViewModels
             {
                 if (playlist != null)
                 {
-                    if (playlist.Name == AppConstants.FavouritePlaylist || playlist.Name == AppConstants.RecentlyAddedPlaylist)
+                    if (playlist.Name == TextResources.Resources.IDS_FAVOURITE || playlist.Name == TextResources.Resources.IDS_RECENTLY_ADDED)
                     {
                         continue;
                     }
index b4c2b391c9e3e55b8937c78be607b012362491c0..ac0919905574474d6889651353bbe3c0b84df974 100755 (executable)
@@ -21,7 +21,7 @@ namespace MusicPlayer.Views
             Name = "AlbumDetailView";\r
             this.viewModel = viewModel;\r
             LinearLayout baseLayout = new LinearLayout();\r
-            if(DeviceInfo.IsPortrait)\r
+            if (DeviceInfo.IsPortrait)\r
             {\r
                 baseLayout.LinearOrientation = LinearLayout.Orientation.Vertical;\r
                 baseLayout.VerticalAlignment = VerticalAlignment.Top;\r
@@ -44,12 +44,24 @@ namespace MusicPlayer.Views
             Add(listContainer);\r
             AddAlbumArt();\r
             AddAlbumInfo();\r
+\r
+            SetTitleText(viewModel.AlbumName);\r
             TouchEvent += (object source, TouchEventArgs e) => false;\r
         }\r
-\r
+        protected override void SetTitleText(string text)\r
+        {\r
+            if (text == null || text == TextResources.Resources.IDS_UNKNOWN)\r
+            {\r
+                titleText = "IDS_UNKNOWN";\r
+            }\r
+            else\r
+            {\r
+                titleText = text;\r
+            }\r
+        }\r
         public override string GetTitleText()\r
         {\r
-            return albumNameLabel.Text;\r
+            return titleText;\r
         }\r
 \r
         public override void UpdateSubContentMoreButtonItems(Menu moreMenu)\r
@@ -74,11 +86,11 @@ namespace MusicPlayer.Views
 \r
         protected override void Dispose(DisposeTypes type)\r
         {\r
-            if(Disposed)\r
+            if (Disposed)\r
             {\r
                 return;\r
             }\r
-            if(type == DisposeTypes.Explicit)\r
+            if (type == DisposeTypes.Explicit)\r
             {\r
                 if (albumInfoView != null)\r
                 {\r
@@ -129,9 +141,9 @@ namespace MusicPlayer.Views
                 BackgroundColor = Color.Transparent,\r
                 Layout = new LinearLayout()\r
                 {\r
-                   LinearOrientation = LinearLayout.Orientation.Vertical,\r
-                   VerticalAlignment = VerticalAlignment.Center,\r
-                   HorizontalAlignment = HorizontalAlignment.Center,\r
+                    LinearOrientation = LinearLayout.Orientation.Vertical,\r
+                    VerticalAlignment = VerticalAlignment.Center,\r
+                    HorizontalAlignment = HorizontalAlignment.Center,\r
                 },\r
                 Weight = 0.5f\r
             };\r
index 36ac09b05319f34004cbfe7da4c5aece5b519aa9..0b3fbd3e15ca0025a896336f52092e9e0fcc790a 100755 (executable)
@@ -11,7 +11,7 @@ namespace MusicPlayer.Views
 {\r
     class AlbumView : BaseContentView\r
     {\r
-        private readonly AlbumViewModel viewModel;\r
+        private AlbumViewModel viewModel;\r
         private TextLabel albumCountLabel;\r
         private TextLabel albumTitleLabel;\r
         private bool isTrackListEmpty;\r
@@ -20,7 +20,7 @@ namespace MusicPlayer.Views
         {\r
             Name = "AlbumView";\r
             this.viewModel = viewModel;\r
-            viewModel.ListViewModel.CollectionChanged += OnListViewModelCollectionChanged;\r
+            this.viewModel.ListViewModel.CollectionChanged += OnListViewModelCollectionChanged;\r
             isTrackListEmpty = viewModel.ListViewModel.Count == 0;\r
             collectionView.ItemsSource = viewModel.ListViewModel;\r
             collectionView.ItemTemplate = new DataTemplate(() =>\r
@@ -136,7 +136,14 @@ namespace MusicPlayer.Views
                 return;\r
             }\r
             MusicAlbum currentAlbum = (MusicAlbum)collectionView.SelectedItem;\r
-            SubContentViewAddEventArgs albumDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.AlbumDetails, currentAlbum.AlbumName, currentAlbum);\r
+\r
+            string titleText = currentAlbum.AlbumName;\r
+            if (titleText == null || titleText == TextResources.Resources.IDS_UNKNOWN)\r
+            {\r
+                titleText = "IDS_UNKNOWN";\r
+            }\r
+\r
+            SubContentViewAddEventArgs albumDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.AlbumDetails, titleText, currentAlbum);\r
             OnSubViewAdd(albumDetailViewArgs);\r
             // this is to clear the selected item\r
             collectionView.SelectedItem = null;\r
@@ -156,5 +163,12 @@ namespace MusicPlayer.Views
             OnOperationViewAdd(operationEventArgs);\r
         }\r
 \r
+        public override void ResetViewModel()\r
+        {\r
+            viewModel = new AlbumViewModel();\r
+            viewModel.ListViewModel.CollectionChanged += OnListViewModelCollectionChanged;\r
+            collectionView.ItemsSource = viewModel.ListViewModel;\r
+        }\r
+\r
     }\r
 }\r
index 16554e8c2cbd03b960cc17f70398f2c35f079391..8ab86125dfdffb0e202228ee05b513c45b4bf49b 100755 (executable)
@@ -5,26 +5,49 @@ using Tizen.NUI.Binding;
 using MusicPlayer.Common;
 using MusicPlayer.Models;
 using MusicPlayer.Views.Utils;
+using Tizen.System;
+using System;
 
 namespace MusicPlayer.Views
 {
     class ArtistDetailView : BaseSubContentView
     {
-        private readonly ArtistDetailViewModel viewModel;
-
+        private ArtistDetailViewModel viewModel;
         public ArtistDetailView(ArtistDetailViewModel viewModel) : base()
         {
             this.viewModel = viewModel;
-            countLabel.BindingContext = viewModel;
+            countLabel.BindingContext = this.viewModel;
             countLabel.SetBinding(TextLabel.TextProperty, "TotalCount");
             UpdateCollectionView();
             Add(listContainer);
             TouchEvent += (object source, TouchEventArgs e) => false;
+            SetTitleText(viewModel.ArtistName);
+            SystemSettings.LocaleLanguageChanged += LanguageChangedCallback;
+        }
+
+        private void LanguageChangedCallback(object sender, LocaleLanguageChangedEventArgs e)
+        {
+            string artistName = this.viewModel.ArtistName;
+            viewModel = new ArtistDetailViewModel(new Artist(artistName));
+            countLabel.BindingContext = viewModel;
+            UpdateCollectionView();
+        }
+
+        protected override void SetTitleText(string text)
+        {
+            if (text == null || text == TextResources.Resources.IDS_UNKNOWN)
+            {
+                titleText = "IDS_UNKNOWN";
+            }
+            else
+            {
+                titleText = text;
+            }
         }
 
         public override string GetTitleText()
         {
-            return viewModel.ArtistName;
+            return titleText;
         }
 
         public override void UpdateSubContentMoreButtonItems(Menu moreMenu)
index b1d1fcbf872e2556bf67a7824b890877796f7d9f..6f568c5d65fcf11744bf45c1afc723e78dc205ae 100755 (executable)
@@ -11,7 +11,7 @@ namespace MusicPlayer.Views
 {
     class ArtistView : BaseContentView
     {
-        private readonly ArtistViewModel viewModel;
+        private ArtistViewModel viewModel;
         private TextLabel artistCountLabel;
         private TextLabel artistTitleLabel;
         private bool isTrackListEmpty;
@@ -126,7 +126,8 @@ namespace MusicPlayer.Views
                 return;
             }
             Artist currentArtist = (Artist)collectionView.SelectedItem;
-            SubContentViewAddEventArgs artistDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.ArtistDetails, currentArtist.ArtistName, currentArtist);
+            string titleText = (currentArtist.ArtistName == null || currentArtist.ArtistName == TextResources.Resources.IDS_UNKNOWN) ? "IDS_UNKNOWN" : currentArtist.ArtistName;
+            SubContentViewAddEventArgs artistDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.ArtistDetails, titleText, currentArtist);
             OnSubViewAdd(artistDetailViewArgs);
             // this is to clear the selected item
             collectionView.SelectedItem = null;
@@ -146,5 +147,12 @@ namespace MusicPlayer.Views
             OnOperationViewAdd(operationEventArgs);
         }
 
+
+        public override void ResetViewModel()
+        {
+            viewModel = new ArtistViewModel();
+            collectionView.ItemsSource = viewModel.ListViewModel;
+            viewModel.ListViewModel.CollectionChanged += OnListViewModelCollectionChanged;
+        }
     }
 }
\ No newline at end of file
index abc246e55f6ab76d9766ca9fc24b5de52465644e..681c53f3f9c304b7d99b9154249b6e4e7de1b8f0 100755 (executable)
@@ -316,5 +316,11 @@ namespace MusicPlayer.Views
             DismissMoreMenu();
             OnOperationViewAdd(e);
         }
+
+        //Override this method to recreate the base content view to reflect translation on title text
+        public virtual void ResetViewModel()
+        {
+            return;
+        }
     }
 }
index 69eed42a58a2fdd44de68e4f86a1e88a7936f910..bef577f85d08b75ef447ebddf1c6d2a9d7c6c876 100755 (executable)
@@ -20,6 +20,7 @@ namespace MusicPlayer.Views
         protected CollectionView collectionView;
         protected View noItemView;
         protected LottieAnimationView noItemsAnimation;
+        protected string titleText;
 
         public event EventHandler<OperationViewAddEventArgs> SubContentOperationViewAdd;
 
@@ -201,6 +202,11 @@ namespace MusicPlayer.Views
             return string.Empty;
         }
 
+        protected virtual void SetTitleText(string text)
+        {
+            titleText = text;
+        }
+
         public virtual void UpdateSubContentMoreButtonItems(Menu moreMenu)
         {
 
index f0b1d32e1677014e5d6c604be30c53c229eda4f7..91c4a2880ad2cfe7f2e3937184c51d524f1575ca 100755 (executable)
@@ -17,6 +17,7 @@ namespace MusicPlayer.Views
         private Button searchButton;
         private TabView tabs;
         private BaseContentView baseContentView;
+        private string title;
 
         //  TODO these name strings are temporary...once the po files are added
         // need to use Translatable names.
@@ -64,6 +65,7 @@ namespace MusicPlayer.Views
             };
             topView.Add(titleLabel);
             titleLabel.SetBinding(TextLabel.TextProperty, "Title");
+            titleLabel.SetBinding(TextLabel.TranslatableTextProperty, "Title");
             RelativeLayout.SetLeftTarget(titleLabel, topView);
             RelativeLayout.SetLeftRelativeOffset(titleLabel, 0.0f);
             RelativeLayout.SetRightTarget(titleLabel, topView);
@@ -109,6 +111,41 @@ namespace MusicPlayer.Views
             searchButton = null;
         }
 
+        public void resetTitleLabel( bool backButtonShown)
+        {
+            if (titleLabel != null)
+            {
+                topView.Remove(titleLabel);
+            }
+
+            titleLabel = new TextLabel()
+            {
+                StyleName = "PageLabel",
+                ThemeChangeSensitive = true,
+                PixelSize = 40.SpToPx(),
+                FontFamily = "BreezeSans",
+                HorizontalAlignment = HorizontalAlignment.Begin,
+                VerticalAlignment = VerticalAlignment.Center,
+                Ellipsis = true,
+                FontStyle = UIFontStyles.NormalLight,
+            };
+
+            topView.Add(titleLabel);
+            titleLabel.SetBinding(TextLabel.TextProperty, "Title");
+
+            RelativeLayout.SetLeftTarget(titleLabel, topView);
+            RelativeLayout.SetLeftRelativeOffset(titleLabel, 0.0f);
+            RelativeLayout.SetRightTarget(titleLabel, topView);
+            RelativeLayout.SetRightRelativeOffset(titleLabel, 1.0f);
+            RelativeLayout.SetFillHorizontal(titleLabel, true);
+
+            if (backButton != null && backButtonShown)
+            {
+                RelativeLayout.SetLeftTarget(titleLabel, backButton);
+                RelativeLayout.SetLeftRelativeOffset(titleLabel, 1.0f);
+            }
+        }
+
         public TabView Tabs
         {
             get => tabs;
@@ -116,8 +153,27 @@ namespace MusicPlayer.Views
 
         public string Title
         {
-            get => titleLabel.Text;
-            set { titleLabel.Text = value;}
+            get
+            {
+                return this.title;
+            }
+            set
+            {
+                bool backButtonShown = (value != "IDS_MUSIC");
+                resetTitleLabel(backButtonShown);
+                Tizen.Log.Debug(AppConstants.LogTag, $"Changing value from {this.title} to {value}");
+                if (value.Contains("IDS"))
+                {
+                    titleLabel.TranslatableText = value;
+                    titleLabel.Text = null;
+                }
+                else
+                {
+                    titleLabel.TranslatableText = null;
+                    titleLabel.Text = value;
+                }
+                this.title = value;
+            }
         }
 
         public bool BackButton
@@ -229,7 +285,7 @@ namespace MusicPlayer.Views
             else
             {
                 BackButton = false;
-                Title = "Music";
+                Title = "IDS_MUSIC";
             }
             contentView.Add(view);
             baseContentView = view;
@@ -305,8 +361,9 @@ namespace MusicPlayer.Views
             if (baseContentView != null)
             {
                 BackButton = false;
-                Title = "Music";
+                Title = "IDS_MUSIC";
                 baseContentView.RemoveSubContentView();
+                Tizen.Log.Debug(AppConstants.LogTag, "Back called");
             }
         }
 
index 0ee27e18de13e8eed7bdb98de7eb0a8b29075f6c..9829d131a62066c2081ebea5faeaa73029740d86 100755 (executable)
@@ -41,6 +41,24 @@ namespace MusicPlayer.Views
             {
                 AddNoItemView();
             }
+
+            SetTitleText(viewModel.PlaylistName);
+        }
+
+        protected override void SetTitleText(string text)
+        {
+            if (text == TextResources.Resources.IDS_FAVOURITE)
+            {
+                titleText = "IDS_FAVOURITE";
+            }
+            else if (text == TextResources.Resources.IDS_RECENTLY_ADDED)
+            {
+                titleText = "IDS_RECENTLY_ADDED";
+            }
+            else
+            {
+                titleText = text;
+            }
         }
 
         private void OnListViewModelCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
@@ -59,7 +77,7 @@ namespace MusicPlayer.Views
 
         public override string GetTitleText()
         {
-            return viewModel.PlaylistName;
+            return titleText;
         }
 
         public override void DeleteSubView()
index 4320f657288249e777fa078174b2e16adb5666c6..2baaa3e68859ce89702a56ba4cb5df01e03447e2 100755 (executable)
@@ -18,7 +18,7 @@ namespace MusicPlayer.Views
         private TextLabel playlistCountLabel;
         private TextLabel playlistTitleLabel;
         private Button playlistCreateButton;
-        private readonly PlaylistViewModel viewModel;
+        private PlaylistViewModel viewModel;
 
         public PlaylistView(PlaylistViewModel viewModel)
         {
@@ -48,7 +48,7 @@ namespace MusicPlayer.Views
                 Margin = new Extents(0, 4, 0, 0).SpToPx(),
             };
             titleView.Add(playlistCountLabel);
-            playlistCountLabel.BindingContext = viewModel;
+            playlistCountLabel.BindingContext = this.viewModel;
             playlistCountLabel.SetBinding(TextLabel.TextProperty, "PlaylistCount");
 
             playlistTitleLabel = new TextLabel()
@@ -123,7 +123,18 @@ namespace MusicPlayer.Views
                 return;
             }
             PlaylistModel playlistModel = (PlaylistModel)collectionView.SelectedItem;
-            SubContentViewAddEventArgs playlistDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.PlaylistDetails, playlistModel.PlaylistName, playlistModel.PlaylistId);
+
+            string titleText = playlistModel.PlaylistName;
+            if (titleText == TextResources.Resources.IDS_FAVOURITE)
+            {
+                titleText = "IDS_FAVOURITE";
+            }
+            else if (titleText == TextResources.Resources.IDS_RECENTLY_ADDED)
+            {
+                titleText = "IDS_RECENTLY_ADDED";
+            }
+
+            SubContentViewAddEventArgs playlistDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.PlaylistDetails, titleText, playlistModel.PlaylistId);
             OnSubViewAdd(playlistDetailViewArgs);
             // this is clear the selected item
             collectionView.SelectedItem = null;
@@ -421,5 +432,11 @@ namespace MusicPlayer.Views
             OperationViewAddEventArgs operationEventArgs = new OperationViewAddEventArgs(OperationViewType.Delete, ContentViewType.Playlist, viewModel.UserPlaylistViewModel);
             OnOperationViewAdd(operationEventArgs);
         }
+
+        public override void ResetViewModel()
+        {
+            this.viewModel = new PlaylistViewModel();
+            collectionView.ItemsSource = this.viewModel.ListViewModel;
+        }
     }
 }
index c5d9f0d95fa0ecf522b64c9e7c9e2a14382ba898..c623017fe2fcf3543bce2b53530bfc96ddf8d502 100755 (executable)
@@ -264,13 +264,15 @@ namespace MusicPlayer.Views
                 if (searchModel.ItemType == 0)
                 {
                     Artist currentArtist = searchModel.ArtistDetail;
-                    SubContentViewAddEventArgs artistDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.ArtistDetails, currentArtist.ArtistName, currentArtist);
+                    string titleText = (currentArtist.ArtistName == null || currentArtist.ArtistName == TextResources.Resources.IDS_UNKNOWN)? "IDS_UNKONOW" : currentArtist.ArtistName;
+                    SubContentViewAddEventArgs artistDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.ArtistDetails, titleText, currentArtist);
                     LaunchDetailView?.Invoke(this, artistDetailViewArgs);
                 }
                 else if (searchModel.ItemType == 1)
                 {
                     MusicAlbum currentAlbum = searchModel.AlbumDetail;
-                    SubContentViewAddEventArgs albumDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.AlbumDetails, currentAlbum.AlbumName, currentAlbum);
+                    string titleText = (currentAlbum.AlbumName == null || currentAlbum.AlbumName == TextResources.Resources.IDS_UNKNOWN) ? "IDS_UNKONOW" : currentAlbum.AlbumName;
+                    SubContentViewAddEventArgs albumDetailViewArgs = new SubContentViewAddEventArgs(SubContentViewType.AlbumDetails, titleText, currentAlbum);
                     LaunchDetailView?.Invoke(this, albumDetailViewArgs);
                 }
                 else if (searchModel.ItemType == 2)
index 6f5ac700d1eef6368c0a9defd3bda0c6bf7e5e5f..8b0e09aa638698addb728c70e514f9d09ea1359a 100755 (executable)
@@ -407,7 +407,7 @@ namespace MusicPlayer.Views
                     {
                         artistItem.IsSelected = false;
                         string text = artistItem.ArtistName;
-                        if (text == "Unknown")
+                        if (text == TextResources.Resources.IDS_UNKNOWN)
                         {
                             text = string.Empty;
                         }
@@ -454,7 +454,7 @@ namespace MusicPlayer.Views
                     {
                         artistItem.IsSelected = true;
                         string text = artistItem.ArtistName;
-                        if (text == "Unknown")
+                        if (text == TextResources.Resources.IDS_UNKNOWN)
                         {
                             text = string.Empty;
                         }
index e0efae28c87d301cd2e3426badf530318bee4e74..a593ff8ad5eeeb29ac9bea504a1e437eb60ce097 100755 (executable)
@@ -10,7 +10,7 @@ namespace MusicPlayer.Views
 {\r
     class TrackView : BaseContentView\r
     {\r
-        private readonly TrackViewModel viewModel;\r
+        private TrackViewModel viewModel;\r
         private TextLabel trackCountLabel;\r
         private TextLabel trackTitleLabel;\r
         private Button playAllWithShuffle;\r
@@ -217,5 +217,12 @@ namespace MusicPlayer.Views
             OperationViewAddEventArgs operationEventArgs = new OperationViewAddEventArgs(OperationViewType.AddToPlaylist, ContentViewType.Track, viewModel.ListViewModel);\r
             OnOperationViewAdd(operationEventArgs);\r
         }\r
+\r
+        public override void ResetViewModel()\r
+        {\r
+            viewModel = new TrackViewModel();\r
+            viewModel.ListViewModel.CollectionChanged += OnListViewModelCollectionChanged;\r
+            collectionView.ItemsSource = viewModel.ListViewModel;\r
+        }\r
     }\r
 }\r
index 6c73d815d95fd7028bacb1ae0198701f75598ca3..f2141da3da0cfe516cf755b904a57f1868ffc867 100755 (executable)
@@ -15,9 +15,9 @@ namespace MusicPlayer.Views.Utils
         public ViewLibrary()
         {
             contentViewDictionary = new Dictionary<int, BaseContentView>();
-            foreach(int i in Enum.GetValues(typeof(ContentViewType)))
+            foreach (int contentViewId in Enum.GetValues(typeof(ContentViewType)))
             {
-                contentViewDictionary[i] = null;
+                contentViewDictionary[contentViewId] = null;
             }
 
             contentViewFactory = new ConcreteContentViewFactory();
@@ -27,7 +27,7 @@ namespace MusicPlayer.Views.Utils
 
         public BaseContentView GetContentView(ContentViewType type)
         {
-            if(contentViewDictionary[(int)type] == null)
+            if (contentViewDictionary[(int)type] == null)
             {
                 contentViewDictionary[(int)type] = contentViewFactory.GetContentView(type);
             }
@@ -42,7 +42,15 @@ namespace MusicPlayer.Views.Utils
 
         public View AddOperationView(OperationViewType type, ContentViewType contentType, object viewModelData, object otherData)
         {
-           return operationViewFactory.AddOperationView(type, contentType, viewModelData, otherData);
+            return operationViewFactory.AddOperationView(type, contentType, viewModelData, otherData);
+        }
+
+        public void ClearView()
+        {
+            foreach (int contentViewId in Enum.GetValues(typeof(ContentViewType)))
+            {
+                contentViewDictionary[contentViewId]?.ResetViewModel();
+            }
         }
     }
 }
index f223cb573d2c99956f3d29713f25e03da5982545..f712e223cf10b65ce046c395d0bd46125ca918f0 100755 (executable)
@@ -7,6 +7,7 @@ using Tizen.NUI.BaseComponents;
 using MusicPlayer.Views.Utils;
 using MusicPlayer.Common;
 using MusicPlayer.Core;
+using Tizen.System;
 
 namespace MusicPlayer.Views
 {
@@ -38,6 +39,13 @@ namespace MusicPlayer.Views
                     UpdateTheme(e.PlatformThemeId);
                 }
             };
+            SystemSettings.LocaleLanguageChanged += LanguageChangedCallback;
+        }
+
+        private void LanguageChangedCallback(object sender, LocaleLanguageChangedEventArgs e)
+        {
+            Tizen.Log.Debug(AppConstants.LogTag, $"LocalChangedCallback : {e.Value}");
+            ResetBaseContentView();
         }
 
         private void SetTheme(string path)
@@ -115,7 +123,7 @@ namespace MusicPlayer.Views
         {
             baseView = new BaseView()
             {
-                Title = "Music",
+                Title = "IDS_MUSIC",
                 MoreButton = true,
                 SearchButton = true,
             };
@@ -157,7 +165,8 @@ namespace MusicPlayer.Views
         private void OnSubViewAdded(object sender, SubContentViewAddEventArgs subViewAddEventArgs)
         {
             BaseSubContentView baseSubContentView = viewLibrary.GetSubContentView(subViewAddEventArgs.SubViewType, subViewAddEventArgs.ViewModelData);
-            baseView.AddSubViewContent(subViewAddEventArgs.TitleText, baseSubContentView);
+            baseView.AddSubViewContent(baseSubContentView.GetTitleText(), baseSubContentView);
+            Tizen.Log.Debug(AppConstants.LogTag, $"Subview with title : {baseSubContentView.GetTitleText()} {subViewAddEventArgs.TitleText} added");
         }
 
         private void OnOperationViewAdded(object sender, OperationViewAddEventArgs e)
@@ -194,5 +203,28 @@ namespace MusicPlayer.Views
                 Tizen.Log.Error(AppConstants.LogTag, "Adding " + currentContentView?.Name);
             }
         }
+
+        private void ResetBaseContentView()
+        {
+            BaseContentView previousContentView = viewLibrary.GetContentView((ContentViewType)previousIndex);
+            baseView.RemoveContent(previousContentView);
+            previousContentView?.HideView();
+            if (previousContentView != null)
+            {
+                previousContentView.SubContentViewAdded -= OnSubViewAdded;
+                previousContentView.OperationViewAdded -= OnOperationViewAdded;
+            }
+            viewLibrary.ClearView();
+
+            BaseContentView currentContentView = viewLibrary.GetContentView((ContentViewType)previousIndex);
+            currentContentView?.ShowView();
+
+            baseView.SetContent(currentContentView);
+            if (currentContentView != null)
+            {
+                currentContentView.SubContentViewAdded += OnSubViewAdded;
+                currentContentView.OperationViewAdded += OnOperationViewAdded;
+            }
+        }
     }
 }
index e1521bc9f194a82a01cd0fa3d57e5a2b1f719300..c52f1f8e4a337147c8f1e515b214d870442f533a 100755 (executable)
@@ -33,7 +33,7 @@
 \r
   <ItemGroup>\r
     <EmbeddedResource Update="TextResources\Resources.resx">\r
-      <Generator>ResXFileCodeGenerator</Generator>\r
+      <Generator>PublicResXFileCodeGenerator</Generator>\r
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 7645f40b5b5aef5c0f27ec81c94c21ae287aa96b..3c1375296d0f38ea7a35c5b4a7f669b2ac9c35e2 100644 (file)
Binary files a/packaging/org.tizen.MusicPlayer-1.0.1.tpk and b/packaging/org.tizen.MusicPlayer-1.0.1.tpk differ