Jelajahi Sumber

NewUI: Update localized strings

Update strings to follow the localized strings architecture.
Soomin Lee 7 tahun lalu
induk
melakukan
c2b1e480dc

+ 7 - 2
Resources/en.lproj/Localizable.strings

@@ -301,9 +301,14 @@
 "NOT_SUPPORTED_FILETYPE" = "%@ is not a supported filetype by VLC";
 "FILE_EXISTS" = "%@ already exists";
 
-/* New strings */
 "PROTOCOL_NOT_SELECTED" = "Protocol not selected";
 "Settings" = "Settings";
 
-/* New strings */
 "FILE_NOT_SUPPORTED_LONG" = "FILE_NOT_SUPPORTED_LONG";
+
+"CANCEL" = "Cancel";
+"ERROR" = "Error";
+"OK" = "Ok";
+"SORT" = "Sort";
+"SORT_BY" = "Sort by";
+"VIDEO" = "Video";

+ 1 - 1
Sources/MediaViewController.swift

@@ -103,7 +103,7 @@ public class VLCMediaViewController: UICollectionViewController, UISearchResults
     }
 
     func setupNavigationBar() {
-        navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Sort", comment: ""), style: .plain, target: self, action: #selector(sort))
+        navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("SORT", comment: ""), style: .plain, target: self, action: #selector(sort))
     }
 
     @objc func sort() {

+ 6 - 6
Sources/VLCTabBarCoordinator.swift

@@ -60,9 +60,9 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC
         let videoVC = VLCMediaViewController(services: services)
         //this should probably not be the delegate
         videoVC.delegate = self
-        videoVC.title = NSLocalizedString("Video", comment: "")
+        videoVC.title = NSLocalizedString("VIDEO", comment: "")
         videoVC.tabBarItem = UITabBarItem(
-            title: NSLocalizedString("Video", comment: ""),
+            title: NSLocalizedString("VIDEO", comment: ""),
             image: UIImage(named: "TVShowsIcon"),
             selectedImage: UIImage(named: "TVShowsIcon"))
         videoVC.tabBarItem.accessibilityIdentifier = "Video"
@@ -71,9 +71,9 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC
         let audioVC = VLCMediaViewController(services: services)
         //this should probably not be the delegate
         audioVC.delegate = self
-        audioVC.title = NSLocalizedString("Audio", comment: "")
+        audioVC.title = NSLocalizedString("AUDIO", comment: "")
         audioVC.tabBarItem = UITabBarItem(
-            title: NSLocalizedString("Audio", comment: ""),
+            title: NSLocalizedString("AUDIO", comment: ""),
             image: UIImage(named: "MusicAlbums"),
             selectedImage:UIImage(named: "MusicAlbums"))
         audioVC.tabBarItem.accessibilityIdentifier = "Audio"
@@ -135,14 +135,14 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC
 
     func showSortOptions() {
         //This should be in a subclass
-        let sortOptionsAlertController = UIAlertController(title: NSLocalizedString("Sort by", comment: ""), message: nil, preferredStyle: .actionSheet)
+        let sortOptionsAlertController = UIAlertController(title: NSLocalizedString("SORT_BY", comment: ""), message: nil, preferredStyle: .actionSheet)
         let sortByNameAction = UIAlertAction(title: SortOption.alphabetically.localizedDescription, style: .default) { action in
         }
         let sortBySizeAction = UIAlertAction(title: SortOption.size.localizedDescription, style: .default) { action in
         }
         let sortbyDateAction = UIAlertAction(title: SortOption.insertonDate.localizedDescription, style: .default) { action in
         }
-        let cancelAction = UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: nil)
+        let cancelAction = UIAlertAction(title: NSLocalizedString("CANCEL", comment: ""), style: .cancel, handler: nil)
         sortOptionsAlertController.addAction(sortByNameAction)
         sortOptionsAlertController.addAction(sortbyDateAction)
         sortOptionsAlertController.addAction(sortBySizeAction)