From eb93df853a234c721951258f53345c4c001f572a Mon Sep 17 00:00:00 2001 From: achilles-kosun <44356695+achilles-kosun@users.noreply.github.com> Date: Thu, 25 Oct 2018 03:10:44 +0800 Subject: [PATCH] [I18n] Add Simplified Chinese(zh-CN) locale (#505) --- app/i18n/index.js | 3 +- app/i18n/locales/en.js | 2 +- app/i18n/locales/pt-BR.js | 2 +- app/i18n/locales/ru.js | 2 +- app/i18n/locales/zh-CN.js | 349 ++++++++++++++++++++++++++++ app/views/RoomInfoEditView/index.js | 2 +- app/views/SettingsView/index.js | 3 + 7 files changed, 358 insertions(+), 5 deletions(-) create mode 100644 app/i18n/locales/zh-CN.js diff --git a/app/i18n/index.js b/app/i18n/index.js index 5cd2cb383..1b32927da 100644 --- a/app/i18n/index.js +++ b/app/i18n/index.js @@ -2,12 +2,13 @@ import I18n from 'react-native-i18n'; import en from './locales/en'; import ru from './locales/ru'; import ptBR from './locales/pt-BR'; +import zhCN from './locales/zh-CN'; I18n.fallbacks = true; I18n.defaultLocale = 'en'; I18n.translations = { - en, ru, 'pt-BR': ptBR + en, ru, 'pt-BR': ptBR, 'zh-CN': zhCN }; export default I18n; diff --git a/app/i18n/locales/en.js b/app/i18n/locales/en.js index 7ca32afe0..76ebecd21 100644 --- a/app/i18n/locales/en.js +++ b/app/i18n/locales/en.js @@ -120,7 +120,7 @@ export default { Choose: 'Choose', Choose_from_library: 'Choose from library', Code: 'Code', - Colaborative: 'Colaborative', + Collaborative: 'Collaborative', Connect: 'Connect', Connect_to_a_server: 'Connect to a server', Connected: 'Connected', diff --git a/app/i18n/locales/pt-BR.js b/app/i18n/locales/pt-BR.js index 41088e5f6..9b15e73d2 100644 --- a/app/i18n/locales/pt-BR.js +++ b/app/i18n/locales/pt-BR.js @@ -127,7 +127,7 @@ export default { Choose: 'Escolher', Choose_from_library: 'Escolha da biblioteca', Code: 'Código', - Colaborative: 'Colaborativo', + Collaborative: 'Colaborativo', Connect: 'Conectar', Connect_to_a_server: 'Conectar a um servidor', Connected: 'Conectado', diff --git a/app/i18n/locales/ru.js b/app/i18n/locales/ru.js index 52183f0f0..b7bf873a5 100644 --- a/app/i18n/locales/ru.js +++ b/app/i18n/locales/ru.js @@ -114,7 +114,7 @@ export default { Choose: 'Выбрать', Choose_from_library: 'Выбрать из библиотеки', Code: 'Код', - Colaborative: 'Совместный', + Collaborative: 'Совместный', Connect: 'Соединение', Connected_to: 'Подключен к', Connecting: 'Соединение', diff --git a/app/i18n/locales/zh-CN.js b/app/i18n/locales/zh-CN.js new file mode 100644 index 000000000..355435e37 --- /dev/null +++ b/app/i18n/locales/zh-CN.js @@ -0,0 +1,349 @@ +export default { + '1_online_member': '1 人在线', + '1_person_reacted': '1 人回复了', + '1_user': '1 位用户', + 'error-action-not-allowed': '不允许 {{action}}', + 'error-application-not-found': '没有找到应用', + 'error-archived-duplicate-name': '已存在名为 {{room_name}} 的已归档频道', + 'error-avatar-invalid-url': '头像地址不合法: {{url}}', + 'error-avatar-url-handling': '将 {{username}} 的头像设置为URL({{url}})时发送了错误', + 'error-cant-invite-for-direct-room': '私人对话中不能邀请其他用户', + 'error-could-not-change-email': 'email 不能修改', + 'error-could-not-change-name': 'name 不能修改', + 'error-could-not-change-username': 'username 不能修改', + 'error-delete-protected-role': '不能删除被保护角色', + 'error-department-not-found': '部门没有找到', + 'error-direct-message-file-upload-not-allowed': '私人对话中不能分享文件', + 'error-duplicate-channel-name': '已经存在名为 {{channel_name}} 的频道', + 'error-email-domain-blacklisted': '邮箱域名已被禁止', + 'error-email-send-failed': '正尝试将错误发送到email: {{message}}', + 'error-field-unavailable': '{{field}} 已被使用 :(', + 'error-file-too-large': '文件太大', + 'error-importer-not-defined': 'importer 定义不正确, Import class 丢失.', + 'error-input-is-not-a-valid-field': '{{input}} 不是合法的 {{field}}', + 'error-invalid-actionlink': '无效的 action link', + 'error-invalid-arguments': '无效的参数', + 'error-invalid-asset': '无效的资源', + 'error-invalid-channel': '无效的频道', + 'error-invalid-channel-start-with-chars': '无效的频道. 已 @ 或 # 开始', + 'error-invalid-custom-field': '无效的自定义字段', + 'error-invalid-custom-field-name': '无效的自定义字段名. 只能包含 字母, 数字, 中线(-) and 下划线(_).', + 'error-invalid-date': '无效的日期', + 'error-invalid-description': '无效的描述', + 'error-invalid-domain': '无效的域名', + 'error-invalid-email': '无效的 email {{emai}}', + 'error-invalid-email-address': '无效的 email 地址', + 'error-invalid-file-height': '无效的文件长度', + 'error-invalid-file-type': '无效的文件类型', + 'error-invalid-file-width': '无效的文件宽度', + 'error-invalid-from-address': '你从该地址通知了一个无效的人.', + 'error-invalid-integration': '无效的 integration', + 'error-invalid-message': '无效的 message', + 'error-invalid-method': '无效的 method', + 'error-invalid-name': '无效的 name', + 'error-invalid-password': '无效的 password', + 'error-invalid-redirectUri': '无效的 redirectUri', + 'error-invalid-role': '无效的角色', + 'error-invalid-room': '无效的房间', + 'error-invalid-room-name': '{{room_name}} 不是合法的房间名', + 'error-invalid-room-type': '{{type}} 不是合法的房间类型.', + 'error-invalid-settings': '无效的设置', + 'error-invalid-subscription': '无效的订阅', + 'error-invalid-token': '无效的 token', + 'error-invalid-triggerWords': '无效的 triggerWords', + 'error-invalid-urls': '无效的 URLs', + 'error-invalid-user': '无效的 user', + 'error-invalid-username': '无效的 username', + 'error-invalid-webhook-response': 'webhook 地址响应状态不是200', + 'error-message-deleting-blocked': '消息删除被阻塞', + 'error-message-editing-blocked': '消息编辑被阻塞', + 'error-message-size-exceeded': '消息大小超过了最大允许大小', + 'error-missing-unsubscribe-link': '您必须提供[取消订阅]链接.', + 'error-no-tokens-for-this-user': '这个用户没有Token', + 'error-not-allowed': '不允许', + 'error-not-authorized': '未授权', + 'error-push-disabled': 'Push 被禁用', + 'error-remove-last-owner': '这是最后一个所有者。请在删除这个之前设置一个新所有者。', + 'error-role-in-use': '无法删除角色,因为它在使用中', + 'error-role-name-required': '角色名称是必需的', + 'error-the-field-is-required': '字段 {{field}} 是必需的。', + 'error-too-many-requests': '错误,请求太多。请慢一点。在再次尝试之前,必须等待{{seconds}}秒。', + 'error-user-is-not-activated': '用户未被激活', + 'error-user-has-no-roles': '用户没有角色', + 'error-user-limit-exceeded': '尝试邀请到 #channel_name 的用户数量超过了管理员设置的限制', + 'error-user-not-in-room': '用户不在这个房间', + 'error-user-registration-custom-field': 'error-user-registration-custom-field', + 'error-user-registration-disabled': '禁用用户注册', + 'error-user-registration-secret': '用户注册只允许通过私密URL', + 'error-you-are-last-owner': '你是最后一个所有者。请在离开房间前安排好新主人。', + Actions: '操作', + activity: '活动', + Activity: '按活动排序', + Add_Reaction: '增加回复', + Add_Server: '添加服务器', + Add_user: '添加用户', + Alert: '警告', + alert: '警告', + alerts: '警告', + All_users_in_the_channel_can_write_new_messages: '频道中的所有用户都可以发送新消息', + All: '所有', + Allow_Reactions: '允许的回复', + Alphabetical: '字母顺序排列', + and_more: '和更多的', + and: '和', + announcement: '公告', + Announcement: '公告', + ARCHIVE: '存档', + archive: '存档', + are_typing: '正在输入', + Are_you_sure_question_mark: '你确定吗?', + Are_you_sure_you_want_to_leave_the_room: '你确定要离开房间 {{room}} 吗?', + Authenticating: '正在验证身份', + Avatar_changed_successfully: '头像更新成功!', + Avatar_Url: '头像地址', + Away: '离开', + Block_user: '阻止用户', + Broadcast_channel_Description: '只有经过授权的用户才能写新消息,但其他用户可以回复', + Broadcast_Channel: '广播频道', + Busy: '忙碌', + By_proceeding_you_are_agreeing: '继续操作,请同意我们的', + Cancel_editing: '取消编辑', + Cancel_recording: '取消录制', + Cancel: '取消', + changing_avatar: '更改头像', + creating_channel: '创建频道', + Channel_Name: '频道名', + Channels: '频道', + Chats: '聊天', + Close: '关闭', + Close_emoji_selector: '关闭emoji选择器', + Choose: '选择', + Choose_from_library: '选择库', + Code: '代码', + Collaborative: '协作', + Connect: '连接', + Connect_to_a_server: '连接到服务器', + Connected: '已连接', + Connecting: '连接中', + Copied_to_clipboard: '复制到剪贴板', + Copy_Message: '复制消息', + Copy_Permalink: '复制永久链接', + Create_account: '创建账户', + Create_Channel: '创建频道', + Create_a_new_workspace: '创建一个新的工作区', + Create: '创建', + Delete_Room_Warning: '删除一个房间将删除房间内的所有消息。这是不可逆转的.', + delete: '删除', + Delete: '删除', + DELETE: '删除', + description: '描述', + Description: '描述', + Disable_notifications: '禁用消息通知', + Direct_Messages: '私信', + Do_you_really_want_to_key_this_room_question_mark: '你真的想要{{key}}这个房间吗?', + edit: '编辑', + erasing_room: '正抹去房间', + Edit: '编辑', + Email_or_password_field_is_empty: '邮件或密码字段为空', + Email: '邮箱', + Enable_notifications: '开启消息通知', + Everyone_can_access_this_channel: '每个人都可以进入这个频道', + Error_uploading: '错误上传', + Favorites: '最喜欢的', + Files: '文件', + Finish_recording: '完成录制', + For_your_security_you_must_enter_your_current_password_to_continue: '为了安全起见,您必须输入当前密码才能继续', + Forgot_my_password: '忘记密码', + Forgot_password_If_this_email_is_registered: '如果这封邮件已注册,我们将发送如何重置密码的说明。如果您没有立即收到电子邮件,请回来再试一次。', + Forgot_password: '忘记密码', + Forgot_Password: '忘记密码', + Group_by_favorites: '按喜好分组', + Group_by_type: '按类型分组', + Has_joined_the_channel: '已加入频道', + Has_left_the_channel: '已离开频道', + I_have_an_account: '我有帐户', + Invisible: '看不见的', + Invite: '邀请', + is_a_valid_RocketChat_instance: '是一个有效的 Rocket.Chat 实例', + is_not_a_valid_RocketChat_instance: '不是有效的 Rocket.Chat 实例', + is_typing: '正在输入', + Join_the_community: '加入社区', + Join: '加入', + Just_invited_people_can_access_this_channel: '刚被邀请的人可以进入这个频道', + Language: '语言', + last_message: '最后一条消息', + Leave_channel: '离开频道', + leaving_room: '离开房间', + leave: '离开', + Livechat: '即时聊天', + Login: '登录', + Logout: '注销', + Members: '成员', + Mentioned_Messages: '提到的信息', + mentioned: '提到', + Mentions: '提到', + Message_accessibility: '{{time}}来自{{user}}的消息: {{message}}', + Message_actions: '消息操作', + Message_pinned: '消息被订住', + Message_removed: '消息被删除', + Messages: '消息', + Microphone_Permission_Message: 'Rocket Chat需要访问您的麦克风,以便您可以发送音频消息。', + Microphone_Permission: '麦克风授权', + Mute: '静音', + muted: '被静音', + My_servers: '我的服务器', + N_online_members: '{{n}} 位会员在线', + N_people_reacted: '{{n}} 人回复', + N_users: '{{n}} 位用户', + name: '名字', + Name: '名字', + New_in_RocketChat_question_mark: '还没有账号?', + New_Message: '新消息', + New_Password: '新密码', + New_Server: '新服务器', + Next: '下一步', + No_files: '没有文件', + No_mentioned_messages: '没有提到的信息', + No_pinned_messages: '没有固定的消息', + No_snippeted_messages: '没有代码片段的消息', + No_starred_messages: '没有加星标的消息', + No_announcement_provided: '没有公告.', + No_description_provided: '没有描述.', + No_topic_provided: '没有话题.', + No_Message: '没有消息', + No_Reactions: '没有回复', + Not_logged: '没有记录', + Nothing_to_save: '什么都没有保存!', + Notify_active_in_this_room: '通知这个房间的活跃用户', + Notify_all_in_this_room: '通知这个房间的所有人', + Offline: '离线', + Oops: '哎呀!', + Online: '在线', + Only_authorized_users_can_write_new_messages: '只有经过授权的用户才能写新消息', + Open_emoji_selector: '打开emoji选择器', + Open_Source_Communication: '开源沟通', + Or_continue_using_social_accounts: '或者继续使用社交账号', + Password: '密码', + Permalink_copied_to_clipboard: '永久链接已复制到剪贴板!', + Pin: '订住', + Pinned_Messages: '被订的消息', + pinned: '被订住', + Pinned: '被订', + Please_enter_your_password: '请输入密码', + Preferences_saved: '偏好已保存!', + Privacy_Policy: ' 隐私策略', + Private_Channel: '私人频道', + Private_Groups: '私人群组', + Private: '私有的', + Profile_saved_successfully: '个人资料保存成功!', + Profile: '个人资料', + Public_Channel: '公共频道', + Public: '公共', + Quote: '引用', + Reactions_are_disabled: '回复被禁用', + Reactions_are_enabled: '回复被启用', + Reactions: '回复', + Read_Only_Channel: '只读频道', + Read_Only: '只读', + Register: '注册', + Repeat_Password: '重复输入密码', + Reply: '回复', + Resend: '重新发送', + Reset_password: '重置密码', + RESET: '重置', + Roles: '角色', + Room_actions: '房间操作', + Room_changed_announcement: '{{userBy}}将房间通知改为:{{announcement}}', + Room_changed_description: '{{userBy}}将房间说明改为:{{description}}', + Room_changed_privacy: '{{userBy}}将房间类型改为:{{type}}', + Room_changed_topic: '{{userBy}}将房间主题改为:{{topic}}', + Room_Files: '房间文件', + Room_Info_Edit: '房间信息编辑', + Room_Info: '房间信息', + Room_Members: '房间成员', + Room_name_changed: '{{userBy}}将房间名称改为:{{{name}}', + SAVE: '保存', + Save_Changes: '保存更改', + Save: '保存', + saving_preferences: '保存偏好', + saving_profile: '保存配置文件', + saving_settings: '保存设置', + Search_Messages: '搜索消息', + Search: '搜索', + Select_Avatar: '选择头像', + Select_Users: '选择用户', + Send: '发送', + Send_audio_message: '发送音频信息', + Send_message: '发送消息', + Server: '服务器', + Servers: '服务器', + Settings: '设置', + Settings_succesfully_changed: '更改设置成功!', + Share_Message: '分享消息', + Share: '分享', + Sign_in_your_server: '登录你的服务器', + Sign_Up: '注册', + Snippet_Messages: '代码片段消息', + snippeted: '代码片段', + Snippets: '代码片段', + Some_field_is_invalid_or_empty: '某些字段无效或为空', + Sorting_by: '按{{key}}排序', + Star_room: '将房间标星', + Star: '加星标', + Starred_Messages: '加星标的消息', + starred: '被加星标', + Starred: '星标', + Start_of_conversation: '开始交流', + Submit: '提交', + Take_a_photo: '拍照', + tap_to_change_status: '点按即可更改状态', + Tap_to_view_servers_list: '点击查看服务器列表', + Terms_of_Service: ' 服务条款 ', + The_URL_is_invalid: '您输入的URL无效。请检查一下,再试一次!', + There_was_an_error_while_action: '{{action}}出现错误!', + This_room_is_blocked: '这个房间被锁了', + This_room_is_read_only: '这个房间是只读的', + Timezone: '时区', + Toggle_Drawer: 'Toggle_Drawer', + topic: '主题', + Topic: '主题', + Try_again: '再试一次', + Type_the_channel_name_here: '在这里输入频道名称', + unarchive: '解除封存', + UNARCHIVE: '解除封存', + Unblock_user: '解锁用户', + Unmute: '取消静音', + unmuted: '静音状态', + Unpin: '拔掉', + unread_messages: '未读消息', + Unread: '未读的', + Unread_on_top: '未读在上面', + Unstar: '取消星号标记', + Uploading: '正在上传', + User_added_by: '由{{userBy}}添加的用户 {{useradd}}', + User_has_been_key: '用户已被{{key}}!', + User_is_no_longer_role_by_: '{{userBy}}将角色 {{role}} 从用户 {{user}} 身上移除', + User_muted_by: '用户 {{userMuted}} 被 {{userBy}} 静音', + User_removed_by: '用户 {{userRemoved}} 被 {{userBy}} 移除', + User_unmuted_by: '用户 {{userUnmuted}} 被 {{userBy}} 取消静音', + User_was_set_role_by_: '用户 {{user}} 被 {{userBy}} 设置角色 {{role}}', + Username_is_empty: '用户名是空的', + Username: '用户名', + Validating: '正在验证', + Video_call: '视频电话', + Voice_call: '语音电话', + Welcome: '欢迎', + Welcome_title_pt_1: '准备起飞', + Welcome_title_pt_2: '终极聊天平台', + Welcome_to_RocketChat: '欢迎来到 Rocket.Chat', + Yes_action_it: '是的,{{action}}它!', + Yesterday: '昨天', + You_are_in_preview_mode: '您处于预览模式', + You_are_offline: '您处于离线状态', + You_can_search_using_RegExp_eg: '您可以使用RegExp进行搜索。 例如`/^text$/i`', + You_colon: '你: ', + you_were_mentioned: '你被提到了', + You_will_not_be_able_to_recover_this_message: '您将无法恢复此消息!', + you: '你', + Your_server: '你的服务器' +}; diff --git a/app/views/RoomInfoEditView/index.js b/app/views/RoomInfoEditView/index.js index 50abe8ad9..1ee7be206 100644 --- a/app/views/RoomInfoEditView/index.js +++ b/app/views/RoomInfoEditView/index.js @@ -342,7 +342,7 @@ export default class RoomInfoEditView extends LoggedView { />