From 349c6cfa2b2aab45064ca1bb79dff266bc534259 Mon Sep 17 00:00:00 2001 From: leopku Date: Fri, 24 Mar 2017 18:53:41 +0800 Subject: [PATCH 1/3] :globe_with_meridians: add chinese language file --- config/locales/zh-CN.yml | 156 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 config/locales/zh-CN.yml diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml new file mode 100644 index 0000000000..711c9d38b5 --- /dev/null +++ b/config/locales/zh-CN.yml @@ -0,0 +1,156 @@ +--- +en: + about: + about_instance: "%{instance} 源自于 Mastodon。" + about_mastodon: Mastodon 开源、自由社交网络。去中心化的商业平台替代,避免单一商业公司垄断沟通。可选择、可信任地任意交流。任何人均可以运行自己的 Mastodon 并进行无缝交流。 + about_this: 关于本实例 + business_email: '商务邮件:' + contact: 联络 + description_headline: %{domain} 是什么? + domain_count_after: 其它实例 + domain_count_before: Connected to + features: + api: 对APP 和服务开放的 API + blocks: Rich block and muting tools + characters: 每个推多达 500 字符 + chronology: 按时间线排序 + ethics: '良心之作:没有广告,没有数据追踪' + gifv: GIFV 与小视频 + privacy: 细粒度,可按推设置隐私 + public: 公共时间线 + features_headline: Mastodon 与众不同之处 + get_started: 立即开始 + learn_more: 了解更多 + links: 链接 + other_instances: 其它实例 + source_code: 源码 + status_count_after: statuses + status_count_before: Who authored + terms: 条款 + user_count_after: users + user_count_before: Home to + accounts: + follow: 关注 + followers: 粉丝 + following: 关注 + nothing_here: 神马都没有! + people_followed_by: %{name} 的关注 + people_who_follow: %{name} 的粉丝 + posts: 推 + remote_follow: Remote follow + unfollow: 取关 + application_mailer: + settings: '更改邮件设置: %{link}' + signature: 来自 %{instance} 的提醒 + view: '查看:' + applications: + invalid_url: URL 无效 + auth: + change_password: 更换密码 + didnt_get_confirmation: 没有收到确认邮件? + forgot_password: 忘记密码? + login: 登录 + logout: 登出 + register: 注册 + resend_confirmation: 重发确认邮件 + reset_password: 重置密码 + set_new_password: 设置新密码 + authorize_follow: + error: Unfortunately, there was an error looking up the remote account + follow: 关注 + prompt_html: 'You (%{self}) have requested to follow:' + title: 关注 %{acct} + datetime: + distance_in_words: + about_x_hours: "大约 %{count} 小时" + about_x_months: "大约 %{count} 月" + about_x_years: "大约 %{count} 年" + almost_x_years: "几乎 %{count} 年" + half_a_minute: 刚刚 + less_than_x_minutes: "%{count} 分" + less_than_x_seconds: 刚刚 + over_x_years: "超过 %{count} 年" + x_days: "%{count} 天" + x_minutes: "%{count} 分" + x_months: "%{count} 月" + x_seconds: "%{count} 秒" + exports: + blocks: You block + csv: CSV + follows: 关注 + storage: 媒体文件 + generic: + changes_saved_msg: 保存成功! + powered_by: 基于 %{link} 构建 + save_changes: 保存 + validation_errors: + one: 出错了!什么鬼? + other: 出错了!什么鬼? + landing_strip_html: %{name} is a user on %{domain}. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here. + notification_mailer: + digest: + body: 'Here is a brief summary of what you missed on %{instance} since your last visit on %{since}:' + mention: "%{name} mentioned you in:" + new_followers_summary: + one: You have acquired one new follower! Yay! + other: You have gotten %{count} new followers! Amazing! + subject: + one: "1 new notification since your last visit \U0001F418" + other: "%{count} new notifications since your last visit \U0001F418" + favourite: + body: 'Your status was favourited by %{name}:' + subject: "%{name} favourited your status" + follow: + body: "%{name} is now following you!" + subject: "%{name} is now following you" + follow_request: + body: "%{name} has requested to follow you" + subject: 'Pending follower: %{name}' + mention: + body: 'You were mentioned by %{name} in:' + subject: You were mentioned by %{name} + reblog: + body: 'Your status was boosted by %{name}:' + subject: "%{name} boosted your status" + pagination: + next: Next + prev: Prev + remote_follow: + acct: Enter your username@domain you want to follow from + missing_resource: Could not find the required redirect URL for your account + proceed: Proceed to follow + prompt: 'You are going to follow:' + settings: + authorized_apps: Authorized apps + back: Back to Mastodon + edit_profile: Edit profile + export: Data export + preferences: Preferences + settings: Settings + two_factor_auth: Two-factor Authentication + statuses: + open_in_web: Open in web + over_character_limit: character limit of %{max} exceeded + visibilities: + private: Only show to followers + public: Public + unlisted: Public, but do not display on the public timeline + stream_entries: + click_to_show: Click to show + reblogged: boosted + sensitive_content: Sensitive content + time: + formats: + default: "%b %d, %Y, %H:%M" + two_factor_auth: + description_html: If you enable two-factor authentication, logging in will require you to be in possession of your phone, which will generate tokens for you to enter. + disable: Disable + enable: Enable + instructions_html: "Scan this QR code into Google Authenticator or a similiar app on your phone. From now on, that app will generate tokens that you will have to enter when logging in." + plaintext_secret_html: 'Plain-text secret: %{secret}' + warning: If you cannot configure an authenticator app right now, you should click "disable" or you won't be able to login. + users: + invalid_email: The e-mail address is invalid + invalid_otp_token: Invalid two-factor code + will_paginate: + page_gap: "…" From fc9bbdfd34fcec551127482f2d27d7f73af80695 Mon Sep 17 00:00:00 2001 From: leopku Date: Fri, 24 Mar 2017 19:03:14 +0800 Subject: [PATCH 2/3] :construction: chinese translation WIP --- config/locales/zh-CN.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 711c9d38b5..d8f1e6bc9e 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -92,19 +92,19 @@ en: body: 'Here is a brief summary of what you missed on %{instance} since your last visit on %{since}:' mention: "%{name} mentioned you in:" new_followers_summary: - one: You have acquired one new follower! Yay! - other: You have gotten %{count} new followers! Amazing! + one: 有人关注你了!耶! + other: 有 %{count} 个人关注了你!别鸡动! subject: - one: "1 new notification since your last visit \U0001F418" - other: "%{count} new notifications since your last visit \U0001F418" + one: "你有一个新提醒 \U0001F418" + other: "%{count} 个提醒太多,赶快去看看 \U0001F418" favourite: - body: 'Your status was favourited by %{name}:' - subject: "%{name} favourited your status" + body: '%{name} 赞你' + subject: "%{name} 对你点赞" follow: - body: "%{name} is now following you!" - subject: "%{name} is now following you" + body: "%{name} 关注了你" + subject: "%{name} 关注了你" follow_request: - body: "%{name} has requested to follow you" + body: "%{name} 要关注你" subject: 'Pending follower: %{name}' mention: body: 'You were mentioned by %{name} in:' @@ -113,24 +113,24 @@ en: body: 'Your status was boosted by %{name}:' subject: "%{name} boosted your status" pagination: - next: Next - prev: Prev + next: 下一页 + prev: 上一页 remote_follow: acct: Enter your username@domain you want to follow from missing_resource: Could not find the required redirect URL for your account proceed: Proceed to follow prompt: 'You are going to follow:' settings: - authorized_apps: Authorized apps - back: Back to Mastodon - edit_profile: Edit profile - export: Data export - preferences: Preferences - settings: Settings - two_factor_auth: Two-factor Authentication + authorized_apps: 已授权 APP + back: 返回 + edit_profile: 更改个人信息 + export: 数据导出 + preferences: 设置 + settings: 设置 + two_factor_auth: 二步验证 statuses: - open_in_web: Open in web - over_character_limit: character limit of %{max} exceeded + open_in_web: 浏览器中打开 + over_character_limit: 超出范围 %{max} visibilities: private: Only show to followers public: Public From d5d5afff9c95542138d4d64e8765bd0af4ec8eb9 Mon Sep 17 00:00:00 2001 From: leopku Date: Sun, 26 Mar 2017 14:13:18 +0800 Subject: [PATCH 3/3] :globe_with_meridians: add simplified chinese language --- app/helpers/settings_helper.rb | 1 + config/application.rb | 2 +- config/locales/devise.zh-CN.yml | 61 ++++++++++++++++++++++++++++ config/locales/simple_form.zh-CN.yml | 42 +++++++++++++++++++ config/locales/zh-CN.yml | 38 ++++++++--------- 5 files changed, 124 insertions(+), 20 deletions(-) create mode 100644 config/locales/devise.zh-CN.yml create mode 100644 config/locales/simple_form.zh-CN.yml diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index aed8770c8a..ad8c8d467d 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -9,6 +9,7 @@ module SettingsHelper fr: 'Français', hu: 'Magyar', uk: 'Українська', + 'zh-CN': '简体中文' }.freeze def human_locale(locale) diff --git a/config/application.rb b/config/application.rb index cb009b24c1..9d32f30cbb 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,7 +24,7 @@ module Mastodon # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - config.i18n.available_locales = [:en, :de, :es, :pt, :fr, :hu, :uk] + config.i18n.available_locales = [:en, :de, :es, :pt, :fr, :hu, :uk, 'zh-CN'] config.i18n.default_locale = :en # config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb') diff --git a/config/locales/devise.zh-CN.yml b/config/locales/devise.zh-CN.yml new file mode 100644 index 0000000000..398055b362 --- /dev/null +++ b/config/locales/devise.zh-CN.yml @@ -0,0 +1,61 @@ +--- +zh-CN: + devise: + confirmations: + confirmed: 邮件已确认。 + send_instructions: 发送确认邮件 + send_paranoid_instructions: 发送确认邮件 + failure: + already_authenticated: 已登录。 + inactive: 账号未激活。 + invalid: 激活码 %{authentication_keys} 或密码无效。 + last_attempt: 因多次失败账号已锁。 + locked: 账号已锁。 + not_found_in_database: 激活码 %{authentication_keys} 或密码无效。 + timeout: 登录已过期,请重新登录。 + unauthenticated: 请先登录 + unconfirmed: 请先通过邮件激活。 + mailer: + confirmation_instructions: + subject: 'Mastodon: 激活指引' + password_change: + subject: 'Mastodon: 密码变更' + reset_password_instructions: + subject: 'Mastodon: 密码重置指引' + unlock_instructions: + subject: 'Mastodon: 账号解锁指引' + omniauth_callbacks: + failure: 从 %{kind} 授权失败:"%{reason}" 。 + success: 成功从 %{kind} 授权。 + passwords: + no_token: 仅允许通过密码重置邮件访问本页面,或确认完整 URL。 + send_instructions: 你将收到密码重置指引邮件。 + send_paranoid_instructions: 你将收到密码重置邮件。 + updated: 密码重置成功。 + updated_not_active: 密码重置成功。 + registrations: + destroyed: 撒油娜啦!账号已经注销。有缘再会。 + signed_up: 欢迎回来! + signed_up_but_inactive: 账号未激活。 + signed_up_but_locked: 账号已锁定。 + signed_up_but_unconfirmed: 确认邮件已发,请先激活。 + update_needs_confirmation: 账号需要重新激活,请先激活。 + updated: 更新成功。 + sessions: + already_signed_out: 登出成功。 + signed_in: 登录成功。 + signed_out: 登出成功。 + unlocks: + send_instructions: 解锁邮件已发,请先解锁。 + send_paranoid_instructions: 解锁邮件已发,请先解锁。 + unlocked: 账号已解锁,请登录。 + errors: + messages: + already_confirmed: 已激活,请登录。 + confirmation_period_expired: 需要在 %{period} 内激活,请重新申请。 + expired: 已过期,请重新申请。 + not_found: 未发现 + not_locked: 未锁定 + not_saved: + one: '保存失败: %{resource}' + other: "保存失败:%{count}" diff --git a/config/locales/simple_form.zh-CN.yml b/config/locales/simple_form.zh-CN.yml new file mode 100644 index 0000000000..cda4e68381 --- /dev/null +++ b/config/locales/simple_form.zh-CN.yml @@ -0,0 +1,42 @@ +--- +zh-CN: + simple_form: + hints: + defaults: + avatar: 不超过 2MB,限 PNG, GIF 或 JPG 格式,将缩到 120x120px + display_name: 不起过 30 个字符 + header: 不超过 2MB,限 PNG, GIF 或 JPG 格式,将缩到 700x335px + locked: 默认仅向粉丝公开,需要手工设置通过的粉丝。 + note: 不起过 160 个字符 + labels: + defaults: + avatar: 头像 + confirm_new_password: 确认新密码 + confirm_password: 确认密码 + current_password: 当前密码 + display_name: 显示名 + email: 邮箱 + header: 头 + locale: 语言 + locked: 隐私模式 + new_password: 新密码 + note: Bio + otp_attempt: 两步难码 + password: 密码 + setting_default_privacy: 推文隐私 + username: 用户名 + interactions: + must_be_follower: 仅粉丝可私信 + must_be_following: 仅关注中可私信 + notification_emails: + digest: 发送摘要邮件 + favourite: 有人收藏你的发送邮件通知 + follow: 有人关注你时发送邮件通知 + follow_request: 有人请求关注你时发送邮件通知 + mention: 有人 AT 你时发送邮件通知 + reblog: 有人转发时发送邮件通知 + 'no': '否' + required: + mark: "*" + text: 必须 + 'yes': '是' diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index d8f1e6bc9e..a02f28d988 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -1,12 +1,12 @@ --- -en: +zh-CN: about: about_instance: "%{instance} 源自于 Mastodon。" about_mastodon: Mastodon 开源、自由社交网络。去中心化的商业平台替代,避免单一商业公司垄断沟通。可选择、可信任地任意交流。任何人均可以运行自己的 Mastodon 并进行无缝交流。 about_this: 关于本实例 business_email: '商务邮件:' contact: 联络 - description_headline: %{domain} 是什么? + description_headline: 去中心化 %{domain} 是什么? domain_count_after: 其它实例 domain_count_before: Connected to features: @@ -34,8 +34,8 @@ en: followers: 粉丝 following: 关注 nothing_here: 神马都没有! - people_followed_by: %{name} 的关注 - people_who_follow: %{name} 的粉丝 + people_followed_by: 正关注 + people_who_follow: 粉丝 posts: 推 remote_follow: Remote follow unfollow: 取关 @@ -127,30 +127,30 @@ en: export: 数据导出 preferences: 设置 settings: 设置 - two_factor_auth: 二步验证 + two_factor_auth: 两步验证 statuses: open_in_web: 浏览器中打开 over_character_limit: 超出范围 %{max} visibilities: - private: Only show to followers - public: Public - unlisted: Public, but do not display on the public timeline + private: 仅向粉丝公开 + public: 公开 + unlisted: 公开但不显示在公共时间线中 stream_entries: - click_to_show: Click to show - reblogged: boosted - sensitive_content: Sensitive content + click_to_show: 显示 + reblogged: 转发 + sensitive_content: 敏感内容Sensitive content time: formats: default: "%b %d, %Y, %H:%M" two_factor_auth: - description_html: If you enable two-factor authentication, logging in will require you to be in possession of your phone, which will generate tokens for you to enter. - disable: Disable - enable: Enable - instructions_html: "Scan this QR code into Google Authenticator or a similiar app on your phone. From now on, that app will generate tokens that you will have to enter when logging in." - plaintext_secret_html: 'Plain-text secret: %{secret}' - warning: If you cannot configure an authenticator app right now, you should click "disable" or you won't be able to login. + description_html: 启用两步验证后,登录时强制要求手机上生成的两步验证码 + disable: 禁用 + enable: 启用 + instructions_html: "使用 Google Authenticator 或类似 APP 扫描二维码。现在起,APP 将会生成登陆时必须的两步验证码。" + plaintext_secret_html: '密钥: %{secret}' + warning: 如果你现在没有 Google Authenticator 或类似授权 APP,你应该先「禁用」本功能,否则你将不能正常登陆。 users: - invalid_email: The e-mail address is invalid - invalid_otp_token: Invalid two-factor code + invalid_email: 无效的邮箱 + invalid_otp_token: 无效的两步验证码 will_paginate: page_gap: "…"