const numToChinese = (num) => {
  if(num<1) num = 1
  const map = ['零','一','二','三','四','五','六','七','八','九']
  return map[num] || num.toString()
}
export default {
  en: {
    'person.inviteData': ({ named }) => `Already invited ${named('friends')} friends, Opportunity to receive additional rewards`,
    "detail.remain": ({ named }) => `Remaining ${named('days')} days`,
    "detail.discountOff": ({ named }) => `${named('month')} MONTHS ${named('percent')}% OFF`,
	  "month": ({ named }) => `${named('count')} month(s)`,
	  "months": ({ named }) => `${named('count')} month(s)`,
    "discountMomey": ({ named }) => `${named('discount')} Discount `,
    "firstMonthRent": ({ named }) => `First Month Rent ${named('discount')}`,
    "couponDiscount": ({ named }) => `${named('percent')} off `,
    "freeMonth": ({ named }) => `Free ${named('discount')} months`,
    "BonusMonth": ({ named }) => `Bonus ${named('discount')} months`,
    "requiredMomey": ({ named }) => `${named('momey')}  required`,
    "fullMonths": ({ named }) => `available after ${named('count')}  full months`,
    "invoice.order": ({ named }) => `${named('number')} orders have been selected, totaling ${named('money')} yuan`,
    "giftMonth": ({ named }) => `Gifted ${named('count')} months`,
    "storeRenovationNotice": ({ named }) => `This store is under renovation. It will be available on ${named('limitDate')}. Orders can be placed in advance.`,
    "storeCount": ({ named }) => `${named('count')} stores`,
    "discount": ({ named }) => `${Math.floor(named('discount') * 100)}% off`,
    "flashSaleDiscount": ({ named }) => `Extra ${Math.floor(named('discount') * 100)}% off`,
    'order.confirmReferrer': ({ named }) => `This order will be associated with the referrer ${named('referrer')}. Please confirm whether this transaction was completed through their referral.`,
  },
  zhHans: {
    'person.inviteData': ({ named }) => `已邀请 ${named('friends')} 名好友, 有机会获得额外奖励`, //获得 ${named('days')} 天免费租期!
    "detail.remain": ({ named }) => `租期：剩余${named('days')}天`,
    "detail.discountOff": ({ named }) => `${named('month')}个月享${named('discount')}折`,
    "month": ({ named }) => `${named('count')} 月`,
    "months": ({ named }) => `${named('count')} 月`,
    "discountMomey": ({ named }) => `优惠 ￥${named('discount')}  `,
    "firstMonthRent": ({ named }) => `首月 ${named('discount')} 元`,
    "couponDiscount": ({ named }) => ` 打 ${named('discount')} 折 `,
    "freeMonth": ({ named }) => `免租 ${named('discount')} 个月`,
    "BonusMonth": ({ named }) => `赠送 ${named('discount')} 个月`,
    "requiredMomey": ({ named }) => `满￥${named('momey')} 可用`,
    "fullMonths": ({ named }) => `满 ${named('count')} 个月可用`,
    "invoice.order": ({ named }) => `已选 ${named('number')} 个订单，共 ${named('money')} 元`,
    "giftMonth": ({ named }) => `赠送 ${named('count')} 个月`,
    "storeRenovationNotice": ({ named }) =>`该店铺装修中，将于 ${named('limitDate')} 开放使用，可提前下单`,
    "storeCount": ({ named }) => `一共 ${named('count')} 店`,
    "discount": ({ named }) => `${numToChinese(Math.floor(named('discount') * 10))||numToChinese[1]} 折`,
    "flashSaleDiscount": ({ named }) => `额外${numToChinese(Math.floor(named('discount') * 10))}折`,
    'order.confirmReferrer': ({ named }) => `此订单将关联至转介人 ${named('referrer')}。请确认是否通过他的推荐完成本次交易？`,
  },
};
