Commit 01183e21 authored by jzhang's avatar jzhang

no message

parent a9ae7b9c
......@@ -15,7 +15,6 @@
692EC423284C8D6F0043E3EA /* spanish.json in Resources */ = {isa = PBXBuildFile; fileRef = 692EC41F284C8D6F0043E3EA /* spanish.json */; };
694B85BC2848EB4C009BEDE1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 694B85BB2848EB4C009BEDE1 /* AppDelegate.swift */; };
694B85BE2848EB4C009BEDE1 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 694B85BD2848EB4C009BEDE1 /* SceneDelegate.swift */; };
694B85C02848EB4C009BEDE1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 694B85BF2848EB4C009BEDE1 /* ViewController.swift */; };
694B85C32848EB4C009BEDE1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 694B85C12848EB4C009BEDE1 /* Main.storyboard */; };
694B85C52848EB4E009BEDE1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 694B85C42848EB4E009BEDE1 /* Assets.xcassets */; };
694B85C82848EB4E009BEDE1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 694B85C62848EB4E009BEDE1 /* LaunchScreen.storyboard */; };
......@@ -59,6 +58,7 @@
EA8F430528EF3DCA00983014 /* ZJTableViewManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA8F42F728EF3DCA00983014 /* ZJTableViewManager.swift */; };
EA8F430628EF3DCA00983014 /* ZJExpandTreeCellItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA8F42F928EF3DCA00983014 /* ZJExpandTreeCellItem.swift */; };
EA8F430828EF3DCA00983014 /* Popover.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA8F42FD28EF3DCA00983014 /* Popover.swift */; };
EAB6F1C228F0449E0005FF33 /* BaseLandingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB6F1C128F0449E0005FF33 /* BaseLandingVC.swift */; };
EAD8102728E207A4002A86C9 /* MyTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD8102628E207A4002A86C9 /* MyTools.swift */; };
EAD8102D28E20A54002A86C9 /* PermissionAlertVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD8102C28E20A54002A86C9 /* PermissionAlertVC.swift */; };
/* End PBXBuildFile section */
......@@ -95,7 +95,6 @@
694B85B82848EB4C009BEDE1 /* BreastFeedingDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BreastFeedingDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
694B85BB2848EB4C009BEDE1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
694B85BD2848EB4C009BEDE1 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
694B85BF2848EB4C009BEDE1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
694B85C22848EB4C009BEDE1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
694B85C42848EB4E009BEDE1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
694B85C72848EB4E009BEDE1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
......@@ -131,6 +130,7 @@
EA8F42F728EF3DCA00983014 /* ZJTableViewManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZJTableViewManager.swift; sourceTree = "<group>"; };
EA8F42F928EF3DCA00983014 /* ZJExpandTreeCellItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZJExpandTreeCellItem.swift; sourceTree = "<group>"; };
EA8F42FD28EF3DCA00983014 /* Popover.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Popover.swift; sourceTree = "<group>"; };
EAB6F1C128F0449E0005FF33 /* BaseLandingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseLandingVC.swift; sourceTree = "<group>"; };
EAD8102628E207A4002A86C9 /* MyTools.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyTools.swift; sourceTree = "<group>"; };
EAD8102C28E20A54002A86C9 /* PermissionAlertVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionAlertVC.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
......@@ -193,7 +193,6 @@
EAFC261B28E2144600F802FE /* ViewController */,
694B85BB2848EB4C009BEDE1 /* AppDelegate.swift */,
694B85BD2848EB4C009BEDE1 /* SceneDelegate.swift */,
694B85BF2848EB4C009BEDE1 /* ViewController.swift */,
692EC419284C81700043E3EA /* ViewModel.swift */,
EA14360628E0CA3100FFBE72 /* LanguageCell.swift */,
EA14360728E0CA3100FFBE72 /* LanguageCell.xib */,
......@@ -317,6 +316,7 @@
children = (
EA14360428E0BF1900FFBE72 /* DemoViewController.swift */,
EA8F42CE28EEA85200983014 /* CradleHoldLandingVC.swift */,
EAB6F1C128F0449E0005FF33 /* BaseLandingVC.swift */,
EA8F42D028EEA87A00983014 /* SideLyingLandingVC.swift */,
EAD8102C28E20A54002A86C9 /* PermissionAlertVC.swift */,
697B07EC284F2E5C0051FC23 /* CompleteVC.swift */,
......@@ -406,7 +406,6 @@
EA8F430628EF3DCA00983014 /* ZJExpandTreeCellItem.swift in Sources */,
EA8F42C528EE998000983014 /* StringModel.swift in Sources */,
EA8F430428EF3DCA00983014 /* ZJTableViewItem.swift in Sources */,
694B85C02848EB4C009BEDE1 /* ViewController.swift in Sources */,
EA8F42D128EEA87A00983014 /* SideLyingLandingVC.swift in Sources */,
694B85BC2848EB4C009BEDE1 /* AppDelegate.swift in Sources */,
EA8F42C328EE998000983014 /* StringLyingGestureIntroduce.swift in Sources */,
......@@ -416,6 +415,7 @@
EA8F430128EF3DCA00983014 /* ZJDefaultCell.swift in Sources */,
EA8F42CF28EEA85200983014 /* CradleHoldLandingVC.swift in Sources */,
EA14360528E0BF1900FFBE72 /* DemoViewController.swift in Sources */,
EAB6F1C228F0449E0005FF33 /* BaseLandingVC.swift in Sources */,
692EC41A284C81700043E3EA /* ViewModel.swift in Sources */,
EA8F430528EF3DCA00983014 /* ZJTableViewManager.swift in Sources */,
EA8F430828EF3DCA00983014 /* Popover.swift in Sources */,
......@@ -484,6 +484,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
......@@ -544,6 +545,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
......
......@@ -892,6 +892,7 @@
</state>
<connections>
<action selector="okAction:" destination="kbc-T2-Z4j" eventType="touchUpInside" id="ukf-Bw-3lq"/>
<action selector="startAction:" destination="2ZC-tX-YAa" eventType="touchUpInside" id="20l-lQ-8mF"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a0G-Ge-cAP">
......@@ -1182,6 +1183,7 @@
</state>
<connections>
<action selector="okAction:" destination="kbc-T2-Z4j" eventType="touchUpInside" id="fHv-G0-4fD"/>
<action selector="startAction:" destination="ny1-NH-dmJ" eventType="touchUpInside" id="gjm-mt-6yv"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mpe-0M-8jL">
......
//
// ViewController.swift
// BreastFeedingDemo
//
// Created by Jay Zhang on 2022/6/2.
//
import AVFoundation
import Flutter
import UIKit
class ViewController: UIViewController {
@IBOutlet var titleL: UILabel!
@IBOutlet var stepL1: UILabel!
@IBOutlet var stepL2: UILabel!
@IBOutlet var stepL3: UILabel!
@IBOutlet var startBtn: UIButton!
@IBOutlet var panelV: UIStackView!
@IBOutlet var popupView: UIView!
@IBOutlet var switchBtn: UIButton!
@IBOutlet var permisionPopupV: UIView!
@IBOutlet var permissionTitle: UILabel!
@IBOutlet var permissionText: UILabel!
@IBOutlet var permissionOKBtn: UIButton!
@IBOutlet var permissionPanel: UIView!
var methodChannel: FlutterMethodChannel?
lazy var vm: ViewModel = .init()
var isFirstLoad: Bool = true
fileprivate func updateUI() {
// titleL.text = vm.landingPageTitle
// stepL1.text = vm.landingPageStep1
// stepL2.text = vm.landingPageStep2
// stepL3.text = vm.landingPageStep3
//
// permissionText.text = vm.cameraText1
// permissionTitle.text = vm.cameraText
// permissionOKBtn.setTitle(vm.cameraButtonText, for: .normal)
// startBtn.setTitle(vm.landingPageStart, for: .normal)
panelV.layer.cornerRadius = 8
permissionPanel.layer.cornerRadius = 8
permissionPanel.clipsToBounds = true
panelV.clipsToBounds = true
}
override func viewDidLoad() {
super.viewDidLoad()
overrideUserInterfaceStyle = .light
UIApplication.shared.isIdleTimerDisabled = true
navigationController?.setNavigationBarHidden(true, animated: false)
updateUI()
popupView.isHidden = true
if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine {
methodChannel = FlutterMethodChannel(name: "com.wmdigit.breastcoachai.native",
binaryMessenger: flutterEngine.binaryMessenger)
methodChannel?.setMethodCallHandler { [weak self]
(call: FlutterMethodCall, result: @escaping FlutterResult) in
if let strongSelf = self {
switch call.method {
case "init":
result(strongSelf.vm.flutterArguments)
case "teachingEnd":
strongSelf.methodChannel?.invokeMethod("dispose", arguments: nil)
// ["totalDuration": 3, "reasonText": Concern about my personal privacy, "status": incomplete, "incompleteReasonCode": 2]
let argument: [String: Any] = try! JSONSerialization.jsonObject(with: (call.arguments as! String).data(using: .utf8)!) as! [String: Any]
// let totalDuration: Int = argument["totalDuration"] as! Int
// let reasonText: String = argument["reasonText"] as! String
// let incompleteReasonCode: Int = argument["incompleteReasonCode"] as! Int
let status: String = argument["status"] as! String
if status == "incomplete" {
// strongSelf.showError(reasonText)
} else if status == "complete" {
strongSelf.toCompleteVC()
return
}
strongSelf.navigationController?.popViewController(animated: true)
default:
// Unrecognized method name
print("Unrecognized method name: \(call.method)")
}
}
}
}
}
func checkCameraPermission() -> Bool? {
let cameraAuthorizationStatus = AVCaptureDevice.authorizationStatus(for: .video)
switch cameraAuthorizationStatus {
case .notDetermined:
return nil
case .authorized:
return true
default:
permisionPopupV.isHidden = false
return false
}
}
func showError(_ text: String?) {
let alertVC = UIAlertController(title: text, message: nil, preferredStyle: .alert)
alertVC.addAction(UIAlertAction(title: "OK", style: .cancel))
navigationController?.pushViewController(alertVC, animated: true)
}
func toCompleteVC() {
let sb = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "CompleteVC") as! CompleteVC
// vc.vm = vm
navigationController?.pushViewController(vc, animated: true)
}
@IBAction func toSetting(_: Any) {
if let appSettingsURL = URL(string: UIApplication.openSettingsURLString) {
UIApplication.shared.open(appSettingsURL)
}
}
@IBAction func tapStart(_: Any) {
if checkCameraPermission() == false {
return
}
if !isFirstLoad {
methodChannel?.invokeMethod("reload", arguments: nil)
}
isFirstLoad = false
if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine {
let scanVC = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)
scanVC.modalPresentationStyle = .overFullScreen
navigationController?.pushViewController(scanVC, animated: true)
}
}
/// 选择语言
@IBAction func showPanel(_ sender: UIButton) {
sender.isSelected = !sender.isSelected
popupView.isHidden = !sender.isSelected
//
(panelV.viewWithTag(1000) as! UIButton).isSelected = false
(panelV.viewWithTag(1001) as! UIButton).isSelected = false
(panelV.viewWithTag(1002) as! UIButton).isSelected = false
// switch vm.language {
// case .english:
// (panelV.viewWithTag(1000) as! UIButton).isSelected = true
// case .français:
// (panelV.viewWithTag(1001) as! UIButton).isSelected = true
// case .español:
// (panelV.viewWithTag(1002) as! UIButton).isSelected = true
// }
}
@IBAction func dismissPermissimPanel(_: Any) {
permisionPopupV.isHidden = true
}
// @IBAction func selectLanguage(_ sender: UIButton) {
// switch sender.tag {
// case 1000:
// vm.language = .english
// case 1001:
// vm.language = .français
// case 1002:
// vm.language = .español
// default:
// break
// }
//
// switchBtn.isSelected = false
// popupView.isHidden = true
//
// updateUI()
// }
}
//
// BaseLandingVC.swift
// BreastFeedingDemo
//
// Created by Jie Zhang on 2022/10/7.
//
import AVFoundation
import Flutter
import UIKit
class BaseLandingVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
viewModel.teachingEndHandler = { [weak self] in
self?.navigationController?.popViewController(animated: true)
}
viewModel.completeHandler = { [weak self] in
self?.toCompleteVC()
}
// Do any additional setup after loading the view.
}
/// 检查权限
/// - Returns: 是否有相机权限
func checkCameraPermission() -> Bool? {
let cameraAuthorizationStatus = AVCaptureDevice.authorizationStatus(for: .video)
switch cameraAuthorizationStatus {
case .notDetermined:
return nil
case .authorized:
return true
default:
showPermissionChalenge()
return false
}
}
/// 提示权限问题
func showPermissionChalenge() {
let sb = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "PermissionAlertVC") as! PermissionAlertVC
vc.modalPresentationStyle = .overCurrentContext
present(vc, animated: true)
}
func toCompleteVC() {
let sb = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "CompleteVC") as! CompleteVC
navigationController?.pushViewController(vc, animated: true)
}
func showFlutterScreen() {
if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine {
let scanVC = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)
scanVC.modalPresentationStyle = .overFullScreen
navigationController?.pushViewController(scanVC, animated: true)
}
}
@IBAction func startAction(_: Any) {
if checkCameraPermission() == false {
return
}
if !viewModel.isFirstLoad {
viewModel.methodChannel?.invokeMethod("reload", arguments: nil)
}
viewModel.isFirstLoad = false
showFlutterScreen()
}
}
......@@ -7,7 +7,7 @@
import UIKit
class CradleHoldLandingVC: UIViewController {
class CradleHoldLandingVC: BaseLandingVC {
@IBOutlet weak var titleL: UILabel!
@IBOutlet weak var subtitleL: UILabel!
......@@ -22,7 +22,7 @@ class CradleHoldLandingVC: UIViewController {
super.viewDidLoad()
setupUI()
}
@IBAction func back(_ sender: Any) {
navigationController?.popViewController(animated: true)
}
......@@ -34,7 +34,7 @@ class CradleHoldLandingVC: UIViewController {
text2L.text = getString().sittingGestureIntroduce.suggestedText2
text3L.text = getString().sittingGestureIntroduce.suggestedText3
text4L.text = getString().sittingGestureIntroduce.suggestedText4
startBtn.setTitle(getString().homeButtonText, for: .normal)
}
}
......@@ -7,9 +7,7 @@
import AVFoundation
import Flutter
//import Popover
import UIKit
//import ZJTableViewManager
class DemoViewController: UIViewController {
fileprivate var popover: Popover!
......@@ -26,8 +24,6 @@ class DemoViewController: UIViewController {
@IBOutlet weak var lyingTitleL: UILabel!
@IBOutlet weak var lyingSubtitleL: UILabel!
@IBOutlet weak var topConstraint: NSLayoutConstraint!
var methodChannel: FlutterMethodChannel?
var isFirstLoad: Bool = true
override func viewDidLoad() {
super.viewDidLoad()
......@@ -37,7 +33,6 @@ class DemoViewController: UIViewController {
scrollView.automaticallyAdjustsScrollIndicatorInsets = false
scrollView.contentInsetAdjustmentBehavior = .never
updateUI()
flutterInitialize()
}
override func viewDidAppear(_ animated: Bool) {
......@@ -64,71 +59,6 @@ class DemoViewController: UIViewController {
updateUI()
}
/// 提示权限问题
fileprivate func showPermissionChalenge() {
let sb = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "PermissionAlertVC") as! PermissionAlertVC
vc.modalPresentationStyle = .overCurrentContext
present(vc, animated: true)
}
/// 检查权限
/// - Returns: 是否有相机权限
fileprivate func checkCameraPermission() -> Bool? {
let cameraAuthorizationStatus = AVCaptureDevice.authorizationStatus(for: .video)
switch cameraAuthorizationStatus {
case .notDetermined:
return nil
case .authorized:
return true
default:
showPermissionChalenge()
return false
}
}
fileprivate func flutterInitialize() {
if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine {
methodChannel = FlutterMethodChannel(name: "com.wmdigit.breastcoachai.native",
binaryMessenger: flutterEngine.binaryMessenger)
methodChannel?.setMethodCallHandler { [weak self]
(call: FlutterMethodCall, result: @escaping FlutterResult) in
if let strongSelf = self {
switch call.method {
case "init":
result(viewModel.flutterArguments)
case "teachingEnd":
strongSelf.methodChannel?.invokeMethod("dispose", arguments: nil)
// ["totalDuration": 3, "reasonText": Concern about my personal privacy, "status": incomplete, "incompleteReasonCode": 2]
let argument: [String: Any] = try! JSONSerialization.jsonObject(with: (call.arguments as! String).data(using: .utf8)!) as! [String: Any]
// let totalDuration: Int = argument["totalDuration"] as! Int
// let reasonText: String = argument["reasonText"] as! String
// let incompleteReasonCode: Int = argument["incompleteReasonCode"] as! Int
let status: String = argument["status"] as! String
if status == "incomplete" {
// strongSelf.showError(reasonText)
} else if status == "complete" {
strongSelf.toCompleteVC()
return
}
strongSelf.navigationController?.popViewController(animated: true)
default:
// Unrecognized method name
print("Unrecognized method name: \(call.method)")
}
}
}
}
}
func toCompleteVC() {
let sb = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "CompleteVC") as! CompleteVC
navigationController?.pushViewController(vc, animated: true)
}
func toSideLyingLandingVC() {
let sb = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "SideLyingLandingVC") as! SideLyingLandingVC
......@@ -142,35 +72,14 @@ class DemoViewController: UIViewController {
}
@IBAction func sideLyingAction(_ sender: Any) {
if checkCameraPermission() == false {
return
}
if !isFirstLoad {
methodChannel?.invokeMethod("reload", arguments: nil)
}
isFirstLoad = false
viewModel.posture = .lying
toSideLyingLandingVC()
}
@IBAction func cradleHold(_: Any) {
if checkCameraPermission() == false {
return
}
if !isFirstLoad {
methodChannel?.invokeMethod("reload", arguments: nil)
}
isFirstLoad = false
viewModel.posture = .cradle
toCradleHoldLandingVC()
// if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine {
// let scanVC = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)
// scanVC.modalPresentationStyle = .overFullScreen
// navigationController?.pushViewController(scanVC, animated: true)
// }
}
}
......
......@@ -7,7 +7,7 @@
import UIKit
class SideLyingLandingVC: UIViewController {
class SideLyingLandingVC: BaseLandingVC {
@IBOutlet weak var titleL: UILabel!
@IBOutlet weak var subtitleL: UILabel!
......@@ -28,6 +28,7 @@ class SideLyingLandingVC: UIViewController {
@IBAction func back(_ sender: Any) {
navigationController?.popViewController(animated: true)
}
fileprivate func setupUI() {
titleL.text = getString().lyingGestureIntroduce.title
subtitleL.text = getString().lyingGestureIntroduce.subTitle
......
......@@ -6,8 +6,13 @@
//
import Foundation
import Flutter
class ViewModel {
enum Posture: Int {
case cradle = 0
case lying = 1
}
/// 语言枚举,enum代表语言包文件名,rawValue代表语言选项
enum Language: String, CaseIterable {
case english = "English"
......@@ -24,8 +29,11 @@ class ViewModel {
setupText()
}
}
var posture: Posture = .cradle
var string: StringModel!
var isFirstLoad: Bool = true
var languagePack: [String: Any] {
let languageFile = "\(language)".appending(".json")
......@@ -38,6 +46,7 @@ class ViewModel {
var flutterArguments: String {
let arguments: [String: Any] = [
"lying": posture.rawValue,
"languagePack": languagePack,
"env": env,
"apiKey": apiKey,
......@@ -48,10 +57,48 @@ class ViewModel {
let str = String(data: data!, encoding: String.Encoding.utf8)
return str!
}
var methodChannel: FlutterMethodChannel!
var completeHandler: (()->())?
var teachingEndHandler: (()->())?
init() {
language = .english
setupText()
methodChannel = setupFlutter()
}
func setupFlutter() -> FlutterMethodChannel {
let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine
let methodChannel = FlutterMethodChannel(name: "com.wmdigit.breastcoachai.native",
binaryMessenger: flutterEngine!.binaryMessenger)
methodChannel.setMethodCallHandler { [weak self]
(call: FlutterMethodCall, result: @escaping FlutterResult) in
if let strongSelf = self {
switch call.method {
case "init":
result(viewModel.flutterArguments)
case "teachingEnd":
strongSelf.methodChannel.invokeMethod("dispose", arguments: nil)
// ["totalDuration": 3, "reasonText": Concern about my personal privacy, "status": incomplete, "incompleteReasonCode": 2]
let argument: [String: Any] = try! JSONSerialization.jsonObject(with: (call.arguments as! String).data(using: .utf8)!) as! [String: Any]
let status: String = argument["status"] as! String
if status == "incomplete" {
// strongSelf.showError(reasonText)
} else if status == "complete" {
strongSelf.completeHandler?()
// strongSelf.toCompleteVC()
return
}
strongSelf.teachingEndHandler?()
default:
// Unrecognized method name
print("Unrecognized method name: \(call.method)")
}
}
}
return methodChannel
}
fileprivate func setupText() {
......
{
"tipsString": {
"initInitial": "Please adjust your posture",
"sittingUnrecognition":
"No baby detected. Please follow the on-screen instructions",
"sittingBabyneckloc": "Make sure baby's neck is on your elbow",
"sittingBabyhead": "Do not restrict baby's head with your hands",
"sittingBabybackloc":
"Make sure your forearm is supporting baby's back",
"sittingUpleft": "Raise your left arm",
"sittingUpright": "Raise your right arm",
"sittingDownleft": "Lower your left arm",
"sittingDownright": "Lower your right arm",
"sittingHeadupassdown":
"Keep baby's head in higher position than the rest of the body",
"sittingBabystright":
"Keep baby's ear, shoulder and butt at the same level",
"sittingBabyheadloc":
"Make sure baby is facing the breast at proper height",
"nobabysittingBabyneckloc":
"During actual breastfeeding, make sure baby's neck is on your elbow",
"nobabysittingHeadupassdown":
"During actual breastfeeding, keep baby's head in higher position than the rest of the body",
"nobabysittingBabystright":
"During actual breastfeeding, keep baby's ear, shoulder and butt at the same level",
"sittingSuggest": [
"tipsString": {
"initInitial": "Please adjust your posture",
"sittingUnrecognition": "No baby detected. Please follow the on-screen instructions",
"sittingBabyneckloc": "Make sure baby's neck is on your elbow",
"sittingBabyhead": "Do not restrict baby's head with your hands",
"sittingBabybackloc": "Make sure your forearm is supporting baby's back",
"sittingUpleft": "Raise your left arm",
"sittingUpright": "Raise your right arm",
"sittingDownleft": "Lower your left arm",
"sittingDownright": "Lower your right arm",
"sittingHeadupassdown": "Keep baby's head in higher position than the rest of the body",
"sittingBabystright": "Keep baby's ear, shoulder and butt at the same level",
"sittingBabyheadloc": "Make sure baby is facing the breast at proper height",
"nobabysittingBabyneckloc": "During actual breastfeeding, make sure baby's neck is on your elbow",
"nobabysittingHeadupassdown": "During actual breastfeeding, keep baby's head in higher position than the rest of the body",
"nobabysittingBabystright": "During actual breastfeeding, keep baby's ear, shoulder and butt at the same level",
"lyingUnrecognition": "No baby detected. Please follow the on-screen instructions",
"lyingKeepadpos": "Please face the baby",
"lyingKeeplying": "Please lie on your side properly. Do not support your head only with your arms",
"lyingBabyhead": "Do not restrict baby's head with your hands",
"lyingNobabyback": "Use your arms to support the baby's back and make sure that the chest and abdomen are close to you",
"lyingBabystright": "Keep baby's ear, shoulder and butt at the same level",
"lyingBabyheadloc": "Make sure baby is facing the breast at proper height",
"nobabylyingBabyheadloc": "During actual breastfeeding, make sure baby is facing the breast properly",
"nobabylyingBabystright": "During actual breastfeeding, keep baby's ear, shoulder and butt at the same level",
"sittingSuggest": [
"Adjust to a comfortable posture, and keep baby very close to you at all times",
"Make sure baby is latched properly (mouth should fully cover the nipple and areola)",
"Keep baby's chin close to your breast, and mouth fully covering the nipple and areola",
......@@ -32,78 +32,96 @@
"Relax your shoulder",
"There should be support to your hand, waist and feet when holding baby",
"Keep relaxed until the end of session"
]
},
"commonmemsg": {
"initialMassage":
"Keep one meter away from the camera, and fit your body into the guide line. Session starts in 5 seconds…",
"slogan": ""
},
"sittingMsg": {
"babyneckloc": "Make sure baby's neck is on your elbow",
"babyhead": "Do not restrict baby's head with your hands",
"babybackloc": "Make sure your forearm is supporting baby's back",
"upleft": "Raise your left arm",
"upright": "Raise your right arm",
"downleft": "Lower your left arm",
"downright": "Lower your right arm",
"headupassdown":
"Keep baby's head in higher position than the rest of the body",
"babystright": "Keep baby's ear, shoulder and butt at the same level",
"babyheadloc": "Make sure baby is facing the breast at proper height"
},
"sittingMsgPart": {
"babyneckloc": "Make sure baby's neck is on your elbow",
"babyhead": "Do not restrict baby's head with your hands",
"babybackloc": "Make sure your forearm is supporting baby's back",
"headupassdown":
"Keep baby's head in higher position than the rest of the body",
"babystright": "Keep baby's ear, shoulder and butt at the same level",
"babyheadloc": "Make sure baby is facing the breast at proper height"
},
"successmsg": {
"recordMessage":
"You may start breastfeeding now! Timer starts in 3 seconds…",
"nobabyRecord":
"You have learned the correct posture. You may try this AI coach with your baby next time",
"suggest": "Tap top right icon to view more info",
"posSuccess": "Your posture is correct. Please keep it going"
},
"strings": {
"suggestTitle": "During actual breastfeeding:",
"suggestText1":
"Adjust to a comfortable posture, and keep baby very close to you at all times",
"suggestText2":
"Make sure baby is latched properly (mouth should fully cover the nipple and areola); keep baby's chin close to your breast, and mouth fully covering the nipple and areola",
"suggestText3":
"There should be support to your hand, waist and feet when holding baby",
"suggestText4": "Keep relaxed until the end of session",
"suggestConfirmText": "OK",
"discardReasonTitle": "Reasons to give up?",
"discardReason1": "Not sure how to use it",
"discardReason2": "Concern about my personal privacy",
"discardReason3": "Do not think it is helpful",
"mainTipsText":
"Your images and videos will only be used for AI coach recognition. They will not be stored.",
"guidance": "Tips",
"briefSummaryTitleFront":
"Congratulations! You have completed the session in ",
"briefSummaryTitleAfter": " seconds",
"sitMainPointsText1":
"Keep baby's head in higher position so you can see baby's face",
"sitMainPointsText2": "Keep baby very close to you",
"sitMainPointsText3":
"Keep baby's neck on your elbow, and do not restrict baby's head with your hand",
"sitMainPointsText4":
"Keep baby's ear, shoulder and butt at the same level",
"sitMainPointsConfirmText": "OK",
"momLeft":
"No person detected. The finish page will be shown after 5 seconds",
"successStatusTips":
"Correct! Please keep the posture for about 20 seconds",
"errorTitle": "Error",
"keyErrorText": "Key Forbidden",
"originErrorText": "Not allowed by CORS",
"noCameraErrorText": "Camera not detected",
}
}
],
"lyingSuggest": [
"Always pay attention to ensure baby can breath smoothly",
"Do not squeeze the breast. Make the baby's butt closer to the your abdomen",
"Make sure baby is latched properly (mouth should fully cover the nipple and areola)",
"Keep baby's chin close to your breast, and mouth fully covering the nipple and areola",
"Tap top right icon to view more info",
"You may use cushion to support your head, but it should not be too thick",
"You may use cushion to support your waist or put it between your legs to rest and relax",
"Keep relaxed until the end of session"
]
},
"commonmemsg": {
"initialMassage": "Keep one meter away from the camera, and fit your body into the guide line. Session starts in 5 seconds…",
"slogan": ""
},
"sittingMsg": {
"babyneckloc": "Make sure baby's neck is on your elbow",
"babyhead": "Do not restrict baby's head with your hands",
"babybackloc": "Make sure your forearm is supporting baby's back",
"upleft": "Raise your left arm",
"upright": "Raise your right arm",
"downleft": "Lower your left arm",
"downright": "Lower your right arm",
"headupassdown": "Keep baby's head in higher position than the rest of the body",
"babystright": "Keep baby's ear, shoulder and butt at the same level",
"babyheadloc": "Make sure baby is facing the breast at proper height"
},
"sittingMsgPart": {
"babyneckloc": "Make sure baby's neck is on your elbow",
"babyhead": "Do not restrict baby's head with your hands",
"babybackloc": "Make sure your forearm is supporting baby's back",
"headupassdown": "Keep baby's head in higher position than the rest of the body",
"babystright": "Keep baby's ear, shoulder and butt at the same level",
"babyheadloc": "Make sure baby is facing the breast at proper height"
},
"lyingMsg": {
"keepadpos": "Please face the baby",
"keeplying": "Please lie straight",
"babyhead": "Do not restrict baby's head with your hands",
"nobabyback": "Use your arms to support the baby's back and make sure that the chest and abdomen are close to you",
"babystright": "Keep baby's ear, shoulder and butt at the same level",
"babyheadloc": "Make sure baby is facing the breast at proper height"
},
"lyingMsgPart": {
"babyhead": "Do not restrict baby's head with your hands",
"nobabyback": "Use your arms to support the baby's back and make sure that the chest and abdomen are close to you",
"babystright": "Keep baby's ear, shoulder and butt at the same level",
"babyheadloc": "Make sure baby is facing the breast at proper height"
},
"successmsg": {
"recordMessage": "You may start breastfeeding now! Timer starts in 3 seconds…",
"nobabyRecord": "You have learned the correct posture. You may try this AI coach with your baby next time",
"suggest": "Tap top right icon to view more info",
"posSuccess": "Your posture is correct. Please keep it going"
},
"strings": {
"suggestTitle": "\"During actual breastfeeding\":",
"suggestText1": "Adjust to a comfortable posture, and keep baby very close to you at all times",
"suggestText2": "Make sure baby is latched properly (mouth should fully cover the nipple and areola); keep baby's chin close to your breast, and mouth fully covering the nipple and areola",
"suggestText3": "There should be support to your hand, waist and feet when holding baby",
"suggestText4": "Keep relaxed until the end of session",
"lyingSuggestText1": "1. During breastfeeding, always pay attention to your baby's breath. Do not squeeze the breast. Make the baby's butt closer to the your abdomen, and leave some space between your breast and your baby's nose.",
"lyingSuggestText2": "2. You may use cushion to support your head, but it should not be too thick. You may use cushion to support your waist or put it between your legs to rest and relax.",
"suggestConfirmText": "OK",
"discardReasonTitle": "Reasons to give up?",
"discardReason1": "Not sure how to use it",
"discardReason2": "Concern about my personal privacy",
"discardReason3": "Do not think it is helpful",
"mainTipsText": "Your images and videos will only be used for AI coach recognition. They will not be stored.",
"guidance": "Tips",
"briefSummaryTitleFront": "Congratulations! You have completed the session in ",
"briefSummaryTitleAfter": " seconds",
"sitMainPointsText1": "Keep baby's head in higher position so you can see baby's face",
"sitMainPointsText2": "Keep baby very close to you",
"sitMainPointsText3": "Keep baby's neck on your elbow, and do not restrict baby's head with your hand",
"sitMainPointsText4": "Keep baby's ear, shoulder and butt at the same level",
"sitMainPointsLyingText1": "Keep baby's head in higher position so you can see baby's face",
"sitMainPointsLyingText2": "You and the baby should be close to each other",
"sitMainPointsLyingText3": "Keep baby's ear, shoulder and butt at the same level",
"sitMainPointsLyingText4": "You may use one hand to support the baby's back, and the other hand to rest under the your head",
"sitMainPointsLyingText5": "Always pay attention to your baby's breath. Do not squeeze the breast. Make the baby's butt closer to the your abdomen, and leave some space between your breast and your baby's nose.",
"sitMainPointsConfirmText": "OK",
"momLeft": "No person detected. The finish page will be shown after 5 seconds",
"successStatusTips": "Correct! Please keep the posture for about 20 seconds",
"errorTitle": "Error",
"keyErrorText": "Key Forbidden",
"originErrorText": "Not allowed by CORS",
"noCameraErrorText": "Camera not detected"
}
}
{
"tipsString": {
"initInitial": "Veuillez ajuster votre posture",
"sittingUnrecognition":
"Aucun bébé détecté. Veuillez suivre les instructions à l'écran",
"sittingBabyneckloc":
"Assurez-vous que le cou de bébé est sur votre coude",
"sittingBabyhead": "Ne limitez pas la tête de bébé avec vos mains",
"sittingBabybackloc":
"Assurez-vous que votre avant-bras soutient le dos de bébé",
"sittingUpleft": "Levez votre bras gauche",
"sittingUpright": "Levez votre bras droit",
"sittingDownleft": "Abaissez votre bras gauche",
"sittingDownright": "Abaissez votre bras droit",
"sittingHeadupassdown":
"Gardez la tête de bébé en position plus haute que le reste du corps",
"sittingBabystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"sittingBabyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur",
"nobabysittingBabyneckloc":
"Pendant l'allaitement, assurez-vous que le cou du bébé est sur votre coude",
"nobabysittingHeadupassdown":
"Pendant l'allaitement, gardez la tête de bébé en position plus haute que le reste du corps",
"nobabysittingBabystright":
"Pendant l'allaitement, gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"sittingSuggest": [
"Ajustez-vous à une posture confortable et gardez bébé très près de vous à tout moment",
"Assurez-vous que le bébé prend correctement le sein (la bouche doit couvrir entièrement le mamelon et l'aréole)",
"Gardez le menton de bébé près de votre sein, sa bouche couvrant entièrement le mamelon et l'aréole",
"Appuyez sur l'icône en haut à droite pour afficher plus d'informations",
"Détendez votre épaule",
"Votre main, votre taille et vos pieds doivent être soutenus lorsque vous tenez bébé",
"Restez détendu jusqu'à la fin de la séance"
]
},
"commonmemsg": {
"initialMassage":
"Tenez-vous à un mètre de la caméra et placez votre corps dans la ligne de guidage. La session démarre dans 5 secondes…"
},
"sittingMsg": {
"babyneckloc": "Assurez-vous que le cou de bébé est sur votre coude",
"babyhead": "Ne limitez pas la tête de bébé avec vos mains",
"babybackloc":
"Assurez-vous que votre avant-bras soutient le dos de bébé",
"upleft": "Levez votre bras gauche",
"upright": "Levez votre bras droit",
"downleft": "Abaissez votre bras gauche",
"downright": "Abaissez votre bras droit",
"headupassdown":
"Gardez la tête de bébé en position plus haute que le reste du corps",
"babystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"babyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur"
},
"sittingMsgPart": {
"babyneckloc": "Assurez-vous que le cou de bébé est sur votre coude",
"babyhead": "Ne limitez pas la tête de bébé avec vos mains",
"babybackloc":
"Assurez-vous que votre avant-bras soutient le dos de bébé",
"headupassdown":
"Gardez la tête de bébé en position plus haute que le reste du corps",
"babystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"babyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur"
},
"successmsg": {
"recordMessage":
"Vous pouvez commencer à allaiter maintenant ! La minuterie démarre dans 3 secondes…",
"nobabyRecord":
"Vous avez appris la bonne posture. Vous pouvez essayer cet entraîneur AI avec votre bébé la prochaine fois",
"suggest":
"Appuyez sur l'icône en haut à droite pour afficher plus d'informations",
"posSuccess": "Votre posture est correcte. Vous pouvez continuer"
},
"strings": {
"suggestTitle": "Pendant l'allaitemen:",
"suggestText1":
"Ajustez-vous à une posture confortable et gardez bébé très près de vous à tout moment",
"suggestText2":
"Assurez-vous que le bébé prend correctement le sein (la bouche doit couvrir entièrement le mamelon et l'aréole); gardez le menton de bébé près de votre sein, sa bouche couvrant entièrement le mamelon et l'aréole",
"suggestText3":
"Votre main, votre taille et vos pieds doivent être soutenus lorsque vous tenez bébé",
"suggestText4": "Restez détendu jusqu'à la fin de la séance",
"suggestConfirmText": "OK.",
"discardReasonTitle": "Raisons d'abandonner?",
"discardReason1": "Je ne sais pas comment l'utiliser",
"discardReason2": "Inquiétude pour ma vie privée",
"discardReason3": "Je ne pense pas que c'est utile",
"mainTipsText":
"Vos images et vidéos ne seront utilisées que pour la reconnaissance des coachs IA. Elles ne seront pas stockés.",
"guidance": "des astuces",
"briefSummaryTitleFront":
"Toutes nos félicitations! Vous avez terminé la session en ",
"briefSummaryTitleAfter": " secondes",
"sitMainPointsText1":
"Gardez la tête de bébé en position haute pour que vous puissiez voir le visage de bébé",
"sitMainPointsText2": "Gardez bébé très près de vous",
"sitMainPointsText3":
"Gardez le cou de bébé sur votre coude et ne limitez pas la tête de bébé avec votre main",
"sitMainPointsText4":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"sitMainPointsConfirmText": "OK",
"momLeft":
"Aucune personne détectée. La page d'arrivée s'affichera après 5 secondes",
"successStatusTips":
"Corriger! Veuillez garder la posture pendant environ 20 secondes",
"errorTitle": "Erreur",
"keyErrorText": "Interdire l'utilisation des clés",
"originErrorText": "Cors not allowed",
"noCameraErrorText": "Caméra non détectée",
}
}
"tipsString": {
"initInitial": "Veuillez ajuster votre posture",
"sittingUnrecognition":
"Aucun bébé détecté. Veuillez suivre les instructions à l'écran",
"sittingBabyneckloc":
"Assurez-vous que le cou de bébé est sur votre coude",
"sittingBabyhead": "Ne limitez pas la tête de bébé avec vos mains",
"sittingBabybackloc":
"Assurez-vous que votre avant-bras soutient le dos de bébé",
"sittingUpleft": "Levez votre bras gauche",
"sittingUpright": "Levez votre bras droit",
"sittingDownleft": "Abaissez votre bras gauche",
"sittingDownright": "Abaissez votre bras droit",
"sittingHeadupassdown":
"Gardez la tête de bébé en position plus haute que le reste du corps",
"sittingBabystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"sittingBabyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur",
"nobabysittingBabyneckloc":
"Pendant l'allaitement, assurez-vous que le cou du bébé est sur votre coude",
"nobabysittingHeadupassdown":
"Pendant l'allaitement, gardez la tête de bébé en position plus haute que le reste du corps",
"nobabysittingBabystright":
"Pendant l'allaitement, gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"lyingUnrecognition":
"Aucun bébé détecté. Veuillez suivre les instructions à l'écran",
"lyingKeepadpos": "S'il vous plaît faites face au bébé",
"lyingKeeplying":
"Veuillez vous allonger correctement sur le côté. Ne soutenez pas votre tête uniquement avec vos bras",
"lyingBabyhead": "Ne limitez pas la tête de bébé avec vos mains",
"lyingNobabyback":
"Utilisez vos bras pour soutenir le dos du bébé et assurez-vous que la poitrine et l'abdomen sont près de vous",
"lyingBabystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"lyingBabyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur",
"nobabylyingBabyheadloc":
"Pendant l'allaitement proprement dit, assurez-vous que le bébé fait face au sein correctement",
"nobabylyingBabystright":
"Pendant l'allaitement, gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"sittingSuggest": [
"Ajustez-vous à une posture confortable et gardez bébé très près de vous à tout moment",
"Assurez-vous que le bébé prend correctement le sein (la bouche doit couvrir entièrement le mamelon et l'aréole)",
"Gardez le menton de bébé près de votre sein, sa bouche couvrant entièrement le mamelon et l'aréole",
"Appuyez sur l'icône en haut à droite pour afficher plus d'informations",
"Détendez votre épaule",
"Votre main, votre taille et vos pieds doivent être soutenus lorsque vous tenez bébé",
"Restez détendu jusqu'à la fin de la séance"
],
"lyingSuggest": [
"Faites toujours attention à ce que bébé puisse respirer en douceur",
"Ne serrez pas la poitrine. Rapprochez les fesses du bébé de votre abdomen",
"Assurez-vous que le bébé prend correctement le sein (la bouche doit couvrir entièrement le mamelon et l'aréole)",
"Gardez le menton de bébé près de votre sein et sa bouche couvrant entièrement le mamelon et l'aréole",
"Appuyez sur l'icône en haut à droite pour afficher plus d'informations",
"Vous pouvez utiliser un coussin pour soutenir votre tête, mais il ne doit pas être trop épais",
"Vous pouvez utiliser un coussin pour soutenir votre taille ou le mettre entre vos jambes pour vous reposer et vous détendre",
"Restez détendu jusqu'à la fin de la séance"
]
},
"commonmemsg": {
"initialMassage":
"Tenez-vous à un mètre de la caméra et placez votre corps dans la ligne de guidage. La session démarre dans 5 secondes…"
},
"sittingMsg": {
"babyneckloc": "Assurez-vous que le cou de bébé est sur votre coude",
"babyhead": "Ne limitez pas la tête de bébé avec vos mains",
"babybackloc":
"Assurez-vous que votre avant-bras soutient le dos de bébé",
"upleft": "Levez votre bras gauche",
"upright": "Levez votre bras droit",
"downleft": "Abaissez votre bras gauche",
"downright": "Abaissez votre bras droit",
"headupassdown":
"Gardez la tête de bébé en position plus haute que le reste du corps",
"babystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"babyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur"
},
"sittingMsgPart": {
"babyneckloc": "Assurez-vous que le cou de bébé est sur votre coude",
"babyhead": "Ne limitez pas la tête de bébé avec vos mains",
"babybackloc":
"Assurez-vous que votre avant-bras soutient le dos de bébé",
"headupassdown":
"Gardez la tête de bébé en position plus haute que le reste du corps",
"babystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"babyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur"
},
"lyingMsg": {
"keepadpos": "S'il vous plaît faites face au bébé",
"keeplying": "Veuillez vous allonger droit",
"babyhead": "Ne limitez pas la tête de bébé avec vos mains",
"nobabyback":
"Utilisez vos bras pour soutenir le dos du bébé et assurez-vous que la poitrine et l'abdomen sont près de vous",
"babystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"babyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur"
},
"lyingMsgPart": {
"babyhead": "Ne limitez pas la tête de bébé avec vos mains",
"nobabyback":
"Utilisez vos bras pour soutenir le dos du bébé et assurez-vous que la poitrine et l'abdomen sont près de vous",
"babystright":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"babyheadloc":
"Assurez-vous que bébé est face au sein à la bonne hauteur"
},
"successmsg": {
"recordMessage":
"Vous pouvez commencer à allaiter maintenant ! La minuterie démarre dans 3 secondes…",
"nobabyRecord":
"Vous avez appris la bonne posture. Vous pouvez essayer cet entraîneur AI avec votre bébé la prochaine fois",
"suggest":
"Appuyez sur l'icône en haut à droite pour afficher plus d'informations",
"posSuccess": "Votre posture est correcte. Vous pouvez continuer"
},
"strings": {
"suggestTitle": "\"Pendant l'allaitement\":",
"suggestText1":
"Ajustez-vous à une posture confortable et gardez bébé très près de vous à tout moment",
"suggestText2":
"Assurez-vous que le bébé prend correctement le sein (la bouche doit couvrir entièrement le mamelon et l'aréole); gardez le menton de bébé près de votre sein, sa bouche couvrant entièrement le mamelon et l'aréole",
"suggestText3":
"Votre main, votre taille et vos pieds doivent être soutenus lorsque vous tenez bébé",
"suggestText4": "Restez détendu jusqu'à la fin de la séance",
"lyingSuggestText1":
"1. Pendant l'allaitement, faites toujours attention à la respiration de votre bébé. Ne serrez pas la poitrine. Rapprochez les fesses du bébé de votre abdomen et laissez un peu d'espace entre votre sein et le nez de votre bébé.",
"lyingSuggestText2":
"2. Vous pouvez utiliser un coussin pour soutenir votre tête, mais il ne doit pas être trop épais. Vous pouvez utiliser un coussin pour soutenir votre taille ou le placer entre vos jambes pour vous reposer et vous détendre.",
"suggestConfirmText": "OK.",
"discardReasonTitle": "Raisons d'abandonner?",
"discardReason1": "Je ne sais pas comment l'utiliser",
"discardReason2": "Inquiétude pour ma vie privée",
"discardReason3": "Je ne pense pas que c'est utile",
"mainTipsText":
"Vos images et vidéos ne seront utilisées que pour la reconnaissance des coachs IA. Elles ne seront pas stockés.",
"guidance": "des astuces",
"briefSummaryTitleFront":
"Toutes nos félicitations! Vous avez terminé la session en ",
"briefSummaryTitleAfter": " secondes",
"sitMainPointsText1":
"Gardez la tête de bébé en position haute pour que vous puissiez voir le visage de bébé",
"sitMainPointsText2": "Gardez bébé très près de vous",
"sitMainPointsText3":
"Gardez le cou de bébé sur votre coude et ne limitez pas la tête de bébé avec votre main",
"sitMainPointsText4":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"sitMainPointsLyingText1":
"Gardez la tête de bébé en position haute pour que vous puissiez voir le visage de bébé",
"sitMainPointsLyingText2":
"Vous et le bébé devez être proches l'un de l'autre",
"sitMainPointsLyingText3":
"Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
"sitMainPointsLyingText4":
"Vous pouvez utiliser une main pour soutenir le dos du bébé et l'autre main pour vous reposer sous la tête.",
"sitMainPointsLyingText5":
"Faites toujours attention à la respiration de votre bébé. Ne serrez pas la poitrine. Rapprochez les fesses du bébé de votre abdomen et laissez un peu d'espace entre votre sein et le nez de votre bébé.",
"sitMainPointsConfirmText": "OK",
"momLeft":
"Aucune personne détectée. La page d'arrivée s'affichera après 5 secondes",
"successStatusTips":
"Corriger! Veuillez garder la posture pendant environ 20 secondes",
"errorTitle": "Erreur",
"keyErrorText": "Interdire l'utilisation des clés",
"originErrorText": "Cors not allowed",
"noCameraErrorText": "Caméra non détectée"
}
}
{
"tipsString": {
"initInitial": "Por favor, ajuste su postura",
"sittingUnrecognition":
"Ningún bebé detectado. Siga las instrucciones mostradas en pantalla",
"sittingBabyneckloc":
"Asegúrese de que el cuello del bebé esté sobre su codo",
"sittingBabyhead": "No restrinja la cabeza del bebé con las manos",
"sittingBabybackloc":
"Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
"sittingUpleft": "Levante su brazo izquierdo",
"sittingUpright": "Levante su brazo derecho",
"sittingDownleft": "Baje su brazo izquierdo",
"sittingDownright": "Baje su brazo derecho",
"sittingHeadupassdown":
"Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"sittingBabystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"sittingBabyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada",
"nobabysittingBabyneckloc":
"Durante la lactancia real, asegúrese de que el cuello del bebé esté sobre su codo.",
"nobabysittingHeadupassdown":
"Durante la lactancia real, mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"nobabysittingBabystright":
"Durante la lactancia real, mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"sittingSuggest": [
"Tome una postura cómoda y mantén al bebé muy cerca de usted en todo momento",
"Asegúrese de que el bebé esté bien sujeto (la boca debe cubrir completamente el pezón y la areola)",
"Mantenga la barbilla del bebé cerca de su seno y la boca cubriendo completamente el pezón y la areola",
"Toque el icono superior derecho para ver más información",
"Relaje su hombro",
"Debe haber apoyo en su mano, su cintura y sus pies al sostener al bebé",
"Manténgase relajada hasta el final de la sesión"
]
},
"commonmemsg": {
"initialMassage":
"Manténgase a un metro de distancia de la cámara y coloque su cuerpo en la línea. La sesión comienza en 5 segundos..."
},
"sittingMsg": {
"babyneckloc": "Asegúrese de que el cuello del bebé esté sobre su codo",
"babyhead": "No restrinja la cabeza del bebé con las manos",
"babybackloc":
"Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
"upleft": "Levante su brazo izquierdo",
"upright": "Levante su brazo derecho",
"downleft": "Baje su brazo izquierdo",
"downright": "Baje su brazo derecho",
"headupassdown":
"Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"babystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"babyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
},
"sittingMsgPart": {
"babyneckloc": "Asegúrese de que el cuello del bebé esté sobre su codo",
"babyhead": "No restrinja la cabeza del bebé con las manos.",
"babybackloc":
"Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
"headupassdown":
"Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"babystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"babyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
},
"successmsg": {
"recordMessage":
"¡Puede comenzar a darle el pecho ahora! El temporizador comienza en 3 segundos...",
"nobabyRecord":
"Ha aprendido la postura correcta. Puede probar este asistente de IA con su bebé la próxima vez",
"suggest": "Toque el icono superior derecho para ver más información",
"posSuccess": "Su postura es correcta. Por favor, sigua así"
},
"strings": {
"suggestTitle": "Durante la lactancia real:",
"suggestText1":
"Tome una postura cómoda y mantén al bebé muy cerca de usted en todo momento",
"suggestText2":
"Asegúrese de que el bebé esté bien sujeto (la boca debe cubrir completamente el pezón y la areola); mantenga la barbilla del bebé cerca de su seno y la boca cubriendo completamente el pezón y la areola",
"suggestText3":
"Debe haber apoyo en su mano, su cintura y sus pies al sostener al bebé",
"suggestText4": "Manténgase relajada hasta el final de la sesión",
"suggestConfirmText": "DE ACUERDO",
"discardReasonTitle": "Razones para rendirse?",
"discardReason1": "No estoy segura de cómo usarlo",
"discardReason2": "Preocupación por mi privacidad",
"discardReason3": "No creo que sea útil",
"mainTipsText":
"Sus imágenes y videos solo se utilizarán para el reconocimiento del asistente de IA. No se almacenarán.",
"guidance": "consejos",
"briefSummaryTitleFront": "¡Felicidades! Has completado la sesión en ",
"briefSummaryTitleAfter": " segundos",
"sitMainPointsText1":
"Mantenga la cabeza del bebé en una posición más alta para que pueda ver la cara del bebé",
"sitMainPointsText2": "Mantenga al bebé muy cerca de usted",
"sitMainPointsText3":
"Mantenga el cuello del bebé sobre su codo y no restrinja la cabeza del bebé con su mano",
"sitMainPointsText4":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"sitMainPointsConfirmText": "DE ACUERDO",
"momLeft":
"No se detectó ninguna persona. La página de finalización se mostrará después de 5 segundos",
"successStatusTips":
"¡Correcto! Mantenga la postura durante unos 20 segundos",
"errorTitle": "Error",
"keyErrorText": "Desactivar la clave",
"originErrorText": "CORS no permite",
"noCameraErrorText": "Cámara no detectada",
}
}
"tipsString": {
"initInitial": "Por favor, ajuste su postura",
"sittingUnrecognition":
"Ningún bebé detectado. Siga las instrucciones mostradas en pantalla",
"sittingBabyneckloc":
"Asegúrese de que el cuello del bebé esté sobre su codo",
"sittingBabyhead": "No restrinja la cabeza del bebé con las manos",
"sittingBabybackloc":
"Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
"sittingUpleft": "Levante su brazo izquierdo",
"sittingUpright": "Levante su brazo derecho",
"sittingDownleft": "Baje su brazo izquierdo",
"sittingDownright": "Baje su brazo derecho",
"sittingHeadupassdown":
"Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"sittingBabystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"sittingBabyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada",
"nobabysittingBabyneckloc":
"Durante la lactancia real, asegúrese de que el cuello del bebé esté sobre su codo.",
"nobabysittingHeadupassdown":
"Durante la lactancia real, mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"nobabysittingBabystright":
"Durante la lactancia real, mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"lyingUnrecognition":
"Ningún bebé detectado. Siga las instrucciones en pantalla",
"lyingKeepadpos": "Por favor, enfréntate al bebé.",
"lyingKeeplying":
"Acuéstese de lado correctamente. No apoyes tu cabeza solo con tus brazos",
"lyingBabyhead": "No restrinja la cabeza del bebé con las manos.",
"lyingNobabyback":
"Use sus brazos para sostener la espalda del bebé y asegúrese de que el pecho y el abdomen estén cerca de usted.",
"lyingBabystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"lyingBabyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada",
"nobabylyingBabyheadloc":
"Durante la lactancia real, asegúrese de que el bebé mire hacia el pecho correctamente.",
"nobabylyingBabystright":
"Durante la lactancia real, mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"sittingSuggest": [
"Tome una postura cómoda y mantén al bebé muy cerca de usted en todo momento",
"Asegúrese de que el bebé esté bien sujeto (la boca debe cubrir completamente el pezón y la areola)",
"Mantenga la barbilla del bebé cerca de su seno y la boca cubriendo completamente el pezón y la areola",
"Toque el icono superior derecho para ver más información",
"Relaje su hombro",
"Debe haber apoyo en su mano, su cintura y sus pies al sostener al bebé",
"Manténgase relajada hasta el final de la sesión"
],
"lyingSuggest": [
"Siempre preste atención para asegurarse de que el bebé pueda respirar sin problemas.",
"No apriete el pecho. Haz que el trasero del bebé esté más cerca de tu abdomen.",
"Asegúrese de que el bebé esté bien sujeto (la boca debe cubrir completamente el pezón y la areola)",
"Mantenga la barbilla del bebé cerca de su seno y la boca cubriendo completamente el pezón y la areola.",
"Toque el icono superior derecho para ver más información",
"Puede usar un cojín para apoyar su cabeza, pero no debe ser demasiado grueso",
"Puede usar un cojín para apoyar su cintura o colocarlo entre sus piernas para descansar y relajarse.",
"Manténgase relajado hasta el final de la sesión."
]
},
"commonmemsg": {
"initialMassage":
"Manténgase a un metro de distancia de la cámara y coloque su cuerpo en la línea. La sesión comienza en 5 segundos..."
},
"sittingMsg": {
"babyneckloc": "Asegúrese de que el cuello del bebé esté sobre su codo",
"babyhead": "No restrinja la cabeza del bebé con las manos",
"babybackloc":
"Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
"upleft": "Levante su brazo izquierdo",
"upright": "Levante su brazo derecho",
"downleft": "Baje su brazo izquierdo",
"downright": "Baje su brazo derecho",
"headupassdown":
"Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"babystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"babyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
},
"sittingMsgPart": {
"babyneckloc": "Asegúrese de que el cuello del bebé esté sobre su codo",
"babyhead": "No restrinja la cabeza del bebé con las manos.",
"babybackloc":
"Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
"headupassdown":
"Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
"babystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"babyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
},
"lyingMsg": {
"keepadpos": "Por favor, enfréntate al bebé.",
"keeplying": "por favor acuéstate derecho",
"babyhead": "No restrinja la cabeza del bebé con las manos.",
"nobabyback":
"Use sus brazos para sostener la espalda del bebé y asegúrese de que el pecho y el abdomen estén cerca de usted.",
"babystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"babyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
},
"lyingMsgPart": {
"babyhead": "No restrinja la cabeza del bebé con las manos.",
"nobabyback":
"Use sus brazos para sostener la espalda del bebé y asegúrese de que el pecho y el abdomen estén cerca de usted.",
"babystright":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"babyheadloc":
"Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
},
"successmsg": {
"recordMessage":
"¡Puede comenzar a darle el pecho ahora! El temporizador comienza en 3 segundos...",
"nobabyRecord":
"Ha aprendido la postura correcta. Puede probar este asistente de IA con su bebé la próxima vez",
"suggest": "Toque el icono superior derecho para ver más información",
"posSuccess": "Su postura es correcta. Por favor, sigua así"
},
"strings": {
"suggestTitle": "\"Durante la lactancia real\":",
"suggestText1":
"Tome una postura cómoda y mantén al bebé muy cerca de usted en todo momento",
"suggestText2":
"Asegúrese de que el bebé esté bien sujeto (la boca debe cubrir completamente el pezón y la areola); mantenga la barbilla del bebé cerca de su seno y la boca cubriendo completamente el pezón y la areola",
"suggestText3":
"Debe haber apoyo en su mano, su cintura y sus pies al sostener al bebé",
"suggestText4": "Manténgase relajada hasta el final de la sesión",
"lyingSuggestText1":
"1. Durante la lactancia, siempre preste atención a la respiración de su bebé. No apriete el pecho. Acerque el trasero del bebé a su abdomen y deje algo de espacio entre su seno y la nariz de su bebé.",
"lyingSuggestText2":
"2. Puede usar un cojín para apoyar su cabeza, pero no debe ser demasiado grueso. Puede usar un cojín para apoyar su cintura o colocarlo entre sus piernas para descansar y relajarse.",
"suggestConfirmText": "DE ACUERDO",
"discardReasonTitle": "Razones para rendirse?",
"discardReason1": "No estoy segura de cómo usarlo",
"discardReason2": "Preocupación por mi privacidad",
"discardReason3": "No creo que sea útil",
"mainTipsText":
"Sus imágenes y videos solo se utilizarán para el reconocimiento del asistente de IA. No se almacenarán.",
"guidance": "consejos",
"briefSummaryTitleFront": "¡Felicidades! Has completado la sesión en ",
"briefSummaryTitleAfter": " segundos",
"sitMainPointsText1":
"Mantenga la cabeza del bebé en una posición más alta para que pueda ver la cara del bebé",
"sitMainPointsText2": "Mantenga al bebé muy cerca de usted",
"sitMainPointsText3":
"Mantenga el cuello del bebé sobre su codo y no restrinja la cabeza del bebé con su mano",
"sitMainPointsText4":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"sitMainPointsLyingText1":
"Mantenga la cabeza del bebé en una posición más alta para que pueda ver la cara del bebé",
"sitMainPointsLyingText2": "Tú y el bebé deben estar cerca el uno del otro.",
"sitMainPointsLyingText3":
"Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
"sitMainPointsLyingText4":
"Puede usar una mano para sostener la espalda del bebé y la otra mano para descansar debajo de la cabeza.",
"sitMainPointsLyingText5":
"Siempre preste atención a la respiración de su bebé. No apriete el pecho. Acerque el trasero del bebé a su abdomen y deje algo de espacio entre su seno y la nariz de su bebé.",
"sitMainPointsConfirmText": "DE ACUERDO",
"momLeft":
"No se detectó ninguna persona. La página de finalización se mostrará después de 5 segundos",
"successStatusTips":
"¡Correcto! Mantenga la postura durante unos 20 segundos",
"errorTitle": "Error",
"keyErrorText": "Desactivar la clave",
"originErrorText": "CORS no permite",
"noCameraErrorText": "Cámara no detectada"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment