import 'package:flutter/material.dart';
import 'package:flutter_habit/common/LocalData.dart';
/// Description: 多国语言
/// Time       : 08/18/2023 Friday
/// Author     : liuyuqi.gov@msn.cn
class I18N {
  static String _language;

  static void init() {
    _language = LocalData.getInstance().getString("language");
    if (_language == null) {
      _language = "cn";
      LocalData.getInstance().setString("language", _language);
    }
    debugPrint("init I18N to $_language");
  }

  static String of(String key) {
    return wordMap[_language][key] ?? "${_language.toUpperCase()}_$key";
  }

  static String getLanguage() {
    return _language;
  }

  static void setLanguage(String language) {
    _language = language;
    LocalData.getInstance().setString("language", _language);
  }
}

Map<String, Map<String, String>> wordMap = {
  "cn": {
    "": "",
    "7日运动次数": "7日运动次数",
    "7日运动总消耗": "7日运动总消耗",
    "BMI": "BMI",
    "ID": "ID",
    "MarkDown预览": "MarkDown预览",
    "不能关注自己": "不能关注自己",
    "裁剪图片": "裁剪图片",
    "长按可删除食物": "长按可删除食物",
    "长按可删除运动": "长按可删除运动",
    "长度为2-10个不包括任何符号的字符": "长度为2-10个不包括任何符号的字符",
    "吃饭时间": "吃饭时间",
    "迟到次数": "迟到次数",
    "从相册中选择": "从相册中选择",
    "从云端下载数据": "从云端下载数据",
    "打卡成功": "打卡成功",
    "打卡时段": "打卡时段",
    "打卡提醒": "打卡提醒",
    "打卡完成度": "打卡完成度",
    "待完成计划数": "待完成计划数",
    "登出": "登出",
    "登录": "登录",
    "登录信息过期": "登录信息过期",
    "登陆成功": "登陆成功",
    "调整数据": "调整数据",
    "非打卡时间打卡成功": "非打卡时间打卡成功",
    "否": "否",
    "该食物已存在": "该食物已存在",
    "该邮箱未注册": "该邮箱未注册",
    "该邮箱已存在": "该邮箱已存在",
    "该运动已存在": "该运动已存在",
    "概览": "概览",
    "感谢您的支持，优惠口令已发送至您的邮箱": "感谢您的支持，优惠口令已发送至您的邮箱",
    "关注": "关注",
    "关注成功": "关注成功",
    "官方合作": "官方合作",
    "花费": "花费",
    "花费记录": "花费记录",
    "滑动来打卡": "滑动来打卡",
    "滑动来覆盖今日数据": "滑动来覆盖今日数据",
    "滑动来删除该条数据": "滑动来删除该条数据",
    "滑动来完成计划": "滑动来完成计划",
    "欢迎": "欢迎",
    "获取验证码": "获取验证码",
    "基本信息": "基本信息",
    "基本信息记录": "基本信息记录",
    "计划任务": "计划任务",
    "计划运动时长": "计划运动时长",
    "记录": "记录",
    "记录成功": "记录成功",
    "记录课程学习": "记录课程学习",
    "继续该操作吗？": "继续该操作吗？",
    "简单": "简单",
    "结束时间": "结束时间",
    "金币": "金币",
    "金币不足": "金币不足",
    "今日": "今日",
    "今日状态": "今日状态",
    "进食量": "进食量",
    "卡路里消耗": "卡路里消耗",
    "课程难度": "课程难度",
    "课程学习": "课程学习",
    "课程学习详情": "课程学习详情",
    "课程主题": "课程主题",
    "课程主题不能为空": "课程主题不能为空",
    "库存": "库存",
    "库存不足": "库存不足",
    "快速注册": "快速注册",
    "困难": "困难",
    "来到": "来到",
    "立即获取优惠口令": "立即获取优惠口令",
    "连接失败": "连接失败",
    "两次输入不一致": "两次输入不一致",
    "每日打卡完成度": "每日打卡完成度",
    "每日课程数": "每日课程数",
    "密码": "密码",
    "密码不能为空": "密码不能为空",
    "男": "男",
    "您不能删除吃过的食物": "您不能删除吃过的食物",
    "您不能删除记录过的运动": "您不能删除记录过的运动",
    "您的账号由于存在恶意刷金币行为已被系统限制金币获取": "您的账号由于存在恶意刷金币行为已被系统限制金币获取",
    "女": "女",
    "拍照": "拍照",
    "排名": "排名",
    "排行榜": "排行榜",
    "起床打卡": "起床打卡",
    "起床打卡开始了": "起床打卡开始了",
    "起床打卡时间": "起床打卡时间",
    "起床时间": "起床时间",
    "起始时间": "起始时间",
    "请输入6位验证码": "请输入6位验证码",
    "请输入花费": "请输入花费",
    "请输入计划运动时长": "请输入计划运动时长",
    "请输入进食量": "请输入进食量",
    "请输入您的密码": "请输入您的密码",
    "请输入您的新密码": "请输入您的新密码",
    "请输入您的邮箱": "请输入您的邮箱",
    "请输入您注册时的邮箱": "请输入您注册时的邮箱",
    "请输入食物名称": "请输入食物名称",
    "请输入食物热量": "请输入食物热量",
    "请输入消耗热量": "请输入消耗热量",
    "请输入新用户名": "请输入新用户名",
    "请输入运动名称": "请输入运动名称",
    "请输入运动时长": "请输入运动时长",
    "请先登录": "请先登录",
    "请重复输入您的密码": "请重复输入您的密码",
    "请重复输入您的新密码": "请重复输入您的新密码",
    "取消": "取消",
    "取消关注": "取消关注",
    "取消关注成功": "取消关注成功",
    "缺席次数": "缺席次数",
    "确定": "确定",
    "日常生活": "日常生活",
    "日常生活记录": "日常生活记录",
    "三围信息": "三围信息",
    "删除成功": "删除成功",
    "商城": "商城",
    "商品详情": "商品详情",
    "上传同步成功": "上传同步成功",
    "摄入卡路里": "摄入卡路里",
    "摄入卡路里总量": "摄入卡路里总量",
    "设置": "设置",
    "身高": "身高",
    "生日": "生日",
    "食物名称": "食物名称",
    "食物热量": "食物热量",
    "食用次数": "食用次数",
    "是": "是",
    "是否迟到": "是否迟到",
    "是否缺席": "是否缺席",
    "输入用户名查询": "输入用户名查询",
    "输入有误": "输入有误",
    "数据管理": "数据管理",
    "睡觉打卡开始了": "睡觉打卡开始了",
    "睡觉时间": "睡觉时间",
    "睡眠时长": "睡眠时长",
    "睡眠时间": "睡眠时间",
    "私信": "私信",
    "松开以继续": "松开以继续",
    "搜索": "搜索",
    "搜索用户": "搜索用户",
    "提交": "提交",
    "体育锻炼": "体育锻炼",
    "体育锻炼记录": "体育锻炼记录",
    "体重": "体重",
    "体重信息": "体重信息",
    "添加计划任务": "添加计划任务",
    "添加计划任务成功": "添加计划任务成功",
    "添加食物": "添加食物",
    "添加数据后会展示对应图表": "添加数据后会展示对应图表",
    "添加运动": "添加运动",
    "通知开关": "通知开关",
    "同步数据到云端": "同步数据到云端",
    "臀围": "臀围",
    "完成": "完成",
    "晚安打卡": "晚安打卡",
    "晚饭打卡": "晚饭打卡",
    "晚饭时间": "晚饭时间",
    "忘记密码？": "忘记密码？",
    "未登录": "未登录",
    "未解决的问题数": "未解决的问题数",
    "未入榜": "未入榜",
    "未完成的作业": "未完成的作业",
    "未完成的作业数": "未完成的作业数",
    "我的关注": "我的关注",
    "无数据": "无数据",
    "午饭打卡": "午饭打卡",
    "午饭打卡开始了": "午饭打卡开始了",
    "午饭打卡时间": "午饭打卡时间",
    "午饭时间": "午饭时间",
    "午休打卡": "午休打卡",
    "午休打卡开始了": "午休打卡开始了",
    "午休打卡时间": "午休打卡时间",
    "午休时间": "午休时间",
    "下载同步成功": "下载同步成功",
    "详情": "详情",
    "向右滑动": "向右滑动",
    "消费": "消费",
    "消耗": "消耗",
    "消耗热量": "消耗热量",
    "新密码": "新密码",
    "信息": "信息",
    "性别": "性别",
    "胸围": "胸围",
    "修改成功": "修改成功",
    "修改密码成功": "修改密码成功",
    "修改生日": "修改生日",
    "修改头像": "修改头像",
    "修改性别": "修改性别",
    "修改用户名": "修改用户名",
    "选择食物": "选择食物",
    "学习": "学习",
    "验证码": "验证码",
    "验证码错误或过期": "验证码错误或过期",
    "验证码发送成功，5分钟内有效": "验证码发送成功，5分钟内有效",
    "腰围": "腰围",
    "一般": "一般",
    "已解决": "已解决",
    "用户": "用户",
    "用户名": "用户名",
    "用户设置": "用户设置",
    "邮件发送失败": "邮件发送失败",
    "邮箱": "邮箱",
    "邮箱不能为空": "邮箱不能为空",
    "邮箱格式有误": "邮箱格式有误",
    "邮箱或密码错误": "邮箱或密码错误",
    "有未解决的问题": "有未解决的问题",
    "有未完成的作业": "有未完成的作业",
    "语言": "语言",
    "遇到的问题": "遇到的问题",
    "预计消耗": "预计消耗",
    "云端无数据": "云端无数据",
    "运动次数": "运动次数",
    "运动类型": "运动类型",
    "运动名称": "运动名称",
    "运动时长": "运动时长",
    "早饭打卡": "早饭打卡",
    "早饭打卡开始了": "早饭打卡开始了",
    "早饭打卡时间": "早饭打卡时间",
    "早饭时间": "早饭时间",
    "支持MarkDown": "支持MarkDown",
    "重复购买不会重复扣费": "重复购买不会重复扣费",
    "重复密码": "重复密码",
    "重设密码": "重设密码",
    "重置密码": "重置密码",
    "重置数据": "重置数据",
    "主题": "主题",
    "注册": "注册",
    "注册成功": "注册成功",
    "注意": "注意",
    "字母开头，必须包含大小写字母，可以包含字母、数字、特殊符号\n长度为8~16位":
        "字母开头，必须包含大小写字母，可以包含字母、数字、特殊符号\n长度为8~16位",
    "总结": "总结",
    "最近": "最近",
    "昨夜睡眠时长": "昨夜睡眠时长",
    "作业是否完成": "作业是否完成",
  },
  "en": {
    "": "",
    "7日运动次数": "7 days exercise times",
    "7日运动总消耗": "7 days consumption",
    "BMI": "BMI",
    "ID": "ID",
    "MarkDown预览": "MarkDown preview",
    "不能关注自己": "You can't follow yourself",
    "裁剪图片": "Crop Image",
    "长按可删除食物": "Long press to remove food",
    "长按可删除运动": "Long press to delete movement",
    "长度为2-10个不包括任何符号的字符": "Length of 2-10 characters without any symbols",
    "吃饭时间": "Mealtime",
    "迟到次数": "Late times",
    "从相册中选择": "Select from the album",
    "从云端下载数据": "Download data from the cloud",
    "打卡成功": "Clock in success",
    "打卡时段": "Clock in time",
    "打卡提醒": "Clock in reminded",
    "打卡完成度": "Clock in progress",
    "待完成计划数": "Schedule to be completed",
    "登出": "Sign out",
    "登录": "Sign in",
    "登录信息过期": "token expired",
    "登陆成功": "Sign in success",
    "调整数据": "Adjust data",
    "非打卡时间打卡成功": "Non-clocked time clocked in",
    "否": "no",
    "该食物已存在": "The food already exists",
    "该邮箱未注册": "This email is not registered",
    "该邮箱已存在": "The email already exists",
    "该运动已存在": "The movement already exists",
    "概览": "Overview",
    "感谢您的支持，优惠口令已发送至您的邮箱":
        "Thank you for your support. The token has been sent to your email",
    "关注": "follow",
    "关注成功": "follow success",
    "官方合作": "Authoritative",
    "花费": "Spend",
    "花费记录": "Spend record",
    "滑动来打卡": "Slide to clock in",
    "滑动来覆盖今日数据": "Slide to over today's data",
    "滑动来删除该条数据": "Slide to delete the data",
    "滑动来完成计划": "Slide to complete the schedule",
    "欢迎": "Welcome",
    "获取验证码": "Get AuthCode",
    "基本信息": "Basic information",
    "基本信息记录": "Basic information record",
    "计划任务": "Scheduled tasks",
    "计划运动时长": "Scheduled exercise time",
    "记录": "Record",
    "记录成功": "Record success",
    "记录课程学习": "Record course learning",
    "继续该操作吗？": "Continue？",
    "简单": "Simple",
    "结束时间": "End time",
    "金币": "Coins",
    "金币不足": "Not enough Coins",
    "今日": "Today",
    "今日状态": "Today's state",
    "进食量": "Food-intake",
    "卡路里消耗": "Calorie consumption",
    "课程难度": "Course difficulty",
    "课程学习": "Course learning",
    "课程学习详情": "Course details",
    "课程主题": "Course topic",
    "课程主题不能为空": "Course topic can not be empty",
    "库存": "Stock",
    "库存不足": "Understock",
    "快速注册": "Fast sign up",
    "困难": "difficulty",
    "来到": "to",
    "立即获取优惠口令": "Get the discount token now",
    "连接失败": "Connection fail",
    "两次输入不一致": "The two inputs are inconsistent",
    "每日打卡完成度": "Daily clock in progress",
    "每日课程数": "Daily course count",
    "密码": "Password",
    "密码不能为空": "Password cannot be empty",
    "男": "Male",
    "您不能删除吃过的食物": "You cannot delete recorded food",
    "您不能删除记录过的运动": "You cannot delete recorded movements",
    "您的账号由于存在恶意刷金币行为已被系统限制金币获取":
        "Your account has been ban due to there is a malicious behavior of gain COINS",
    "女": "Female",
    "拍照": "Take a picture",
    "排名": "Ranking",
    "排行榜": "Ranking list",
    "起床打卡": "Wake-up clock in",
    "起床打卡开始了": "It's Wake-up clock in time",
    "起床打卡时间": "Wake-up clock in time",
    "起床时间": "Wake-up time",
    "起始时间": "Starting time",
    "请输入6位验证码": "Please enter a six-bit verification code",
    "请输入花费": "Please enter the cost",
    "请输入计划运动时长": "Please enter the duration of planned exercise",
    "请输入进食量": "Please enter food intake",
    "请输入您的密码": "Enter your password",
    "请输入您的新密码": "Enter your new password",
    "请输入您的邮箱": "Enter your email",
    "请输入您注册时的邮箱": "Enter your email that you sign up",
    "请输入食物名称": "Enter the name of the food",
    "请输入食物热量": "Enter the calorie of food",
    "请输入消耗热量": "Enter calories consumed",
    "请输入新用户名": "Please enter a new user name",
    "请输入运动名称": "Please enter the name of the movement",
    "请输入运动时长": "Please enter the duration of exercise",
    "请先登录": "Please log in first",
    "请重复输入您的密码": "Please repeat your password",
    "请重复输入您的新密码": "Please repeat your new password",
    "取消": "Cancel",
    "取消关注": "Unfollow",
    "取消关注成功": "Unfollow success",
    "缺席次数": "Absent times",
    "确定": "ok",
    "日常生活": "Daily life",
    "日常生活记录": "Daily life record",
    "三围信息": "BWH information",
    "删除成功": "deleted success",
    "商城": "Shopping mall",
    "商品详情": "Product details",
    "上传同步成功": "Upload synchronization successful",
    "摄入卡路里": "Calorie intake",
    "摄入卡路里总量": "Total calories intake",
    "设置": "Setting",
    "身高": "Stature",
    "生日": "Birthday",
    "食物名称": "Food name",
    "食物热量": "food energy",
    "食用次数": "Eat times",
    "是": "ok",
    "是否迟到": "Is late",
    "是否缺席": "Is absent",
    "输入用户名查询": "Enter the username to query",
    "输入有误": "Input error",
    "数据管理": "Data management",
    "睡觉打卡开始了": "It's sleep clock in time",
    "睡觉时间": "Sleep time",
    "睡眠时长": "Sleep duration",
    "睡眠时间": "Sleep time",
    "私信": "Private letter",
    "松开以继续": "Release to continue",
    "搜索": "Search",
    "搜索用户": "Search User",
    "提交": "Commit",
    "体育锻炼": "Physical exercise",
    "体育锻炼记录": "Physical exercise record",
    "体重": "Weight",
    "体重信息": "Weight information",
    "添加计划任务": "Add scheduled tasks",
    "添加计划任务成功": "Added scheduled task success",
    "添加食物": "Add food",
    "添加数据后会展示对应图表":
        "The corresponding chart will be displayed after the data is added",
    "添加运动": "Add movement",
    "通知开关": "Notification toggle",
    "同步数据到云端": "Synchronize data to the cloud",
    "臀围": "Hipline",
    "完成": "Accomplish",
    "晚安打卡": "Sleep clock in",
    "晚饭打卡": "Dinner clock in",
    "晚饭时间": "Dinner time",
    "忘记密码？": "Forget the password?",
    "未登录": "Not sign in",
    "未解决的问题数": "Unsolved issues count",
    "未入榜": "Not in listed",
    "未完成的作业": "Unfinished homework",
    "未完成的作业数": "Unfinished homework count",
    "我的关注": "My follows",
    "无数据": "Empty Data",
    "午饭打卡": "Lunch clock in",
    "午饭打卡开始了": "It's lunch clock in time",
    "午饭打卡时间": "Lunch clock in time",
    "午饭时间": "Lunch time",
    "午休打卡": "Lunch break clock in",
    "午休打卡开始了": "It's lunch break clock in time",
    "午休打卡时间": "Lunch break clock in time",
    "午休时间": "Lunch break time",
    "下载同步成功": "Download synchronization successful",
    "详情": "Details",
    "向右滑动": "Slide right",
    "消费": "Consumption",
    "消耗": "Consume",
    "消耗热量": "Calorie consumption",
    "新密码": "New password",
    "信息": "Information",
    "性别": "Gender",
    "胸围": "Chestline",
    "修改成功": "Modify success",
    "修改密码成功": "Password changed success",
    "修改生日": "Modify birthday",
    "修改头像": "Modify head picture",
    "修改性别": "Modify gender",
    "修改用户名": "Modify username",
    "选择食物": "Choice food",
    "学习": "Study",
    "验证码": "Auth code",
    "验证码错误或过期": "Auth code wrong or expired",
    "验证码发送成功，5分钟内有效": "Auth code sent successfully, valid within 5 minutes",
    "腰围": "Waistline",
    "一般": "General",
    "已解决": "solved",
    "用户": "User",
    "用户名": "User name",
    "用户设置": "User settings",
    "邮件发送失败": "Email sending failed",
    "邮箱": "Email",
    "邮箱不能为空": "Email cannot be empty",
    "邮箱格式有误": "Incorrect email format",
    "邮箱或密码错误": "Email or password wrong",
    "有未解决的问题": "There are unfinished tasks",
    "有未完成的作业": "There are unfinished homework",
    "语言": "Language",
    "遇到的问题": "Problems",
    "预计消耗": "Expected consumption",
    "云端无数据": "Empty cloud data",
    "运动次数": "Movement times",
    "运动类型": "Movement type",
    "运动名称": "Movement name",
    "运动时长": "Exercise duration",
    "早饭打卡": "breakfast clock in",
    "早饭打卡开始了": "It's breakfast clock in time",
    "早饭打卡时间": "Breakfast clock in time",
    "早饭时间": "Breakfast time",
    "支持MarkDown": "Support MarkDown",
    "重复购买不会重复扣费": "Repeat purchase will not be repeated deduction coins",
    "重复密码": "Repeat password",
    "重设密码": "Reset password",
    "重置密码": "Reset password",
    "重置数据": "Reset data",
    "主题": "Theme",
    "注册": "Sign up",
    "注册成功": "Sign up success",
    "注意": "Attention",
    "字母开头，必须包含大小写字母，可以包含字母、数字、特殊符号\n长度为8~16位":
        "Letter beginning, must contain case letters, can contain letters, Numbers, special symbol \n length of 8 to 16 bits",
    "总结": "Conclusion",
    "最近": "Recently",
    "昨夜睡眠时长": "Last night sleep time",
    "作业是否完成": "Is homework completed",
  }
};
