From ce6033bc7b02f3f7b8be4c573be3d1d62891b04b Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Wed, 2 Apr 2014 17:39:23 +0200 Subject: [PATCH] Properly encode languages as JSON. --- src/i18n/helpers/languages.py | 6 ++- src/i18n/messages-zh-cn.po | 55 ++++++++++++++------------ static/translation/languages.js | 2 +- static/translation/messages-zh-cn.json | 1 + 4 files changed, 36 insertions(+), 28 deletions(-) create mode 100644 static/translation/messages-zh-cn.json diff --git a/src/i18n/helpers/languages.py b/src/i18n/helpers/languages.py index 4b423b5c..2aef780d 100644 --- a/src/i18n/helpers/languages.py +++ b/src/i18n/helpers/languages.py @@ -9,12 +9,14 @@ LANGUAGES = { "ko": "한국어", } +import json + def main(): print """// This file is auto generated, do not modify. define([], function() { -return %r; -});""" % LANGUAGES +return %s; +});""" % json.dumps(LANGUAGES) if __name__ == "__main__": main() \ No newline at end of file diff --git a/src/i18n/messages-zh-cn.po b/src/i18n/messages-zh-cn.po index 4504ba95..11a21bb9 100644 --- a/src/i18n/messages-zh-cn.po +++ b/src/i18n/messages-zh-cn.po @@ -1,4 +1,4 @@ -# Translations template for Spreed Speak Freely. +# Chinese (China) translations for Spreed Speak Freely. # Copyright (C) 2014 struktur AG # This file is distributed under the same license as the Spreed Speak Freely # project. @@ -8,17 +8,15 @@ msgid "" msgstr "" "Project-Id-Version: Spreed Speak Freely 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-03-20 18:31+0100\n" +"POT-Creation-Date: 2014-04-02 12:37+0200\n" "PO-Revision-Date: 2014-03-31 23:26+0100\n" "Last-Translator: Michael P.\n" "Language-Team: Curt Frisemo \n" +"Plural-Forms: nplurals=1; plural=0\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" -"X-Generator: Poedit 1.6.4\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"Language: zh_Hans_CN\n" msgid "Share your screen" msgstr "共享您的屏幕" @@ -113,6 +111,13 @@ msgstr "离开房间" msgid "Current room" msgstr "最近的房间" +#, fuzzy +msgid "Screen sharing options" +msgstr "媒体屏幕共享" + +msgid "Fit screen." +msgstr "" + msgid "Your picture" msgstr "您的图片" @@ -146,18 +151,12 @@ msgstr "低" msgid "High" msgstr "高" -msgid "720p" -msgstr "720p" - -msgid "1080p" -msgstr "1080p" +msgid "HD" +msgstr "" msgid "Language" msgstr "语言" -msgid "Use browser language" -msgstr "使用浏览器语言" - msgid "Language changes become active on reload." msgstr "转换语言需重启程序" @@ -191,12 +190,6 @@ msgstr "最大视频帧速率" msgid "auto" msgstr "自动" -msgid "Media screen sharing" -msgstr "媒体屏幕共享" - -msgid "Chrome usermedia screen capture feature is required." -msgstr "需启动Chrome Chrome usermedia的截屏功能" - msgid "Experimental settings" msgstr "实验设置" @@ -285,8 +278,8 @@ msgid "Camera / microphone access required." msgstr "需连接摄像头/麦克风" msgid "" -"Please check your browser settings and allow camera and microphone access " -"for this site." +"Please check your browser settings and allow camera and microphone access" +" for this site." msgstr "请检查浏览器设置并允许摄像头及麦克风连接此网站" msgid "Skip check" @@ -299,8 +292,8 @@ msgid "Please set your user details and settings." msgstr "请设置您的用户信息及设置" msgid "" -"Please note that some settings require you to reload or to make a new call " -"to become effective." +"Please note that some settings require you to reload or to make a new " +"call to become effective." msgstr "请注意,有些设置需要重新加载或开始新的通话后才能生效。" msgid "Create your room" @@ -397,6 +390,16 @@ msgstr "您在 %s 房间" msgid "Your browser does not support file transfer." msgstr "您的浏览器不支持文件传输" +msgid "" +"Permission to start screen sharing was denied. Make sure to have enabled " +"screen sharing access for your browser. Copy chrome://flags/#enable-" +"usermedia-screen-capture and open it with your browser and enable the " +"flag on top. Then restart the browser and you are ready to go." +msgstr "" + +msgid "Use browser language" +msgstr "使用浏览器语言" + msgid "Meet with me here:" msgstr "我们这里见:" @@ -428,5 +431,7 @@ msgid "Please provide a valid access code." msgstr "请提供有效接入码" msgid "" -"Failed to verify access code. Check your Internet connection and try again." +"Failed to verify access code. Check your Internet connection and try " +"again." msgstr "接入码认证失败。请检查您的网络连接并重试。" + diff --git a/static/translation/languages.js b/static/translation/languages.js index 77bc1978..b06c6994 100644 --- a/static/translation/languages.js +++ b/static/translation/languages.js @@ -1,4 +1,4 @@ // This file is auto generated, do not modify. define([], function() { -return {'de': 'Deutsch', 'en': 'English', 'ko': '\xed\x95\x9c\xea\xb5\xad\xec\x96\xb4'}; +return {"zh-cn": "\u4e2d\u6587", "de": "Deutsch", "en": "English", "ko": "\ud55c\uad6d\uc5b4"}; }); diff --git a/static/translation/messages-zh-cn.json b/static/translation/messages-zh-cn.json new file mode 100644 index 00000000..4c28fdcf --- /dev/null +++ b/static/translation/messages-zh-cn.json @@ -0,0 +1 @@ +{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0"},"Share your screen":[null,"共享您的屏幕"],"Chat":[null,"聊天"],"Mute microphone":[null,"关闭麦克风"],"Turn camera off":[null,"关闭摄像头"],"Settings":[null,"系统设置"],"Your audio level":[null,"您的通话音量"],"Start chat":[null,"开始聊天"],"Start video call":[null,"开始视频通话"],"Start audio conference":[null,"开始语音会议"],"No other users online":[null,"无其他联系人在线"],"Chat sessions":[null,"会话"],"Room chat":[null,"房间聊天"],"Peer to peer":[null,"P2P"],"Close chat":[null,"关闭聊天"],"is typing...":[null,"**正在输入"],"has stopped typing...":[null,"**停止输入"],"Type here to chat...":[null,"在此输入开始聊天"],"Send":[null,"发送"],"File sharing":[null,"分享文件"],"File is no longer available":[null,"文件已不存在"],"Download":[null,"下载"],"Open":[null,"打开"],"Cancel":[null,"取消"],"Unshare":[null,"停止分享"],"Retry":[null,"重试"],"Download failed.":[null,"下载失败"],"Change room":[null,"更换房间"],"Room":[null,"房间"],"Main":[null,"主房间"],"Leave room":[null,"离开房间"],"Current room":[null,"最近的房间"],"Fit screen.":[null,""],"Your picture":[null,"您的图片"],"Take picture":[null,"拍照"],"Waiting for camera":[null,"等待启动摄像头"],"Your name":[null,"您的名字"],"Name":[null,"名字"],"Your picture and name are visible to others.":[null,"别人能看到您的图片及名字"],"Microphone":[null,"麦克风"],"Camera":[null,"摄像头"],"Video quality":[null,"视频质量"],"Low":[null,"低"],"High":[null,"高"],"HD":[null,""],"Language":[null,"语言"],"Language changes become active on reload.":[null,"转换语言需重启程序"],"Default room":[null,"系统默认房间"],"Set alternative room to join at start.":[null,"重设初始默认房间"],"Desktop notification":[null,"桌面提醒"],"Enable":[null,"开启"],"Denied - check your browser settings":[null,"被拒绝--请检查浏览器设置"],"Allowed":[null,"被接受"],"Advanced settings":[null,"高级设置"],"Stereo audio":[null,"立体声"],"Max video frame rate":[null,"最大视频帧速率"],"auto":[null,"自动"],"Experimental settings":[null,"实验设置"],"Show advanced settings":[null,"展开高级设置"],"Hide advanced settings":[null,"隐藏高级设置"],"Remember settings":[null,"记住设置"],"Apply":[null,"适用"],"Share by Email":[null,"电子邮件共享"],"Share on Facebook":[null,"Facebook共享"],"Share on Twitter":[null,"Twitter共享"],"Share on Google Plus":[null,"Google Plus共享"],"Share on XING":[null,"XING共享"],"Initializing":[null,"初始化"],"Online":[null,"在线"],"Calling":[null,"呼叫中"],"Hangup":[null,"挂断"],"In call with":[null,"正在和**通话"],"Conference with":[null,"和**会议通话"],"Your are offline":[null,"您不在线"],"Go online":[null,"上线"],"Connection interrupted":[null,"连接已中断"],"An error occured":[null,"出现错误"],"Incoming call":[null,"来电"],"from":[null,"来自"],"Accept call":[null,"接受通话"],"Reject":[null,"拒绝"],"Waiting for camera/microphone access":[null,"等待摄像头/麦克风连接"],"Please wait":[null,"请等候"],"Checking camera and microphone access.":[null,"正在检查摄像头及麦克风连接"],"Please allow access to your camera and microphone.":[null,"请允许连接您的摄像头及麦克风"],"Camera / microphone access required.":[null,"需连接摄像头/麦克风"],"Please check your browser settings and allow camera and microphone access for this site.":[null,"请检查浏览器设置并允许摄像头及麦克风连接此网站"],"Skip check":[null,"越过检查"],"Click here for help (Google Chrome).":[null,"点击这里获取帮助 (Google Chrome)"],"Please set your user details and settings.":[null,"请设置您的用户信息及设置"],"Please note that some settings require you to reload or to make a new call to become effective.":[null,"请注意,有些设置需要重新加载或开始新的通话后才能生效。"],"Create your room":[null,"创建您的房间"],"This is your room link:":[null,"这是您的房间链接"],"Creating room link ...":[null,"创建房间链接"],"Start":[null,"开始"],"Just click start":[null,"直接点击开始"],"Share this URL with the people you want to meet.":[null,"请与您需要联系的人分享此URL "],"You can use and re-use this room as many times as you want.":[null,"您可使用或反复多次使用此房间"],"Peer to peer chat active.":[null,"P2P聊天已启动"],"Peer to peer chat is now off.":[null,"P2P现在未启动"]," is now offline.":[null,"**不在线"]," is now online.":[null,"**现在在线"],"You share file:":[null,"分享文件:"],"Incoming file:":[null,"发来文件:"],"Quit from Spreed Speak Freely?":[null,"退出 Spreed Speak Freely?"],"Restart required to apply updates. Click ok to restart now.":[null,"适用更新需重启,现在点击Ok重新启动。"],"Failed to access camera/microphone.":[null,"摄像头/麦克风连接失败"],"Failed to establish peer connection.":[null,"对等连接建立失败"],"We are sorry but something went wrong. Boo boo.":[null,"很抱歉,有错误发生。"],"Oops":[null,"Oops"],"Peer connection failed. Check your settings.":[null,"对等连接失败,请检查设置。"],"User hung up because of error.":[null,"用户因错误挂断"]," is busy. Try again later.":[null,"**正在通话,请稍后再试。"]," rejected your call.":[null,"**拒绝了您的呼叫。"]," does not pick up.":[null,"**不接听呼叫。"]," tried to call you.":[null,"**曾呼叫您。"]," called you.":[null,"**曾与您通话。"],"Your browser does not support WebRTC. No calls possible.":[null,"您的浏览器不支持WebRTC。不能进行通话。"],"Chat with":[null,"与**聊天"],"Message from ":[null,"来自于**的信息"],"You are now in room %s ...":[null,"您在 %s 房间"],"Your browser does not support file transfer.":[null,"您的浏览器不支持文件传输"],"Permission to start screen sharing was denied. Make sure to have enabled screen sharing access for your browser. Copy chrome://flags/#enable-usermedia-screen-capture and open it with your browser and enable the flag on top. Then restart the browser and you are ready to go.":[null,""],"Use browser language":[null,"使用浏览器语言"],"Meet with me here:":[null,"我们这里见:"],"Error":[null,"错误"],"Hint":[null,"提示"],"Please confirm":[null,"请确认"],"More information required":[null,"需要更多信息"],"Ok":[null,"Ok"],"Close":[null,"关闭"],"Access code required":[null,"需要接入码"],"Access denied":[null,"连接被拒绝"],"Please provide a valid access code.":[null,"请提供有效接入码"],"Failed to verify access code. Check your Internet connection and try again.":[null,"接入码认证失败。请检查您的网络连接并重试。"]}}} \ No newline at end of file