Remove zh_CN old Django name for Chinese.

This commit is contained in:
Tim Abbott 2017-02-03 14:26:10 -08:00
parent 89b9c5eece
commit a889346c9f
8 changed files with 16 additions and 2845 deletions

View File

@ -6,11 +6,9 @@ source_file = static/locale/en/LC_MESSAGES/django.po
source_lang = en
type = PO
file_filter = static/locale/<lang>/LC_MESSAGES/django.po
lang_map = zh-Hans: zh_CN
[zulip.translationsjson]
source_file = static/locale/en/translations.json
source_lang = en
type = KEYVALUEJSON
file_filter = static/locale/<lang>/translations.json
lang_map = zh-Hans: zh-CN

View File

@ -235,7 +235,7 @@ casper.waitForSelector("#settings-change-box", function check_url_preference() {
casper.test.assertEvalEquals(function () {
return document.documentElement.lang;
}, 'de');
casper.test.info("Changing language back to English.");
casper.test.info("English ist die neue Standardsprache! Du musst das Fenster neu laden um die Änderungen anzuwenden");
});
casper.thenClick('#default_language');

View File

@ -1,336 +0,0 @@
{
"Stream color": "频道颜色",
"Current password": "当前密码",
"EDITED": "有修改",
"Deactivate now": "禁用",
"Add alert word": "Add alert word",
"Error deactivating account": "Error deactivating account",
"Default streams": "Default streams",
"View Source / Edit Topic": "View Source / Edit Topic",
"I want:": "开启:",
"No description.": "No description.",
"Create stream": "创建频道",
"Unmute the topic <b>__topic_name__</b>": "话题&quot;<b>__topic_name__</b>&quot;关闭免打扰",
"Custom filter added!": "Custom filter added!",
"Message sent when you were not subscribed": "在您订阅前发送的消息",
"Yes, delete this stream": "是的,删除该频道",
"Warning: the below features are experimental, and may not work as well as you would like.": "Warning: the below features are experimental, and may not work as well as you would like.",
"Get API key": "获取API码",
"Audible notifications": "声音通知",
"Email address": "邮箱地址",
"Delete stream": "删除频道",
"Topic editing only": "Topic editing only",
"New users must be invited by e-mail!": "必须通过邮件邀请新用户",
"Users can edit old messages": "用户可以编辑历史消息",
"Upload avatar": "上传头像",
"Narrow to private messages with <b>__name__</b>": "筛选和&quot;<b>__name__</b>&quot;的私信",
"Deactivated users": "Deactivated users",
"Author": "Author",
"E-mail invitation required": "需要邮件邀请",
"Mark all messages in <b>__topic_name__</b> as read": "标记话题&quot;<b>__topic_name__</b>&quot;中的所有消息为已读",
"You can send emails to __page_params.product_name__! Just copy and use this address as an email recipient, and:": "您可以发送邮件给__page_params.product_name__就把这个地址拷贝一下作为收件人然后",
"Only admins may invite": "仅管理员可以邀请",
"Old password": "旧密码",
"Make stream private": "设置为私有频道",
"Notifications": "通知设置",
"You'll receive notifications when a message arrives and __page_params.product_name__ isn't in focus or the message is offscreen.": "当收到消息时如果__page_params.product_name__不是当前窗口或者新消息不在当前页面显示您会收到消息通知",
"New users restricted to the following domains: __domains__": "New users restricted to the following domains: __domains__",
"Narrow to stream &quot;__display_recipient__&quot;": "筛选频道&quot;__display_recipient__&quot;",
"Full name": "名称",
"Message edit limit in minutes (0 for no limit)": "消息编辑时限分钟0表示不限制",
"Waiting period for stream creation (in days)": "Waiting period for stream creation (in days)",
"Other notifications I want:": "开启:",
"Narrow to your private messages with __display_reply_to__": "筛选和&quot;__display_reply_to__&quot;的私信",
"Download .zuliprc": "Download .zuliprc",
"Error adding subscription": "订阅时发生错误",
"Reactivate": "启用",
"Private message": "私信",
"Deleting this stream will immediately unsubscribe everyone, and the stream's content will not be recoverable.": "删除频道会退订该频道的所有用户,并且该频道的所有消息也将无法恢复。",
"Administration": "社区管理",
"Choose avatar": "选择头像",
"Unpin stream <b>__stream.name__</b> from top": "取消频道\"<b>__stream.name__</b>\"置顶",
"Updated notification settings!": "消息通知设置已更新!",
"Send to stream": "发送到频道",
"(no topic)": "(no topic)",
"\n <p class=\"bot-settings-note padded-container\">\n Looking for our <a href=\"/integrations\" target=\"_blank\">Integrations</a>\n or <a href=\"{{ server_uri }}/api\" target=\"_blank\">API</a> documentation?\n </p>\n ": "\n<p class=\"bot-settings-note padded-container\">查阅关于<a href=\"/integrations\" target=\"_blank\">应用整合</a>或者 <a href=\"{{ server_uri }}/api\" target=\"_blank\">API</a>的帮助文档?</p>\n ",
"Receive audible notifications": "Receive audible notifications",
"Digest emails when I'm away": "当我离线时发送摘要邮件",
"Bots": "机器人",
"User invited successfully._plural": "邀请用户成功",
"Add new default stream": "Add new default stream",
"Narrow to private messages with __message.sender_full_name__": "筛选和&quot;__message.sender_full_name__&quot;的私信",
"Allowed domains": "Allowed domains",
"Pin stream <b>__stream.name__</b> to top": "频道”<b>__stream.name__</b>“置顶",
"Note that any bots that you maintain will be disabled.": "Note that any bots that you maintain will be disabled.",
"Any user may now invite new users!": "现在所有用户都可以邀请新用户!",
"User list will appear on the __side__ hand side! You will need to reload the window for your changes to take effect.": "在__side__侧显示用户列表需要重新加载页面生效",
"Add a new emoji": "Add a new emoji",
"Your account": "Your account",
"Add emoji": "添加表情",
"more conversations": "更多会话",
"Topic": "话题",
"Administrator settings": "管理员设置",
"Any user may now create new streams!": "现在所有用户都可以创建频道!",
"Only admins may create streams": "仅限管理员创建频道",
"Link to this conversation": "生成会话链接",
"This is an <span class=\"icon-vector-lock\"></span> <b>invite-only stream</b>. Only people who have been invited can access its content, but&nbsp;any&nbsp;member&nbsp;of&nbsp;the&nbsp;stream can&nbsp;invite&nbsp;others.": "这是一个 <span class=\"icon-vector-lock\"></span> <b>私有频道</b>。仅有邀请的用户可以对该频道进行访问,该频道的用户也可以邀请其它用户。",
"Make stream public": "设置为公开频道",
"Delete streams": "Delete streams",
"\n <p>Please re-enter your password to confirm your identity.\n (<a href=\"/accounts/password/reset/\" target=\"_blank\">Forgotten it?</a>)</p>\n ": "<p>请重新输入密码以便确认您的身份(<a href=\"/accounts/password/reset/\" target=\"_blank\">忘记了?</a></p>\n ",
"Pattern": "Pattern",
"Create": "创建",
"It's been a while! Since you were last here, you received <b>__unread_count__</b> new messages.": "好久不见!您有<b>__unread_count__</b>条未读消息",
"None": "None",
"Mark all messages in <b>__stream.name__</b> as read": "标记频道&quot;<b>__stream.name__</b>&quot;中的所有消息为已读",
"The email will be forwarded to this stream": "邮件将会转发到这个频道中",
"Alert Word": "提示词设置",
"Failed": "Failed",
"The email body will become the __page_params.product_name__ message": "邮件正文作为__page_params.product_name__的消息",
"Stream description (optional)": "Stream description (optional)",
"Narrow to stream &quot;__display_recipient__&quot;, topic &quot;__subject__&quot;": "筛选频道&quot;__display_recipient__&quot;, 话题&quot;__subject__&quot;",
"Default language changed!": "默认语言已更新!",
"Reply": "回复",
"Unmute the topic <b>__subject__</b>": "话题&quot;<b>__subject__</b>&quot;取消免打扰",
"Save": "保存",
"Custom linkification filters": "Custom linkification filters",
"Email": "邮箱",
"See the rest of this message": "查看其余内容",
"Change previous and following messages to this topic": "修改前后消息到该话题",
"Username": "用户名",
"Desktop notifications": "桌面通知",
"Add filter": "Add filter",
"\n <p>Lets everyone know about the new stream,<br />\n even if you don't add them.</p>\n ": "向所有用户广播通知,以便大家及时加入",
"Collapse": "折叠",
"Subscriptions": "Subscriptions",
"Add a new alert word": "Add a new alert word",
"waiting period threshold changed!": "waiting period threshold changed!",
"Failed to generate preview": "Failed to generate preview",
"Close": "关闭",
"Check all": "选择所有",
"Cancel": "取消",
"Add emoji reaction": "Add emoji reaction",
"Enabled": "Enabled",
"Already subscribed to __stream__": "订阅频道\"__stream__\"成功",
"Organization settings": "社区设置",
"Delete Alert Word": "删除提示词",
"Yes, send": "Yes, send",
"Narrow to topic <b>__topic_name__</b>": "筛选话题&quot;<b>__topic_name__</b>&quot;",
"If checked, only users with an e-mail address ending in these domains will be able to join the organization.": "If checked, only users with an e-mail address ending in these domains will be able to join the organization.",
"Generate new API Key": "生成新的API码",
"Un-collapse": "展开",
"Clear avatar": "清除头像",
"Receive desktop notifications": "Receive desktop notifications",
"Display time in 24-hour format (17:00 instead of 5:00 PM)": "显示时间为24小时格式例如显示17:00而不显示5:00 PM",
"Send __message.sender_full_name__ a private message": "给&quot;__message.sender_full_name__&quot;发送私信",
"Change only this message topic": "仅修改该消息到该话题",
"Error getting API key": "获取API码时发生错误",
"You and __display_reply_to__": "您和__display_reply_to__",
"Change default language": "Change default language",
"Narrow to stream <b>__stream.name__</b>": "筛选频道&quot;<b>__stream.name__</b>&quot;",
"[More...]": "[更多...]",
"Your API key:": "您的API码",
"People must be invited": "用户必须邀请",
"New password": "新密码",
"Show/change your API key": "显示/修改您的API码",
"Anyone can join": "任何人可以加入",
"<strong>__name__</strong> is not subscribed to this stream.": "<strong>__name__</strong> 没有订阅这个频道。",
"Choose custom color": "选择自定义颜色",
"[Condense this message]": "[收起消息]",
"Remove from default": "取消默认频道",
"You need to be running Zephyr mirroring in order to send messages!": "您需要运行Zephyr镜像服务以便发送消息",
"Error creating stream": "创建频道时发生错误",
"Delete": "删除",
"Generate new API key": "生成新的API码",
"Only admins may add emoji": "Only admins may add emoji",
"\n Configure regular expression patterns that will be\n automatically linkified when used in Zulip message bodies or\n topics. For example to automatically linkify commit IDs and\n issue numbers (e.g. #123) to the corresponding items in a GitHub\n project, you could use the following:\n ": "\n Configure regular expression patterns that will be\n automatically linkified when used in Zulip message bodies or\n topics. For example to automatically linkify commit IDs and\n issue numbers (e.g. #123) to the corresponding items in a GitHub\n project, you could use the following:\n ",
"Forgotten it?": "忘记了?",
"Your bots": "Your bots",
"Email notifications when offline": "离线时邮件通知",
"Mobile push notifications always (even when online)": "Mobile push notifications always (even when online)",
"Filter streams": "Filter streams",
"bot": "bot",
"\n <b>Streams</b> are like chat rooms or mailing lists. You can easily\n <b>join</b>, <b>leave</b>, and <b>make</b> them.\n ": "<b>频道</b>类似于聊天室或者邮件列表。您可以方便地<b>订阅</b><b>退订</b>以及 <b>创建</b>频道。\n ",
"Full Bot Name": "机器人名称",
"Custom alert words": "Custom alert words",
"Formatting": "Formatting",
"Display user list on left side in narrow windows.": "缩小窗口时在左侧显示用户列表",
"Not Delivered: Resend": "Not Delivered: Resend",
"Nothing selected.": "Nothing selected.",
"Owner": "所有者",
"The stream description has been updated!": "频道描述信息已更新",
"Yes": "是",
"This is a <span class=\"icon-vector-globe\"></span> <b>public stream</b>. Anybody in your organization can join.": "这是一个<span class=\"icon-vector-globe\"></span> <b>公开的频道</b>。社区中的所有用户都可以订阅。",
"Error updating time format setting": "修改时间格式时发生错误",
"{{#if msg/starred}}Unstar{{else}}Star{{/if}} this message": "消息{{#if msg/starred}}去星标{{else}}加星标{{/if}}",
"If checked, users can edit the content and topics of their old messages.": "如果勾选,则用户可以编辑历史消息的话题与内容。",
"New user e-mails now restricted to certain domains!": "New user e-mails now restricted to certain domains!",
"Not Delivered: Delete": "Not Delivered: Delete",
"A stream with this name already exists": "A stream with this name already exists",
"No": "否",
"Deactivate": "禁用",
"Apply this change to all stream subscriptions?": "应用到所有频道用户",
"You have nothing to send!": "消息不能为空!",
"Select default language": "Select default language",
"Narrow to messages sent by <b>__name__</b>": "筛选&quot;<b>__name__</b>&quot;发送的消息",
"Narrow to messages sent by __message.sender_full_name__": "筛选&quot; __message.sender_full_name__&quot;发送的消息",
"__minutes__ min to edit": "__minutes__分钟内完成编辑",
"Add": "添加",
"@ Compose a reply @-mentioning __message.sender_full_name__": "@ Compose a reply @-mentioning __message.sender_full_name__",
"Compose a message to <b>__name__</b>": "发私信给&quot;<b>__name__</b>&quot;",
"Unsubscribe from __stream__": "Unsubscribe from __stream__",
"The stream has been renamed!": "频道重命名成功!",
"Add reaction...": "Add reaction...",
"Edit User": "Edit User",
"Method": "Method",
"Error checking subscription": "检查订阅关系时发生错误",
"Authentication methods": "Authentication methods",
"Sent by <b>__message.sender_full_name__</b>": "发送人: <b>__message.sender_full_name__</b>",
"__count__ invite remaining": "__count__ invite remaining",
"This organization is configured to restrict editing of message content to __minutes_to_edit__ minutes after it is sent.": "This organization is configured to restrict editing of message content to __minutes_to_edit__ minutes after it is sent.",
"Error updating the stream description": "修改频道描述时发生错误",
"New alert word": "New alert word",
"People to add": "添加用户",
"Remove admin": "取消管理员",
"If non-zero, users can edit their message for this many minutes after it is sent. If zero, users can edit all their past messages.": "如果设置为非0值则用户只能对指定时间内的消息进行编辑如果设置为0则用户可以编辑所有历史消息。",
"Copy from Stream": "Copy from Stream",
"Unsubscribe": "退订",
"Only Admins may now add new emoji!": "Only Admins may now add new emoji!",
"Experimental settings": "Experimental settings",
"Error removing subscription": "退订时发生错误",
"Error renaming stream": "重命名频道时发生错误",
"Save changes": "保存修改",
"Unable to subscribe user": "不能订阅用户",
"The email subject will become the __page_params.product_name__ topic": "邮件主题作为__page_params.product_name__的话题",
"Search": "搜索",
"Password strength": "密码强度",
"Pin stream to top of left sidebar": "Pin stream to top of left sidebar",
"URL format string": "URL format string",
"Listen on": "收听",
"Alert words allow you to be notified as if you were @-mentioned when certain words or phrases are used in Zulip.": "Alert words allow you to be notified as if you were @-mentioned when certain words or phrases are used in Zulip.",
"If checked, only administrators may invite new users.": "如果勾选,则只有管理员可以邀请新用户",
"Stream Name": "频道名称",
"Name successfully updated!": "Name successfully updated!",
"Domain": "Domain",
"Any user may now add new emoji!": "Any user may now add new emoji!",
"Their password will be cleared from our systems, and any bots they maintain will be disabled.": "这些用户的密码会被从系统中清除,他们的机器人用户也会被关闭。",
"The recipient __recipient__ is not valid ": "收信人\"__recipient__\"不正确",
"Your organization's name": "社区名称",
"Action": "Action",
"Default language": "Default language",
"\n <p class=\"api-key-note\">For most bots using the API, you'll want to give each bot\n its own name and API key using the above section. But if you\n want to write a bot that can access your own private\n messages, you should use your personal API key.\n </p>\n ": "\n <p class=\"api-key-note\">For most bots using the API, you'll want to give each bot\n its own name and API key using the above section. But if you\n want to write a bot that can access your own private\n messages, you should use your personal API key.\n </p>\n ",
"Next": "下一步",
"Stream description": "Stream description",
"Custom emoji": "自定义表情",
"Stream settings": "频道设置",
"If checked, only administrators may create new streams.": "如果勾选,则仅有管理员可以创建新频道。",
"Add a new filter": "Add a new filter",
"A stream needs to have a name": "A stream needs to have a name",
"User invited successfully.": "邀请用户成功。",
"Unless I say otherwise for a particular stream, I want:": "如果没有对频道作单独配置,则开启:",
"Optional": "可选设置",
"Always auto-scroll to new messages": "自动滚动到新消息",
"Nothing to preview": "Nothing to preview",
"Error changing settings": "修改设置时发生错误",
"Edited (__last_edit_timestr__)": "Edited (__last_edit_timestr__)",
"If checked, users must be invited in order to join your organization.": "如果勾选,用户必须邀请才能加入您的社区。",
"Regular expression": "Regular expression",
"Mute the topic <b>__topic_name__</b>": "话题&quot;<b>__topic_name__</b>&quot;开启免打扰",
"Are you sure you want to do this?": "确定这样做?",
"Users can now edit the content and topics of all their past messages!": "用户现在可以对所有历史消息的内容与话题进行编辑!",
"The recipients __recipients__ are not valid ": "收信人\"__recipients__\"不正确",
"__seconds__ sec to edit": "__seconds__秒内完成编辑",
"View Source": "View Source",
"Customize avatar": "自定义头像",
"Stream accessibility": "频道权限",
"Subscribe to __stream__": "Subscribe to __stream__",
"Change notification settings for individual streams on your <a href=\"/#subscriptions\">Streams page</a>.": "可以在<a href=\"/#subscriptions\">频道订阅页面</a>进行单独设置。",
"Image": "图片",
"Settings": "设置",
"acme.com": "acme.com",
"and": "来",
"Make admin": "设为管理员",
"Stream messages": "频道消息",
"Change password": "Change password",
"Change later messages to this topic": "修改后续消息到该话题",
"Subscribed": "已订阅",
"Please specify a topic": "请指定话题",
"View source": "View source",
"Exit Tutorial": "退出教程",
"<p>Messages in __page_params.product_name__ go to a <b>stream</b> and have a <b>topic</b>.</p>": "<p>__page_params.product_name__中的消息是发送在一个<b>频道</b>中并且拥有一个<b>话题</b>。</p>",
"Mobile push notifications when offline": "离线时推送移动终端通知",
"Muted streams don't show up in your home view or generate notifications unless you are mentioned.": "开启免打扰的频道不会出现在主页中,也不会产生通知,除非您被@提醒。",
"Content": "Content",
"Error changing name": "Error changing name",
"Edit bot": "编辑机器人",
"right": "right",
"Message to stream <b>__message.stream__</b>": "频道&quot;<b>__message.stream__</b>&quot;的消息",
"__lang__ is now the default language! You will need to reload the window for your changes to take effect": "默认语言修改为\"__lang__\"!需要重新加载页面以生效",
"New users may have arbitrary e-mails!": "用户可以使用所有邮箱!",
"Announce stream": "公布频道信息",
"Unmute the stream <b>__stream.name__</b>": "频道&quot;<b>__stream.name__</b>&quot;关闭免打扰",
"API Key": "API码",
"If checked, only administrators may add new emoji.": "If checked, only administrators may add new emoji.",
"Delete avatar": "Delete avatar",
"Please specify a stream": "请指定频道",
"Configure the default streams new users are subscribed to when joining the {{domain}} organization.": "为社区{{domain}} 的新用户设置默认订阅的频道",
"Mute the stream <b>__stream.name__</b>": "频道&quot;<b>__stream.name__</b>&quot;开启免打扰",
"Users": "用户",
"Emoji URL": "表情URL",
"Subscribe": "订阅",
"Private messages and @-mentions": "私信和@提醒",
"[Add or Change]": "[Add or Change]",
"Updated settings! You will need to reload for these changes to take effect.": "Updated settings! You will need to reload for these changes to take effect.",
"Compose a message to stream <b>__stream.name__</b>": "发消息到频道&quot;<b>__stream.name__</b>&quot;",
"Error listing streams": "显示频道时发生错误",
"Error updating default language setting": "修改默认语言时发生错误",
"By deactivating <strong><span class=\"user_name\"></span></strong> &lt;<span class=\"email\"></span>&gt;, they will be logged out immediately.": "去激活用户后 <strong><span class=\"user_name\"></span></strong> &lt;<span class=\"email\"></span>&gt;, 这些用户会立即退出登录。",
"\n <p>You can <b>narrow</b> to a stream or topic by <b>clicking on it</b>, or\n see messages from all streams at once from your Home view.</p>\n ": "<p>点击<b>频道或者话题</b>可以对频道或者话题进行<b>筛选</b>;在主页可以查看来自所有频道的消息。</p>\n ",
"Include content of private messages in desktop notifications": "Include content of private messages in desktop notifications",
"Filter": "Filter",
"Authentication methods saved!": "Authentication methods saved!",
"__count__ invite remaining_plural": "__count__ invites remaining",
"Password": "密码",
"Deactivate account": "Deactivate account",
"Do you want to skip to your latest messages?": "是否跳过这些消息?(选择“是”将清除所有未读消息标记)",
"Time's up!": "Time's up!",
"This is an invite-only stream": "这是一个私有频道",
"Configure the authentication methods for the __domain__ organization.": "Configure the authentication methods for the __domain__ organization.",
"Name": "名称",
"Error listing users or bots": "显示机器人或者用户信息发生错误",
"\n <p><b>Reply</b> to a message by <b>clicking on it</b>. The stream\n and topic will automatically be filled in.</p>\n ": "\n <p><b>Reply</b> to a message by <b>clicking on it</b>. The stream\n and topic will automatically be filled in.</p>\n ",
"Edit": "编辑",
"Stream membership": "频道用户",
"\n The <b>topic</b> of a conversation is one or two words that describe\n what it is about, for example: <b>Bug #345</b>, <b>lunch</b>, or\n <b>logo</b>. Don't overthink it.\n ": "<b>话题</b>表示当前对话的主题,可以是一个短语,比如:<b>Bug #345</b><b>午饭</b>,或者<b>logo</b>。不要想太多。\n ",
"Alert words can't be empty!": "提示词不能为空",
"Remove": "Remove",
"@ Compose a message @-mentioning <b>__name__</b>": "@ Compose a message @-mentioning <b>__name__</b>",
"Make this message take up less space on the screen": "使得该消息占用较少的屏幕空间",
"Create bot": "Create bot",
"Failed!": "失败",
"Error updating user list placement setting": "修改用户列表设置时发生错误",
"more topics": "更多话题",
"Add extra emoji for members of the __realm_name__ organization.": "Add extra emoji for members of the __realm_name__ organization.",
"New users may sign up online!": "用户可以在线注册!",
"Time will be displayed in the __format__-hour format! You will need to reload the window for your changes to take effect": "时间显示格式设置为__format__小时制需要重新加载页面生效",
"By deactivating your account, you will be logged out immediately.": "By deactivating your account, you will be logged out immediately.",
"Mute the topic <b>__subject__</b>": "话题&quot;<b>__subject__</b>&quot;开启免打扰",
"Uncheck all": "全部不选",
"Are you sure you want to mention all <strong>__count__</strong> people in this stream?": "Are you sure you want to mention all <strong>__count__</strong> people in this stream?",
"Deactivate your account": "Deactivate your account",
"Confirm password": "确认密码",
"Not Delivered: Edit": "Not Delivered: Edit",
"Emoji name": "表情名称",
"Stream name": "频道名称",
"Delete bot": "删除机器人",
"Custom emoji added!": "添加表情成功!",
"Actions": "操作",
"Enable desktop notifications for new streams": "为新的频道开启桌面通知",
"New users must be invited by an admin!": "仅管理员可以邀请新用户!",
"Display settings": "Display settings",
"No changes to save!": "No changes to save!",
"Only Admins may now create new streams!": "仅管理员可以创建频道!",
"Users can no longer edit their past messages!": "不允许用户编辑历史消息!",
"Name changed!": "名称修改成功!",
"Please specify at least one recipient": "请指定至少一个收信人",
"left": "left"
}

