Преглед изворни кода

Add Chinese translations (#690)

Danilo Bargen пре 6 година
родитељ
комит
2fb4966785
2 измењених фајлова са 339 додато и 1 уклоњено
  1. 337 0
      public/i18n/zh.json
  2. 2 1
      src/app.ts

+ 337 - 0
public/i18n/zh.json

@@ -0,0 +1,337 @@
+{
+    "meta": {
+        "DESCRIPTION": "使用Threema Web从桌面端聊天,可以完全访问所有聊天记录,联系人和媒体文件。"
+    },
+    "welcome": {
+        "ABORT": "中止",
+        "CONTINUE_ANYWAY": "继续",
+        "PLEASE_SCAN": "使用Threema APP客户端扫描二维码",
+        "PLEASE_UNLOCK": "正在重连",
+        "WAITING": "等待连接",
+        "PLEASE_RELOAD": "请刷新页面后再尝试操作",
+        "RELOAD": "重新加载页面",
+        "PASSWORD": "密码",
+        "CHOOSE_PASSWORD": "如果你要保持登录状态,请在扫描二维码之前输入一个连接密码。",
+        "UNLOCK_FAILED_TEXT": "密码错误,无法恢复连接",
+        "ENTER_PASSWORD": "如要恢复之前的连接,<br>请输入密码。",
+        "UNLOCK_FAILED_TITLE": "解锁失败",
+        "ALTERNATIVELY": "或者",
+        "UNLOCK_FAILED_FORGOTTEN": "如果你想不起你的密码,请选择“忘记这个连接会话”, 然后设置一个新密码。",
+        "FORGET_SESSION": "忘记这个连接会话",
+        "FORGET_SESSION_BTN": "忘记会话",
+        "BTN_RECONNECT": "重连",
+        "BROWSER_NOT_SUPPORTED": "不支持您的浏览器",
+        "BROWSER_NOT_SUPPORTED_ANDROID": "安卓系统不支持这个浏览器",
+        "BROWSER_NOT_SUPPORTED_DETAILS": "请使用最新版的<a href='https://www.google.com/chrome/browser/desktop/' target='_blank' rel='noopener noreferrer'>谷歌Chrome浏览器</a>,<a href='https://www.mozilla.org/' target='_blank' rel='noopener noreferrer'>火狐Mozilla浏览器</a>,<a href='https://www.opera.com/' target='_blank' rel='noopener noreferrer'>欧朋Opera浏览器</a>或者<a href='https://www.apple.com/safari/' target='_blank' rel='noopener noreferrer'>Safari浏览器(仅限iOS)</a>, 使用其他浏览器可能导致无法正常使用。",
+        "SAFARI": "Safari仅与适用于iOS的Threema Web兼容。如果您使用的是Android,请使用其他浏览器。",
+        "CONNECTING": "连接中",
+        "WAITING_FOR_PUSH": "等待唤醒APP",
+        "CONNECTING_TO_APP": "正在建立和客户端的连接...",
+        "LOADING_INITIAL_DATA": "正在初始化数据...",
+        "MANUAL_START": "请开始您的连接会话",
+        "MANUAL_START_TEXT1": "推送服务不可用,您的移动设备安装了Google Play Services吗?",
+        "MANUAL_START_TEXT2": "您可以在没有Google Play Services的情况下使用Threema Web,但您需要手动开启会话;",
+        "MANUAL_START_STEP1": "打开Threema APP,点击左侧边栏中的“Threema Web”",
+        "MANUAL_START_STEP2": "点击与此浏览器关联的连接会话",
+        "MANUAL_START_STEP3": "选择“开始连接”来开启连接",
+        "MORE_ABOUT_WEB": "关于",
+        "LOCAL_STORAGE_MISSING_DETAILS": "无法使用LocalStorage。如果您的浏览器设置了禁用cookie,或者安装了阻止访问LocalStorage的浏览器插件,则可能出现这种情况。请在浏览器设置中允许访问LocalStorage,或禁用可能影响读写LocalStorage的相关插件。",
+        "LOCAL_STORAGE_EXCEPTION_DETAILS": "访问LocalStorage时出现严重错误:{errorMsg} .<br>请尝试重新启动浏览器。",
+        "ALREADY_CONNECTED": "已经连接成功",
+        "ALREADY_CONNECTED_DETAILS": "您已经在其他网页选项卡或者其他窗口里连接了Threema web。",
+        "VERSION": "版本",
+        "BACKGROUND_IMAGE": "背景图片",
+        "HELP_TRANSLATE": "帮助我们翻译"
+    },
+    "connecting": {
+        "CONNECTION_PROBLEMS": "连接问题",
+        "GENERIC": "正在尝试重连...",
+        "RECOVERING_CONNECTION": "正在尝试恢复连接...",
+        "WAITING_FOR_APP": "等待唤醒客户端...",
+        "WAITING_FOR_APP_MANUAL": "Google Play Services没有安装,请手动开启会话。",
+        "CONNECTING_TO_SERVER": "正在连接到服务器...",
+        "CONNECTING_TO_APP": "正在建立与客户端之间的连接...",
+        "CONNECTION_CLOSED": "到服务器的连接已经被关系",
+        "RECONNECT_FAILED": "与客户端连接失败"
+    },
+    "troubleshooting": {
+        "SLOW_CONNECT": "连接似乎用了比平时更多的时间...",
+        "APP_STARTED": "您打开Threema手机客户端了吗?",
+        "SESSION_DELETED": "您是否在Threema客户端里删除了这个连接会话?",
+        "PHONE_ONLINE": "您的手机能正常上网吗?",
+        "WEBCLIENT_ENABLED": "您的Threema手机客户端上是否启用了web端登录?",
+        "PLUGIN": "您的浏览器中是否安装了一个阻止WebRTC通信的隐私插件?",
+        "ADBLOCKER": "您是否使用了阻止WebRTC通信的广告拦截软件?",
+        "PLEASE_UPDATE_APP": "请确保您使用的是Threema APP的 <a href=\"https://threema.ch/en/whats-new\" target=\"_blank\">latest version</a>!",
+        "USE_ARCHIVE_VERSION": "或者您可以使用Threema APP<a href=\"{archiveUrl}\">之前的版本</a>。"
+    },
+    "common": {
+        "YES": "是",
+        "SEND": "发送",
+        "CLOSE": "关闭",
+        "SESSION_CLOSE": "关闭连接",
+        "CONFIRM_CLOSE_BODY": "您确定要关闭此次连接吗?",
+        "SESSION_DELETE": "删除连接",
+        "CONFIRM_DELETE_BODY": "您确定要删除这个保存过的连接?",
+        "CONFIRM_DELETE_CLOSE_BODY": "您确定要关闭并删除这个保存的连接?",
+        "WARNING": "警告",
+        "ERROR": "错误",
+        "CANCEL": "取消",
+        "NO": "否",
+        "OK": "OK",
+        "DELETE": "删除",
+        "EDIT": "编辑",
+        "ARE_YOU_SURE": "您确定?",
+        "SAVE": "保存",
+        "DONE": "完成",
+        "MODIFY": "编辑",
+        "NOTE": "注意:"
+    },
+    "messenger": {
+        "VERIFICATION_LEVEL": "验证级别",
+        "VERIFICATION_LEVEL2_EXPLAIN": "已使用电子邮件或短信验证此人的身份。",
+        "VERIFICATION_LEVEL3_EXPLAIN": "您已经通过扫描对方的二维码验证了此人的身份",
+        "VERIFICATION_LEVEL1_EXPLAIN": "无法保证此人的资料真实性",
+        "VERIFICATION_LEVEL2_WORK_EXPLAIN": "Threema管理员已认证此人的资料信息属实。",
+        "COMPOSE_MESSAGE_DRAGOVER": "拖放文件发送",
+        "COMPOSE_MESSAGE": "输入信息或者拖放一个文件",
+        "UNREAD_MESSAGES": "未读信息",
+        "IS_TYPING": "正在输入...",
+        "SEARCH": "搜索",
+        "CONVERSATIONS": "聊天",
+        "CONTACTS": "好友",
+        "NO_CONVERSATIONS_FOUND": "没有找到相关聊天",
+        "LOADING_CONVERSATIONS": "正在加载聊天...",
+        "ABOUT": "关于",
+        "SETTINGS": "设置",
+        "HELP": "帮助",
+        "NO_CONTACTS_FOUND": "没有匹配到相关好友",
+        "ACKNOWLEDGE": "同意",
+        "DECLINE": "不同意",
+        "DELETE": "删除",
+        "QUOTE": "引用",
+        "MESSAGE_NOTIFICATION_SUBJECT": "{messageCount, plural, other {{messageCount} Threema 消息来自}}",
+        "MY_THREEMA_ID": "我的Threema ID",
+        "MY_PUBLIC_NICKNAME": "昵称",
+        "MEMBER_OF_GROUPS": "是这些群组的群员",
+        "MEMBER_OF_DISTRIBUTION_LISTS": "是这些列表的成员",
+        "GROUP_MEMBERS": "群成员",
+        "KEY_FINGERPRINT": "指纹",
+        "GROUP_NAME": "群组名称",
+        "GROUP_CREATOR": "群主",
+        "GROUP_ROLE_NORMAL": "成员",
+        "GROUP_ROLE_CREATOR": "创建人",
+        "DOWNLOAD": "下载",
+        "DOWNLOADING": "下载中...",
+        "COPY": "复制",
+        "COPIED": "文本已经复制到剪切板",
+        "COPY_ERROR": "错误:无法将文本复制到剪切板",
+        "MSG_HISTORY": "消息记录",
+        "MSG_HISTORY_CREATED": "已创建",
+        "MSG_HISTORY_SENT": "已发送",
+        "MSG_HISTORY_DELIVERED": "已接收",
+        "MSG_HISTORY_READ": "已读",
+        "MSG_HISTORY_ACKED": "已确认",
+        "MSG_HISTORY_MODIFIED": "已编辑",
+        "NAVIGATE": "导航",
+        "CONFIRM_FILE_SEND": "发送给 «{senderName}»?",
+        "CONFIRM_FILE_CAPTION": "可选标题",
+        "CONFIRM_SEND_AS_FILE": "作为文件发送",
+        "CONFIRM_DELETE_TITLE": "删除消息",
+        "ADD_CONTACT": "添加好友",
+        "ADD_CONTACT_THREEMA_ID": "输入Threema ID",
+        "RECEIVER_AVATAR": "头像",
+        "FIRST_NAME": "名",
+        "LAST_NAME": "姓",
+        "NAME": "名字",
+        "SYSTEM_CONTACT": "系统联系人",
+        "EMAIL_ADDRESSES": "邮件",
+        "PHONE_NUMBERS": "电话号码",
+        "EDIT_RECEIVER": "编辑个人资料",
+        "CREATE_GROUP": "新群组",
+        "GROUP_SELECT_CONTACTS": "选择成员",
+        "GROUP_DELETE": "删除群组",
+        "GROUP_DELETE_REALLY": "您确定要完全删除这个群吗?所有成员都会被解散。",
+        "GROUP_LEAVE": "退出群",
+        "GROUP_REALLY_LEAVE_ADMIN": "您是这个群的群主,如果您退出了这个群,这个群就会无人管理,但是群成员依然可以正常聊天。退出之后不能撤回操作。",
+        "GROUP_REALLY_LEAVE": "您确定要离开这个群吗?",
+        "GROUP_SYNC": "重新同步群组",
+        "GROUP_SYNC_DONE": "群组已同步",
+        "SCROLL_DOWN": "向下滚动",
+        "UPLOAD_AVATAR": "上传头像",
+        "CREATE_DISTRIBUTION_LIST": "新建分组",
+        "DISTRIBUTION_LIST_NAME": "名称",
+        "DISTRIBUTION_LIST_MEMBERS": "成员",
+        "DISTRIBUTION_LIST_SELECT_MEMBERS": "选择成员",
+        "DISTRIBUTION_LIST_DELETE": "移除分组",
+        "DISTRIBUTION_LIST_DELETE_REALLY": "您确定要移除这个分组吗?",
+        "DRAFT": "草稿",
+        "PRIVATE": "隐私的",
+        "PRIVATE_CHAT": "私人聊天",
+        "PRIVATE_CHAT_DESCRIPTION": "Threema Web不支持私人聊天",
+        "MESSAGE_TOO_LONG_SPLIT_SUBJECT": "拆分信息",
+        "MESSAGE_TOO_LONG_SPLIT_BODY": "每条消息不能发送超过{max}个字符,是否要将其拆分为{count}个单独的消息?",
+        "BALLOT_MESSAGES_NOT_SUPPORTED": "Threema Web尚未支持Polls",
+        "UNKNOWN_MESSAGE_TYPE": "未知消息类型",
+        "NICKNAME": "昵称",
+        "THREEMA_WORK_CONTACT": "Threema工作用户",
+        "THREEMA_HOME_CONTACT": "Threema隐私联系人",
+        "THREEMA_BLOCKED_RECEIVER": "被屏蔽",
+        "DELETE_THREAD": "删除聊天记录",
+        "DELETE_THREAD_MESSAGE": "{count, plural, other {您确定要删除这{count}条记录?删除之后无法恢复.}}",
+        "MUTED_NONE": "不通知",
+        "MUTED_MENTION_ONLY": "只在提及我的时候通知我",
+        "MUTED_SILENT": "无声通知",
+        "ALL": "所有",
+        "LOADING_MESSAGES": "加载信息中...",
+        "PINNED_CONVERSATION": "聊天已被置顶,点击取消置顶。",
+        "UNPINNED_CONVERSATION": "聊天没有置顶,点击置顶。",
+        "PINNED_CONVERSATION_OK": "聊天已置顶",
+        "PINNED_CONVERSATION_ERROR": "聊天不能置顶",
+        "UNPINNED_CONVERSATION_OK": "取消了聊天置顶",
+        "UNPINNED_CONVERSATION_ERROR": "聊天不能取消置顶"
+    },
+    "messageStates": {
+        "WE_ACK": "你点了赞",
+        "WE_DEC": "你点了踩",
+        "USER_ACK": "对方点了赞",
+        "USER_DEC": "对方点了踩",
+        "PENDING": "消息正在发送到您的设备",
+        "SENDING": "消息正在发送到服务器",
+        "SENT": "消息已经被发送到服务器",
+        "DELIVERED": "消息已经送达对方的设备",
+        "READ": "消息已读",
+        "FAILED": "消息无法发送",
+        "TIMEOUT": "消息无法发送到您的设备"},
+    "messageTypes": {
+        "AUDIO_MESSAGE": "音频消息",
+        "FILE_MESSAGE": "文件消息",
+        "image": "图片",
+        "video": "视频",
+        "file": "文件",
+        "audio": "声音",
+        "location": "位置",
+        "ballot": "选票",
+        "gif": "GIF"
+    },
+    "validationError": {
+        "modifyReceiver": {
+            "unknown": "发生未知错误",
+            "badRequest": "请求无效(协议错误?)",
+            "timeout": "请求超时",
+            "internalError": "发生内部错误",
+            "invalidAvatar": "无效的头像",
+            "invalidIdentity": "无效的Threema ID",
+            "invalidContact": "无效的联系人ID",
+            "invalidGroup": "无效的群ID",
+            "invalidDistributionList": "无效的分组ID",
+            "notAllowed": "不允许修改",
+            "notAllowedLinked": "好友不能修改,因为已经跟系统联系人相关联",
+            "notAllowedBusiness": "头像无法更改:这是一个Threema官方账号",
+            "disabledByPolicy": "管理员禁用功能",
+            "syncFailed": "群组同步失败",
+            "noMembers": "没有成员",
+            "alreadyLeft": "你已经退出了这个群"
+        }
+    },
+    "error": {
+        "NO_CONNECTION": "连接错误,请稍后再试。",
+        "MESSAGE_NOT_SUPPORTED": "«{receiverName}» 无法接收到此消息。",
+        "AUDIO_MESSAGES_NOT_SUPPORTED": "«{receiverName}» 无法接收音频消息",
+        "FILE_MESSAGES_NOT_SUPPORTED": "«{receiverName}» 不支持接收文件。",
+        "CONTACT_BLOCKED":  "不能向拉黑的联系人发送消息",
+        "ERROR_OCCURRED": "发生错误",
+        "FILE_TOO_LARGE": "无法发送大于{maxmb} M的文件",
+        "FILE_TOO_LARGE_WEB": "这个文件大于15M,无法通过Threema Web发送",
+        "FILE_TOO_LARGE_GENERIC": "文件太大无法发送",
+        "TEXT_TOO_LONG": "此消息太长且无法发送(最大长度为{max}个字符)。",
+        "NOTIFICATION_PERMISSION_DENIED": "您必须手动授予Threema Web通知权限才能接收通知。",
+        "NOTIFICATION_PERMISSION_DENIED_LEARN_MORE": "了解更多",
+        "NOTIFICATION_API_NOT_AVAILABLE": "您的浏览器不支持通知",
+        "BLOB_DOWNLOAD_FAILED": "无法下载文件",
+        "BLOB_DECRYPT_FAILED": "无法解密文件"
+    },
+    "mimeTypes": {
+        "apk": "安卓软件包",
+        "audio": "音频文件",
+        "certificate": "数字证书",
+        "codes": "源代码",
+        "compressed": "档案",
+        "contact": "联系人",
+        "event": "日历活动",
+        "font": "字体",
+        "image": "图像文件",
+        "pdf": "PDF文档",
+        "presentation": "演示",
+        "spreadsheet": "表格",
+        "text": "文本文件",
+        "video": "视频文件",
+        "word": "文本文档"
+    },
+    "about": {
+        "ALL_RIGHTS_RESERVED": "版权所有.",
+        "LICENSES": "许可",
+        "OPEN_SOURCE": "Threema web项目是完全开源的。",
+        "SOURCE_CODE": "GitHub",
+        "EMOJI_ART": "表情符号由<a target=\"_blank\" href=\"http://emojione.com\">EmojiOne</a>提供",
+        "NOTIFICATION_SOUNDS": "声音文件和副本; 2012 <a target=\"_blank\" href=\"https://www.soundsnap.com/licence\">soundsnap.com</a> - 根据Soundsnap许可证获得许可",
+        "LICENSE_LINK_BEFORE": "可以找到使用过的开源组件的许可证",
+        "LICENSE_LINK_TEXT": "在源代码里",
+        "CHANGELOG": "更新日志",
+        "CHANGELOG_LINK_BEFORE": "找不到更新日志",
+        "CHANGELOG_LINK_TEXT": "在GitHub",
+        "CHANGELOG_LINK_AFTER": "。"
+    },
+    "settings": {
+        "SETTINGS": "设置",
+        "notifications": {
+            "NOTIFICATIONS": "通知",
+            "SHOW_NOTIFICATIONS": "显示桌面通知",
+            "SHOW_PREVIEW": "通知里显示消息详情",
+            "PLAY_SOUND": "播放声音"
+        }
+    },
+    "version": {
+        "NEW_VERSION": "有可用的新版本",
+        "NEW_VERSION_BODY": "Threema web ({version}) 新版本已发布,查看{changelog}了解更新详情,点击“OK”确认更新。"
+    },
+    "voip": {
+        "CALL_MISSED": "未接来电",
+        "CALL_FINISHED_IN": "呼入",
+        "CALL_FINISHED_OUT": "呼出",
+        "CALL_REJECTED": "已拒绝",
+        "CALL_ABORTED": "通话中断"
+    },
+    "battery": {
+        "CHARGING": "充电中: {percent}%",
+        "DISCHARGING": "未充电:{percent}%",
+        "ALERT": "未充电:{percent}%",
+        "LEVEL_LOW": "您的设备电量低({%}%)。",
+        "LEVEL_CRITICAL": "您的设备电量已经严重不足 ({percent}%)!"
+    },
+    "date": {
+        "YESTERDAY": "昨天",
+        "month_short": {
+            "JAN": "一月",
+            "FEB": "二月",
+            "MAR": "三月",
+            "APR": "四月",
+            "MAY": "五月",
+            "JUN": "六月",
+            "JUL": "七月",
+            "AUG": "八月",
+            "SEP": "九月",
+            "OCT": "十月",
+            "NOV": "十一月",
+            "DEC": "十二月"
+        }
+    },
+    "connection": {
+        "SESSION_CLOSED_TITLE": "连接关闭",
+        "SESSION_STOPPED": "连接已被您的设备终止",
+        "SESSION_DELETED": "连接已被您的设备删除。",
+        "WEBCLIENT_DISABLED": "您的设备禁用了Threema web端登录。",
+        "SESSION_REPLACED": "您在其他地方登录了Threema web,本次连接会话已停止。",
+        "SESSION_ERROR": "协议错误导致连接关闭"
+    }
+}

+ 2 - 1
src/app.ts

@@ -95,10 +95,11 @@ angular.module('3ema', [
             suffix: '.json',
         })
         .uniformLanguageTag('java')
-        .registerAvailableLanguageKeys(['en', 'de', 'fr'], {
+        .registerAvailableLanguageKeys(['en', 'de', 'fr', 'zh'], {
             'en_*': 'en',
             'de_*': 'de',
             'fr_*': 'fr',
+            'zh_*': 'zh',
         })
         .determinePreferredLanguage()
         .fallbackLanguage('en');