alqindiirsyam 1 ano atrás
pai
commit
0211b1b1d7
17 arquivos alterados com 128 adições e 62 exclusões
  1. 6 2
      appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift
  2. 0 7
      appbuilder-ios/DigiXLite/DigiXLite/Resource/id.lproj/Localizable.strings
  3. 12 5
      appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorGroup.swift
  4. 12 5
      appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorPersonal.swift
  5. 12 5
      appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorStarMessages.swift
  6. 7 2
      appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/MessageInfo.swift
  7. 8 2
      appbuilder-ios/DigiXLite/DigiXLite/Source/View/Control/BackupRestoreView.swift
  8. 6 2
      appbuilder-ios/DigiXLite/DigiXLite/Source/View/Control/ContactChatViewController.swift
  9. 5 2
      appbuilder-ios/DigiXLite/DigiXLite/Source/View/Control/HistoryCCViewController.swift
  10. 0 7
      appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings
  11. 12 5
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift
  12. 12 5
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift
  13. 12 5
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift
  14. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/MessageInfo.swift
  15. 8 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BackupRestoreView.swift
  16. 6 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift
  17. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/HistoryCCViewController.swift

+ 6 - 2
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -1086,10 +1086,14 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
                     if day < 7 {
                         let formatter = DateFormatter()
                         formatter.dateFormat = "EEEE"
-                        timeView.text = formatter.string(from: date).localized()
+                        let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                        if lang == "id" {
+                            formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                        }
+                        timeView.text = formatter.string(from: date)
                     } else {
                         let formatter = DateFormatter()
-                        formatter.dateFormat = "MM/dd/yy"
+                        formatter.dateFormat = "M/dd/yy"
                         formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
                         let stringFormat = formatter.string(from: date as Date)
                         timeView.text = stringFormat

+ 0 - 7
appbuilder-ios/DigiXLite/DigiXLite/Resource/id.lproj/Localizable.strings

@@ -321,10 +321,3 @@
 "images" = "gambar";
 "Forward All" = "Teruskan Semua";
 "Delete All" = "Hapus Semua";
-"Monday" = "Senin";
-"Tuesday" = "Selasa";
-"Wednesday" = "Rabu";
-"Thursday" = "Kamis";
-"Friday" = "Jum'at";
-"Saturday" = "Sabtu";
-"Sunday" = "Minggu";

+ 12 - 5
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorGroup.swift

@@ -603,14 +603,21 @@ public class EditorGroup: UIViewController {
             } else if day < 7 {
                 let formatter = DateFormatter()
                 formatter.dateFormat = "EEEE"
-                if !dataDates.contains(formatter.string(from: date).localized()){
-                    dataDates.append(formatter.string(from: date).localized())
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
+                if !dataDates.contains(formatter.string(from: date)){
+                    dataDates.append(formatter.string(from: date))
                 }
-                return formatter.string(from: date).localized()
+                return formatter.string(from: date)
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd MMMM yyyy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 if !dataDates.contains(stringFormat){
                     dataDates.append(stringFormat)

+ 12 - 5
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorPersonal.swift

@@ -1123,14 +1123,21 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             } else if day < 7 {
                 let formatter = DateFormatter()
                 formatter.dateFormat = "EEEE"
-                if !dataDates.contains(formatter.string(from: date).localized()){
-                    dataDates.append(formatter.string(from: date).localized())
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
+                if !dataDates.contains(formatter.string(from: date)){
+                    dataDates.append(formatter.string(from: date))
                 }
-                return formatter.string(from: date).localized()
+                return formatter.string(from: date)
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd MMMM yyyy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 if !dataDates.contains(stringFormat){
                     dataDates.append(stringFormat)

+ 12 - 5
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorStarMessages.swift

@@ -1017,14 +1017,21 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
             } else if day < 7 {
                 let formatter = DateFormatter()
                 formatter.dateFormat = "EEEE"
-                if !dataDates.contains(formatter.string(from: date).localized()){
-                    dataDates.append(formatter.string(from: date).localized())
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
                 }
-                return formatter.string(from: date).localized()
+                if !dataDates.contains(formatter.string(from: date)){
+                    dataDates.append(formatter.string(from: date))
+                }
+                return formatter.string(from: date)
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd MMMM yyyy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 if !dataDates.contains(stringFormat){
                     dataDates.append(stringFormat)

+ 7 - 2
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/MessageInfo.swift

@@ -1031,10 +1031,15 @@ class MessageInfo: UIViewController, UITableViewDelegate, UITableViewDataSource
             let day = -(components.day!)
             if day == 1 {
                 return "Yesterday".localized()
+            } else if day < 7 {
+                return "\(day) " + "days".localized() + " " + "ago".localized()
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd/MM/yy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 return stringFormat
             }

+ 8 - 2
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Control/BackupRestoreView.swift

@@ -95,7 +95,10 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                         } else {
                             let formatter = DateFormatter()
                             formatter.dateFormat = "dd MMMM yyyy"
-                            formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                            if lang == "id" {
+                                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                            }
                             let stringFormat = formatter.string(from: date as Date)
                             dayLastBackup = stringFormat
                         }
@@ -910,7 +913,10 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                                         } else {
                                             let formatter = DateFormatter()
                                             formatter.dateFormat = "dd MMMM yyyy"
-                                            formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                                            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                                            if lang == "id" {
+                                                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                                            }
                                             let stringFormat = formatter.string(from: date as Date)
                                             dayLastBackup = stringFormat
                                         }

+ 6 - 2
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Control/ContactChatViewController.swift

@@ -1052,10 +1052,14 @@ extension ContactChatViewController {
                         if day < 7 {
                             let formatter = DateFormatter()
                             formatter.dateFormat = "EEEE"
-                            timeView.text = formatter.string(from: date).localized()
+                            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                            if lang == "id" {
+                                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                            }
+                            timeView.text = formatter.string(from: date)
                         } else {
                             let formatter = DateFormatter()
-                            formatter.dateFormat = "MM/dd/yy"
+                            formatter.dateFormat = "M/dd/yy"
                             formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
                             let stringFormat = formatter.string(from: date as Date)
                             timeView.text = stringFormat

+ 5 - 2
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Control/HistoryCCViewController.swift

@@ -197,8 +197,11 @@ public class HistoryCCViewController: UITableViewController, QLPreviewController
         let stringDate = data[sender.tag]["date_start"] as! String
         let date = Date(milliseconds: Int64(stringDate) ?? 0)
         let formatter = DateFormatter()
-        formatter.dateFormat = "dd MMMM yyyy HH:mm"
-        formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+        formatter.dateFormat = "dd MMMM yyyy"
+        let lang = UserDefaults.standard.string(forKey: "i18n_language")
+        if lang == "id" {
+            formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+        }
         var textPDF = """
         <html>
             <head>

+ 0 - 7
appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings

@@ -320,10 +320,3 @@
 "images" = "gambar";
 "Forward All" = "Teruskan Semua";
 "Delete All" = "Hapus Semua";
-"Monday" = "Senin";
-"Tuesday" = "Selasa";
-"Wednesday" = "Rabu";
-"Thursday" = "Kamis";
-"Friday" = "Jum'at";
-"Saturday" = "Sabtu";
-"Sunday" = "Minggu";

+ 12 - 5
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift

@@ -603,14 +603,21 @@ public class EditorGroup: UIViewController {
             } else if day < 7 {
                 let formatter = DateFormatter()
                 formatter.dateFormat = "EEEE"
-                if !dataDates.contains(formatter.string(from: date).localized()){
-                    dataDates.append(formatter.string(from: date).localized())
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
+                if !dataDates.contains(formatter.string(from: date)){
+                    dataDates.append(formatter.string(from: date))
                 }
-                return formatter.string(from: date).localized()
+                return formatter.string(from: date)
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd MMMM yyyy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 if !dataDates.contains(stringFormat){
                     dataDates.append(stringFormat)

+ 12 - 5
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -1123,14 +1123,21 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             } else if day < 7 {
                 let formatter = DateFormatter()
                 formatter.dateFormat = "EEEE"
-                if !dataDates.contains(formatter.string(from: date).localized()){
-                    dataDates.append(formatter.string(from: date).localized())
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
+                if !dataDates.contains(formatter.string(from: date)){
+                    dataDates.append(formatter.string(from: date))
                 }
-                return formatter.string(from: date).localized()
+                return formatter.string(from: date)
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd MMMM yyyy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 if !dataDates.contains(stringFormat){
                     dataDates.append(stringFormat)

+ 12 - 5
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift

@@ -1017,14 +1017,21 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
             } else if day < 7 {
                 let formatter = DateFormatter()
                 formatter.dateFormat = "EEEE"
-                if !dataDates.contains(formatter.string(from: date).localized()){
-                    dataDates.append(formatter.string(from: date).localized())
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
                 }
-                return formatter.string(from: date).localized()
+                if !dataDates.contains(formatter.string(from: date)){
+                    dataDates.append(formatter.string(from: date))
+                }
+                return formatter.string(from: date)
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd MMMM yyyy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 if !dataDates.contains(stringFormat){
                     dataDates.append(stringFormat)

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/MessageInfo.swift

@@ -1035,8 +1035,11 @@ class MessageInfo: UIViewController, UITableViewDelegate, UITableViewDataSource
                 return "\(day) " + "days".localized() + " " + "ago".localized()
             } else {
                 let formatter = DateFormatter()
-                formatter.dateFormat = "dd MMMM yyyy"
-                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                formatter.dateFormat = "EE, dd MMM"
+                let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                if lang == "id" {
+                    formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                }
                 let stringFormat = formatter.string(from: date as Date)
                 return stringFormat
             }

+ 8 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BackupRestoreView.swift

@@ -95,7 +95,10 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                         } else {
                             let formatter = DateFormatter()
                             formatter.dateFormat = "dd MMMM yyyy"
-                            formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                            if lang == "id" {
+                                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                            }
                             let stringFormat = formatter.string(from: date as Date)
                             dayLastBackup = stringFormat
                         }
@@ -910,7 +913,10 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                                         } else {
                                             let formatter = DateFormatter()
                                             formatter.dateFormat = "dd MMMM yyyy"
-                                            formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                                            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                                            if lang == "id" {
+                                                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                                            }
                                             let stringFormat = formatter.string(from: date as Date)
                                             dayLastBackup = stringFormat
                                         }

+ 6 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift

@@ -1051,10 +1051,14 @@ extension ContactChatViewController {
                         if day < 7 {
                             let formatter = DateFormatter()
                             formatter.dateFormat = "EEEE"
-                            timeView.text = formatter.string(from: date).localized()
+                            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+                            if lang == "id" {
+                                formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+                            }
+                            timeView.text = formatter.string(from: date)
                         } else {
                             let formatter = DateFormatter()
-                            formatter.dateFormat = "MM/dd/yy"
+                            formatter.dateFormat = "M/dd/yy"
                             formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
                             let stringFormat = formatter.string(from: date as Date)
                             timeView.text = stringFormat

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/HistoryCCViewController.swift

@@ -197,8 +197,11 @@ public class HistoryCCViewController: UITableViewController, QLPreviewController
         let stringDate = data[sender.tag]["date_start"] as! String
         let date = Date(milliseconds: Int64(stringDate) ?? 0)
         let formatter = DateFormatter()
-        formatter.dateFormat = "dd MMMM yyyy HH:mm"
-        formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+        formatter.dateFormat = "dd MMMM yyyy"
+        let lang = UserDefaults.standard.string(forKey: "i18n_language")
+        if lang == "id" {
+            formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
+        }
         var textPDF = """
         <html>
             <head>