package core import ( "strconv" "strings" "time" "github.com/egoist/mygo/ui" ) func init() { addMessages(map[string][2]string{ "channel_list.label": {"Channels", "频道"}, "channel_list.unread": {"%s, %d unread", "%s,%d 条未读"}, "channel_list.pinned": {"Pinned", "已置顶"}, "channel_list.muted": {"Muted", "已静音"}, "chat_message.time": {"15:04", "15:04"}, "chat_message.edited": {"(edited)", "(已编辑)"}, "unread_divider.new": {"New", "新消息"}, "unread_divider.count": {"%d new messages", "%d 条新消息"}, "read_receipt.sent": {"Sent", "已发送"}, "read_receipt.delivered": {"Delivered", "已送达"}, "read_receipt.read": {"Read", "已读"}, "read_receipt.readBy": {"Read by %s", "%s 已读"}, "member_list.empty": {"No members", "没有成员"}, "user_profile_card.label": {"User profile", "用户资料"}, "recipient_input.label": {"Recipients", "收件人"}, "member_list.online": {"Online — %d", "在线 — %d"}, "member_list.offline": {"Offline — %d", "离线 — %d"}, "online_status.online": {"Online", "在线"}, "online_status.away": {"Away", "离开"}, "online_status.busy": {"Busy", "忙碌"}, "online_status.offline": {"Offline", "离线"}, "status_setter.label": {"Status", "状态"}, "status_setter.emoji": {"Choose an emoji", "选择表情"}, "status_setter.text": {"Status text", "状态文字"}, "status_setter.placeholder": {"What is your status?", "你现在的状态是?"}, "status_setter.clearAfter": {"Clear after", "清除时间"}, "status_setter.never": {"Don't clear", "不清除"}, "status_setter.30m": {"30 minutes", "30 分钟"}, "status_setter.1h": {"1 hour", "1 小时"}, "status_setter.4h": {"4 hours", "4 小时"}, "status_setter.today": {"Today", "今天"}, "status_setter.week": {"This week", "本周"}, "status_setter.clear": {"Clear status", "清除状态"}, "call_controls.label": {"Call controls", "通话控制"}, "call_controls.mute": {"Mute", "静音"}, "call_controls.unmute": {"Unmute", "取消静音"}, "call_controls.cameraOff": {"Turn camera off", "关闭摄像头"}, "call_controls.cameraOn": {"Turn camera on", "打开摄像头"}, "call_controls.share": {"Share screen", "共享屏幕"}, "call_controls.stopShare": {"Stop sharing", "停止共享"}, "call_controls.hangUp": {"Leave", "挂断"}, "video_call_grid.label": {"Participants", "参与者"}, "video_call_grid.speaking": {"speaking", "正在发言"}, "video_call_grid.muted": {"muted", "已静音"}, "video_call_grid.cameraOff": {"camera off", "摄像头已关闭"}, "incoming_call_dialog.title": {"%s is calling", "%s 来电"}, "incoming_call_dialog.voice": {"Incoming voice call", "语音来电"}, "incoming_call_dialog.video": {"Incoming video call", "视频来电"}, "incoming_call_dialog.accept": {"Accept", "接听"}, "incoming_call_dialog.acceptVideo": {"With video", "视频接听"}, "incoming_call_dialog.decline": {"Decline", "拒绝"}, "emoji_picker.label": {"Emoji", "表情"}, "emoji_picker.search": {"Search emoji", "搜索表情"}, "emoji_picker.none": {"No emoji found", "没有找到表情"}, "emoji_picker.tone": {"Skin tone", "肤色"}, "emoji_picker.toneN": {"Skin tone %d", "肤色 %d"}, "emoji_picker.recent": {"Recent", "最近使用"}, "emoji_picker.smileys": {"Smileys", "表情"}, "emoji_picker.people": {"People", "人物"}, "emoji_picker.nature": {"Nature", "自然"}, "emoji_picker.food": {"Food and drink", "食物"}, "emoji_picker.activities": {"Activities", "活动"}, "emoji_picker.travel": {"Places", "地点"}, "emoji_picker.objects": {"Objects", "物品"}, "emoji_picker.symbols": {"Symbols", "符号"}, "emoji_picker.name_grinning_face": {"grinning face", "笑脸"}, "emoji_picker.name_smiling_face_with_open_mouth": {"smiling face with open mouth", "张嘴笑脸"}, "emoji_picker.name_face_with_tears_of_joy": {"face with tears of joy", "笑哭"}, "emoji_picker.name_slightly_smiling_face": {"slightly smiling face", "微笑"}, "emoji_picker.name_winking_face": {"winking face", "眨眼"}, "emoji_picker.name_smiling_face_with_smiling_eyes": {"smiling face with smiling eyes", "眉眼带笑"}, "emoji_picker.name_smiling_face_with_heart_eyes": {"smiling face with heart eyes", "爱心眼睛"}, "emoji_picker.name_face_blowing_a_kiss": {"face blowing a kiss", "飞吻"}, "emoji_picker.name_thinking_face": {"thinking face", "思考"}, "emoji_picker.name_neutral_face": {"neutral face", "面无表情"}, "emoji_picker.name_face_with_rolling_eyes": {"face with rolling eyes", "翻白眼"}, "emoji_picker.name_sleeping_face": {"sleeping face", "睡觉"}, "emoji_picker.name_smiling_face_with_sunglasses": {"smiling face with sunglasses", "墨镜笑脸"}, "emoji_picker.name_star_struck": {"star struck", "星星眼"}, "emoji_picker.name_crying_face": {"crying face", "哭泣"}, "emoji_picker.name_pouting_face": {"pouting face", "生气"}, "emoji_picker.name_face_screaming_in_fear": {"face screaming in fear", "惊恐"}, "emoji_picker.name_partying_face": {"partying face", "庆祝"}, "emoji_picker.name_waving_hand": {"waving hand", "挥手"}, "emoji_picker.name_thumbs_up": {"thumbs up", "赞"}, "emoji_picker.name_thumbs_down": {"thumbs down", "踩"}, "emoji_picker.name_clapping_hands": {"clapping hands", "鼓掌"}, "emoji_picker.name_raising_hands": {"raising hands", "举双手"}, "emoji_picker.name_folded_hands": {"folded hands", "合十"}, "emoji_picker.name_ok_hand": {"ok hand", "好手势"}, "emoji_picker.name_victory_hand": {"victory hand", "胜利手势"}, "emoji_picker.name_handshake": {"handshake", "握手"}, "emoji_picker.name_flexed_biceps": {"flexed biceps", "肌肉"}, "emoji_picker.name_writing_hand": {"writing hand", "写字"}, "emoji_picker.name_eyes": {"eyes", "眼睛"}, "emoji_picker.name_person": {"person", "人物"}, "emoji_picker.name_crown": {"crown", "王冠"}, "emoji_picker.name_performing_arts_masks": {"performing arts masks", "戏剧面具"}, "emoji_picker.name_woman_dancing": {"woman dancing", "跳舞"}, "emoji_picker.name_rose": {"rose", "玫瑰"}, "emoji_picker.name_wilted_flower": {"wilted flower", "枯萎的花"}, "emoji_picker.name_cherry_blossom": {"cherry blossom", "樱花"}, "emoji_picker.name_crescent_moon": {"crescent moon", "新月"}, "emoji_picker.name_star": {"star", "星星"}, "emoji_picker.name_fire": {"fire", "火"}, "emoji_picker.name_cloud_with_rain": {"cloud with rain", "雨云"}, "emoji_picker.name_snowflake": {"snowflake", "雪花"}, "emoji_picker.name_black_cat": {"black cat", "黑猫"}, "emoji_picker.name_bat": {"bat", "蝙蝠"}, "emoji_picker.name_black_bird": {"black bird", "黑鸟"}, "emoji_picker.name_dove": {"dove", "鸽子"}, "emoji_picker.name_fallen_leaf": {"fallen leaf", "落叶"}, "emoji_picker.name_evergreen_tree": {"evergreen tree", "常青树"}, "emoji_picker.name_water_wave": {"water wave", "海浪"}, "emoji_picker.name_rainbow": {"rainbow", "彩虹"}, "emoji_picker.name_wine_glass": {"wine glass", "红酒杯"}, "emoji_picker.name_clinking_glasses": {"clinking glasses", "碰杯"}, "emoji_picker.name_hot_beverage": {"hot beverage", "热饮"}, "emoji_picker.name_teacup": {"teacup", "茶杯"}, "emoji_picker.name_shortcake": {"shortcake", "蛋糕"}, "emoji_picker.name_chocolate_bar": {"chocolate bar", "巧克力"}, "emoji_picker.name_strawberry": {"strawberry", "草莓"}, "emoji_picker.name_grapes": {"grapes", "葡萄"}, "emoji_picker.name_red_apple": {"red apple", "红苹果"}, "emoji_picker.name_cheese_wedge": {"cheese wedge", "奶酪"}, "emoji_picker.name_baguette": {"baguette", "法棍"}, "emoji_picker.name_bread": {"bread", "面包"}, "emoji_picker.name_violin": {"violin", "小提琴"}, "emoji_picker.name_musical_keyboard": {"musical keyboard", "键盘"}, "emoji_picker.name_guitar": {"guitar", "吉他"}, "emoji_picker.name_drum": {"drum", "鼓"}, "emoji_picker.name_microphone": {"microphone", "麦克风"}, "emoji_picker.name_musical_note": {"musical note", "音符"}, "emoji_picker.name_musical_notes": {"musical notes", "多个音符"}, "emoji_picker.name_party_popper": {"party popper", "礼花"}, "emoji_picker.name_trophy": {"trophy", "奖杯"}, "emoji_picker.name_artist_palette": {"artist palette", "调色盘"}, "emoji_picker.name_chess_pawn": {"chess pawn", "棋子"}, "emoji_picker.name_clapper_board": {"clapper board", "场记板"}, "emoji_picker.name_castle": {"castle", "城堡"}, "emoji_picker.name_church": {"church", "教堂"}, "emoji_picker.name_tower": {"tower", "塔"}, "emoji_picker.name_night_with_stars": {"night with stars", "星夜"}, "emoji_picker.name_locomotive": {"locomotive", "火车"}, "emoji_picker.name_airplane": {"airplane", "飞机"}, "emoji_picker.name_automobile": {"automobile", "汽车"}, "emoji_picker.name_sailboat": {"sailboat", "帆船"}, "emoji_picker.name_world_map": {"world map", "世界地图"}, "emoji_picker.name_snow_capped_mountain": {"snow capped mountain", "雪山"}, "emoji_picker.name_sunrise": {"sunrise", "日出"}, "emoji_picker.name_ferris_wheel": {"ferris wheel", "摩天轮"}, "emoji_picker.name_candle": {"candle", "蜡烛"}, "emoji_picker.name_old_key": {"old key", "旧钥匙"}, "emoji_picker.name_scroll": {"scroll", "卷轴"}, "emoji_picker.name_envelope": {"envelope", "信封"}, "emoji_picker.name_paperclip": {"paperclip", "回形针"}, "emoji_picker.name_pushpin": {"pushpin", "图钉"}, "emoji_picker.name_calendar": {"calendar", "日历"}, "emoji_picker.name_light_bulb": {"light bulb", "灯泡"}, "emoji_picker.name_bell": {"bell", "铃铛"}, "emoji_picker.name_locked": {"locked", "锁"}, "emoji_picker.name_gem_stone": {"gem stone", "宝石"}, "emoji_picker.name_hourglass": {"hourglass", "沙漏"}, "emoji_picker.name_red_heart": {"red heart", "红心"}, "emoji_picker.name_black_heart": {"black heart", "黑心"}, "emoji_picker.name_broken_heart": {"broken heart", "心碎"}, "emoji_picker.name_sparkles": {"sparkles", "闪光"}, "emoji_picker.name_check_mark_button": {"check mark button", "勾选"}, "emoji_picker.name_cross_mark": {"cross mark", "叉号"}, "emoji_picker.name_exclamation_mark": {"exclamation mark", "感叹号"}, "emoji_picker.name_question_mark": {"question mark", "问号"}, "emoji_picker.name_hundred_points": {"hundred points", "满分"}, "emoji_picker.name_diamond_suit": {"diamond suit", "方块"}, "emoji_picker.name_fleur_de_lis": {"fleur de lis", "鸢尾花纹"}, "emoji_picker.name_red_triangle": {"red triangle", "红三角"}, "pinned_messages.title": {"Pinned messages (%d)", "置顶消息(%d)"}, "pinned_messages.empty": {"No pinned messages", "没有置顶消息"}, "pinned_messages.unpin": {"Unpin %s's message", "取消置顶 %s 的消息"}, "thread_panel.title": {"Thread", "话题"}, "thread_panel.close": {"Close thread", "关闭话题"}, "thread_panel.replies": {"%d replies", "%d 条回复"}, "thread_panel.reply": {"Reply in thread", "在话题中回复"}, "thread_panel.send": {"Send", "发送"}, "mail_list.empty": {"No mail", "没有邮件"}, "mail_list.star": {"Star %s", "星标 %s"}, "mail_list.starred": {"Starred", "已加星标"}, "mail_list.unread": {"Unread", "未读"}, "mail_list.attachments": {"%d attachments", "%d 个附件"}, "mail_list.date": {"Jan 2", "1月2日"}, "mail_reader.to": {"To:", "收件人:"}, "mail_reader.cc": {"Cc:", "抄送:"}, "mail_reader.date": {"Mon, Jan 2 2006 15:04", "2006年1月2日 {weekday} 15:04"}, "mail_reader.attachments": {"Attachments", "附件"}, "mail_composer.label": {"New message", "新邮件"}, "mail_composer.to": {"To", "收件人"}, "mail_composer.cc": {"Cc", "抄送"}, "mail_composer.bcc": {"Bcc", "密送"}, "mail_composer.subject": {"Subject", "主题"}, "mail_composer.body": {"Message", "正文"}, "mail_composer.send": {"Send", "发送"}, "mail_composer.attach": {"Attach", "添加附件"}, "mail_composer.discard": {"Discard", "舍弃"}, "mail_composer.unsaved": {"Unsaved changes", "有未保存的更改"}, "mail_composer.saved": {"Draft saved %s", "草稿已于 %s 保存"}, "recipient_input.invalid": {"%q is not an email address", "“%s”不是有效的邮箱地址"}, "recipient_input.suggestions": {"Contacts", "联系人"}, "quoted_text.showOne": {"Show quoted text (1 line)", "显示引用内容(1 行)"}, "quoted_text.show": {"Show quoted text (%d lines)", "显示引用内容(%d 行)"}, "quoted_text.hide": {"Hide quoted text", "隐藏引用内容"}, "snooze_picker.label": {"Snooze until", "稍后提醒"}, "snooze_picker.later": {"Later today", "今天稍晚"}, "snooze_picker.tomorrow": {"Tomorrow", "明天"}, "snooze_picker.weekend": {"This weekend", "本周末"}, "snooze_picker.nextWeek": {"Next week", "下周"}, "snooze_picker.custom": {"Pick date and time", "选择日期和时间"}, "snooze_picker.set": {"Snooze", "设定提醒"}, "snooze_picker.when": {"Mon 15:04", "{weekday} 15:04"}, "status_setter.until": {"Mon 15:04", "{weekday} 15:04"}, }) } func MessagingDate(c *ui.Context, date time.Time, key string) string { weekday := Msg(c, "calendar.weekday_long_"+strconv.Itoa(int(date.Weekday()))) return strings.ReplaceAll(date.Format(Msg(c, key)), "{weekday}", weekday) }