File diff suppressed because it is too large Load Diff

View File

@ -565,12 +565,6 @@ def do_set_realm_message_editing(realm, allow_message_editing, message_content_e
def do_set_realm_default_language(realm, default_language):
# type: (Realm, Text) -> None
if default_language == 'zh_CN':
# NB: remove this once we upgrade to Django 1.9
# zh-cn and zh-tw will be replaced by zh-hans and zh-hant in
# Django 1.9
default_language = 'zh_HANS'
realm.default_language = default_language
realm.save(update_fields=['default_language'])
event = dict(
@ -2304,12 +2298,6 @@ def do_change_left_side_userlist(user_profile, setting_value, log=True):
def do_change_default_language(user_profile, setting_value, log=True):
# type: (UserProfile, Text, bool) -> None
if setting_value == 'zh_CN':
# NB: remove this once we upgrade to Django 1.9
# zh-cn and zh-tw will be replaced by zh-hans and zh-hant in
# Django 1.9
setting_value = 'zh_HANS'
user_profile.default_language = setting_value
user_profile.save(update_fields=["default_language"])
event = {'type': 'update_display_settings',
@ -3082,12 +3070,6 @@ def fetch_initial_state_data(user_profile, event_types, queue_id):
state['left_side_userlist'] = user_profile.left_side_userlist
default_language = user_profile.default_language
if user_profile.default_language == 'zh_HANS':
# NB: remove this once we upgrade to Django 1.9
# zh-cn and zh-tw will be replaced by zh-hans and zh-hant in
# Django 1.9
default_language = 'zh_CN'
state['default_language'] = default_language
if want('update_global_notifications'):

View File

@ -47,25 +47,20 @@ class Command(compilemessages.Command):
'name': u'English',
})
continue
if locale == u'zh-CN':
filename = self.get_po_filename(locale_path, locale)
if not os.path.exists(filename):
continue
if locale == u'zh_CN':
name = u'Simplified Chinese'
else:
filename = self.get_po_filename(locale_path, locale)
if not os.path.exists(filename):
continue
with open(filename, 'r') as reader:
result = lang_name_re.search(reader.read())
if result:
try:
name = result.group(1)
except Exception:
print("Problem in parsing {}".format(filename))
raise
else:
raise Exception("Unknown language %s" % (locale,))
with open(filename, 'r') as reader:
result = lang_name_re.search(reader.read())
if result:
try:
name = result.group(1)
except Exception:
print("Problem in parsing {}".format(filename))
raise
else:
raise Exception("Unknown language %s" % (locale,))
percentage = self.get_translation_percentage(locale_path, locale)
@ -87,10 +82,6 @@ class Command(compilemessages.Command):
not_translated = len(po.untranslated_entries())
total = len(po.translated_entries()) + not_translated
# There is a difference between frontend and backend files for Chinese
if locale == 'zh_CN':
locale = 'zh-CN'
# frontend stats
with open(self.get_json_filename(locale_path, locale)) as reader:
for key, value in ujson.load(reader).items():

View File

@ -36,7 +36,7 @@ class TranslationTestCase(ZulipTestCase):
languages = [('en', u'Register'),
('de', u'Registrieren'),
('sr', u'Региструј се'),
('zh-cn', u'注册'),
('zh-hans', u'注册'),
]
for lang, word in languages:
@ -49,7 +49,7 @@ class TranslationTestCase(ZulipTestCase):
languages = [('en', u'Register'),
('de', u'Registrieren'),
('sr', u'Региструј се'),
('zh-cn', u'注册'),
('zh-hans', u'注册'),
]
for lang, word in languages:
@ -65,14 +65,9 @@ class TranslationTestCase(ZulipTestCase):
languages = [('en', u'Register'),
('de', u'Registrieren'),
('sr', u'Региструј се'),
('zh-hans', u'注册'),
]
# 'zh-cn' was deprecated in Django 1.10
if django.VERSION >= (1, 10):
languages.append(('zh-hans', u'注册'))
else:
languages.append(('zh-cn', u'注册'))
for lang, word in languages:
response = self.fetch('get', '/{}/integrations/'.format(lang), 200)
self.assert_in_response(word, response)

View File

@ -252,15 +252,6 @@ class RealmTest(ZulipTestCase):
realm = get_realm('zulip')
self.assertEqual(realm.default_language, new_lang)
# Test setting zh_CN, we set zh_HANS instead of zh_CN in db
chinese = "zh_CN"
simplified_chinese = "zh_HANS"
req = dict(default_language=ujson.dumps(chinese))
result = self.client_patch('/json/realm', req)
self.assert_json_success(result)
realm = get_realm('zulip')
self.assertEqual(realm.default_language, simplified_chinese)
# Test to make sure that when invalid languages are passed
# as the default realm language, correct validation error is
# raised and the invalid language is not saved in db