Browse Source

localizationConfig

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
1e422c4b3b

+ 4 - 0
iOSClient/Main/Create cloud/NCUploadAssets.swift

@@ -405,6 +405,10 @@ struct ImageCropper: UIViewControllerRepresentable {
 
     func makeUIViewController(context: Context) -> CropViewController {
         var config = Mantis.Config()
+        if let bundleIdentifier = Bundle.main.bundleIdentifier {
+            config.localizationConfig.bundle = Bundle(identifier: bundleIdentifier)
+            config.localizationConfig.tableName = "Localizable"
+        }
         config.cropViewConfig.cropShapeType = cropShapeType
         config.presetFixedRatioType = presetFixedRatioType
         let image = previewStore[index].image

+ 7 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -976,3 +976,10 @@
 "_already_plan_"                = "The selected plan has already been bought.";
 "_change_billing_"              = "Change Billing";
 "_payment_method_"              = "Payment Method";
+
+// MARK: Mantis library
+"Mantis.Done"                   = "Done";
+"Mantis.Cancel"                 = "Cancel";
+"Mantis.Reset"                  = "Reset";
+"Mantis.Original"               = "Original";
+"Mantis.Square"                 = "Square";