1. Localization framework.

2. Chinese translation of main shell, viewers module and chat module.


git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@3012 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
Xie Yan Qing 2009-11-15 12:43:35 +00:00
parent 45139d1d95
commit 7a49dc5c6f
15 changed files with 393 additions and 33 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<actionScriptProperties mainApplicationPath="BigBlueButton.mxml" version="3"> <actionScriptProperties mainApplicationPath="BigBlueButton.mxml" version="3">
<compiler additionalCompilerArguments="-locale en_US" copyDependentFiles="true" enableModuleDebug="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.115" htmlPlayerVersionCheck="true" outputFolderPath="bin" sourceFolderPath="src" strict="true" useApolloConfig="false" verifyDigests="true" warn="true"> <compiler additionalCompilerArguments="-locale=" copyDependentFiles="true" enableModuleDebug="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.115" htmlPlayerVersionCheck="true" outputFolderPath="bin" sourceFolderPath="src" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
<compilerSourcePath> <compilerSourcePath>
<compilerSourcePathEntry kind="1" linkType="1" path="tests/integration"/> <compilerSourcePathEntry kind="1" linkType="1" path="tests/integration"/>
<compilerSourcePathEntry kind="1" linkType="1" path="tests/unit"/> <compilerSourcePathEntry kind="1" linkType="1" path="tests/unit"/>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- myMXMLCBuild.xml -->
<project name="My App Builder" basedir="." default="build">
<property environment="env" />
<property name="FLEX_HOME" value="${env.FLEX_HOME}" />
<property name="ROOT_DIR" value="." />
<property name="OUTPUT_DIR" value="${ROOT_DIR}/bin" />
<!-- Threading Properties -->
<property name="threads.maximum" value="4" />
<!-- Import Flex Ant Tasks. -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<!-- Default Build Target. -->
<target name="build">
<echo>Building Localization .swf's</echo>
<parallel threadCount="${threads.maximum}">
<compileLocale locale="en_US" />
<compileLocale locale="zh_CN" />
</parallel>
</target>
<!-- Compiles Localization Resource Bundle. -->
<macrodef name="compileLocale" description="Compiles the Resource package for the given locale">
<attribute name="locale" default="en_US"/>
<sequential>
<!--
Create the Flex Home directory for the language in question.
This is necessary to compensate for a bug in pre-3.2 releases of
mxmlc.
-->
<mkdir dir="${FLEX_HOME}/frameworks/locale/@{locale}"/>
<!-- Invoke MXMLC -->
<mxmlc output="${OUTPUT_DIR}/locale/@{locale}_resources.swf">
<locale>@{locale}</locale>
<source-path path-element="locale/{locale}"/>
<include-resource-bundles>bbbResources</include-resource-bundles>
<source-path path-element="${FLEX_HOME}/frameworks"/>
</mxmlc>
</sequential>
</macrodef>
</project>

View File

@ -33,6 +33,28 @@ var hasProductInstall = DetectFlashVer(6, 0, 65);
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
// Check locale
var localeChain = "en_US";
if (navigator.language)
localeChain = navigator.language;
else if (navigator.browserLanguage)
localeChain = navigator.browserLanguage;
if(/^([a-z]+)-([a-z]+)$/i.test(localeChain)){
var matches = /^([a-z]+)-([a-z]+)$/i.exec(localeChain);
localeChain = matches[1].toLowerCase() + "_" + matches[2].toUpperCase();
}
else if(/^([a-z]+)$/i.test(localeChain)){
var matches = /^([a-z]+)$/i.exec(localeChain);
localeChain = matches[1].toLowerCase();
}
else{
localeChain = "en_US";
}
var resourceModuleURLs = "locale/" + localeChain + "_resources.swf";
// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback // Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
if ( hasProductInstall && !hasRequestedVersion ) { if ( hasProductInstall && !hasRequestedVersion ) {
// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
@ -46,7 +68,7 @@ if ( hasProductInstall && !hasRequestedVersion ) {
AC_FL_RunContent( AC_FL_RunContent(
"src", "playerProductInstall", "src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"" + '&resourceModuleURLs='+resourceModuleURLs+'&localeChain='+localeChain,
"width", "${width}", "width", "${width}",
"height", "${height}", "height", "${height}",
"align", "middle", "align", "middle",
@ -64,6 +86,7 @@ if ( hasProductInstall && !hasRequestedVersion ) {
// embed the Flash Content SWF when all tests are passed // embed the Flash Content SWF when all tests are passed
AC_FL_RunContent( AC_FL_RunContent(
"src", "${swf}", "src", "${swf}",
"FlashVars", 'resourceModuleURLs='+resourceModuleURLs+'&localeChain='+localeChain,
"width", "${width}", "width", "${width}",
"height", "${height}", "height", "${height}",
"align", "middle", "align", "middle",

View File

@ -0,0 +1,107 @@
# BigBlueButton.mxml
bbb.pageTitle = Big Blue Button
# MainApplicationShell.mxml
bbb.mainshell.statusInfo = Please wait while we load {0} modules:
bbb.mainshell.statusInfo.loaded = {0}(loaded)
bbb.mainshell.statusInfo.testRTMPConnection = Please wait while we test your connection to the server.
bbb.mainshell.statusInfo2.testRTMPConnection = This may take a minute or two.
bbb.mainshell.statusProgress.testRTMPConnection = Connecting to RTMP://{0}:1935/{1}.
bbb.mainshell.statusProgress.testRTMPTConnection = Connecting to RTMPT://{0}:80/{1}.
bbb.mainshell.statusProgress.loading = Loading:
bbb.mainshell.statusProgress.loaded = Loading: {0} {1}% loaded.
bbb.mainshell.statusProgress.cannotConnectServer = Sorry, we cannot connect to the server.
bbb.mainshell.copyrightLabel2 = (c) 2009, BigBlueButton version {0} - For more information see http://www.bigbluebutton.org/.
bbb.mainshell.logBtn.toolTip = Open Log Window
bbb.mainshell.fullScreenBtn.toolTip = Toggle Full-Screen
bbb.mainshell.resetLayoutBtn.toolTip = Reset Layout
# LogWindow.mxml
bbb.logwindow.title = Log Window
bbb.logwindow.highlight = Highlight:
bbb.logwindow.turnLoggingOff = Turn Logging Off
bbb.logwindow.clearBtn = Clear
bbb.logwindow.refreshBtn = Refresh
# JoinFailedWindow.mxml
bbb.joinFailedWindow.title = Join Failed
bbb.joinFailedWindow.okBtn = OK
bbb.joinFailedWindow.failedInfo = No valid session. Click ok to login.
# MainToolbar.mxml
bbb.mainToolbar.loggedInUserLbl = You are logged in as {0} to {1} as role {2}.
bbb.mainToolbar.helpBtn = Help
bbb.mainToolbar.logoutBtn = Logout
bbb.mainToolbar.logoutBtn.toolTip = Log out
###### modules ######
# ViewersWindow.mxml
bbb.viewers.title = Web Participants
bbb.viewers.viewersGrid.nameItemRenderer = Name
bbb.viewers.viewersGrid.nameItemRenderer.nameLabel.toolTip = You are logged in as this user.
bbb.viewers.viewersGrid.roleItemRenderer = Role
bbb.viewers.viewersGrid.statusItemRenderer = Status
bbb.viewers.viewersGrid.statusItemRenderer.raiseHand.toolTip = Hand Raised on {0}
bbb.viewers.viewersGrid.statusItemRenderer.streamIcon.toolTip = Double-Click to view.
bbb.viewers.viewersGrid.statusItemRenderer.presIcon.toolTip = Presenter
bbb.viewers.presentBtn.toolTip = Select web participant to be presenter.
bbb.viewers.raiseHandBtn.toolTip = Click to raise hand.
# PresentationWindow.mxml
bbb.presentation.title = Presentation
bbb.presentation.uploadPresBtn.toolTip = Upload PDF document for presentation.
bbb.presentation.backBtn.toolTip = Previous slide.
bbb.presentation.slideNumLbl =
bbb.presentation.forwardBtn.toolTip = Next slide
bbb.presentation.resetZoomBtn.toolTip = Reset Zoom
bbb.presentation.presenterNameLbl = {0} is currently presenting.
# FileUploadWindow.mxml
bbb.fileupload.title = Upload Presentation
bbb.fileupload.fileLbl = File:
bbb.fileupload.selectBtn.toolTip = Browse file
bbb.fileupload.uploadBtn = Upload
bbb.fileupload.uploadBtn.toolTip = Upload file
bbb.fileupload.presentationNamesLbl = Uploaded Presentations:
bbb.fileupload.deleteBtn.toolTip = Delete Presentation
bbb.fileupload.showBtn = Show
bbb.fileupload.showBtn.toolTip = Show Presentation
bbb.fileupload.okCancelBtn = Cancel
bbb.fileupload.progressLbl.uploadSuccessful = Upload completed. Please wait while we convert the document.
bbb.fileupload.progressBar.uploadSuccessful = Upload successful.
bbb.fileupload.progressLbl.uploading = {0}% uploaded.
bbb.fileupload.progressBar.uploading = {0}% uploaded.
bbb.fileupload.progressLbl.converting = Converted {0} of {1} slides.
bbb.fileupload.progressBar.converting = Converted {0} of {1} slides.
bbb.fileupload.progressLbl.extracting = Extracting slide {0} of {1} slides.
bbb.fileupload.progressBar.extracting = Extracting slide {0} of {1} slides.
bbb.fileupload.genThumbText = Generating thumbnails..
bbb.fileupload.progBarLbl = Progress:
# ChatWindow.mxml
bbb.chat.title = Chat
bbb.chat.cmpColorPicker.toolTip = Text Color
bbb.chat.sendBtn = Send
bbb.chat.sendBtn.toolTip = Send Message
bbb.chat.publicChatUsername = All
# ListenersWindow.mxml
bbb.listeners.title = Voice Participants
bbb.listeners.muteAllBtn.toolTip = Mute all
bbb.listeners.unmuteAllBtn.toolTip = Unmute all
bbb.listeners.ejectBtn.toolTip = Select voice participant to eject.
# ListenerItem.mxml
bbb.listenerItem.nameLbl.toolTip = Select this user and click button to mute or unmute.
bbb.listenerItem.talkImg.toolTip = Talking
# PublishWindow.mxml
bbb.publishVideo.title = Stream webcam
bbb.publishVideo.startPublishBtn.toolTip = start streaming
# DesktopPublishWindow.mxml
bbb.desktopPublish.title = Desktop Sharing

View File

@ -0,0 +1,107 @@
# BigBlueButton.mxml
bbb.pageTitle = Big Blue Button
# MainApplicationShell.mxml
bbb.mainshell.statusInfo = 请稍后,正在加载 {0} 模块:
bbb.mainshell.statusInfo.loaded = {0}(加载完成)
bbb.mainshell.statusInfo.testRTMPConnection = 请稍后,正在连接到服务器
bbb.mainshell.statusInfo2.testRTMPConnection = 加载过程可能会持续1至2分钟请稍后
bbb.mainshell.statusProgress.testRTMPConnection = 正连接到 RTMP://{0}:1935/{1}.
bbb.mainshell.statusProgress.testRTMPTConnection = 正连接到 RTMPT://{0}:80/{1}.
bbb.mainshell.statusProgress.loading = 载入中:
bbb.mainshell.statusProgress.loaded = 载入中: {0} {1}% 载入完成.
bbb.mainshell.statusProgress.cannotConnectServer = 抱歉,无法连接到服务器.
bbb.mainshell.copyrightLabel2 = (c) 2009, BigBlueButton 版本 {0} - 请登陆官方网站查看详情 http://www.bigbluebutton.org/.
bbb.mainshell.logBtn.toolTip = 打开日志
bbb.mainshell.fullScreenBtn.toolTip = 全屏显示
bbb.mainshell.resetLayoutBtn.toolTip = 重置布局
# LogWindow.mxml
bbb.logwindow.title = 日志窗口
bbb.logwindow.highlight = 加亮关键词:
bbb.logwindow.turnLoggingOff = 停止记录
bbb.logwindow.clearBtn = 清空日志
bbb.logwindow.refreshBtn = 刷新
# JoinFailedWindow.mxml
bbb.joinFailedWindow.title = 连接失败
bbb.joinFailedWindow.okBtn = 确认
bbb.joinFailedWindow.failedInfo = 登陆超时,请重新登陆
# MainToolbar.mxml
bbb.mainToolbar.loggedInUserLbl = {0},您正以{2}角色参加{1}会议
bbb.mainToolbar.helpBtn = 帮助
bbb.mainToolbar.logoutBtn = 退出
bbb.mainToolbar.logoutBtn.toolTip = 退出
###### modules ######
# ViewersWindow.mxml
bbb.viewers.title = 网络参与者
bbb.viewers.viewersGrid.nameItemRenderer = 用户名
bbb.viewers.viewersGrid.nameItemRenderer.nameLabel.toolTip = 您以本用户名登陆
bbb.viewers.viewersGrid.roleItemRenderer = 角色
bbb.viewers.viewersGrid.statusItemRenderer = 状态
bbb.viewers.viewersGrid.statusItemRenderer.raiseHand.toolTip = 在 {0} 举手
bbb.viewers.viewersGrid.statusItemRenderer.streamIcon.toolTip = 查看
bbb.viewers.viewersGrid.statusItemRenderer.presIcon.toolTip = 幻灯片展示者
bbb.viewers.presentBtn.toolTip = 授权参与者展示幻灯片
bbb.viewers.raiseHandBtn.toolTip = 举手
# PresentationWindow.mxml
bbb.presentation.title = 幻灯片展示
bbb.presentation.uploadPresBtn.toolTip = 上传PDF文档
bbb.presentation.backBtn.toolTip = 上一张
bbb.presentation.slideNumLbl =
bbb.presentation.forwardBtn.toolTip = 下一张
bbb.presentation.resetZoomBtn.toolTip = 重置
bbb.presentation.presenterNameLbl = 当前演示者为 {0}
# FileUploadWindow.mxml
bbb.fileupload.title = 上传幻灯片
bbb.fileupload.fileLbl = 文件:
bbb.fileupload.selectBtn.toolTip = 浏览
bbb.fileupload.uploadBtn = 上传
bbb.fileupload.uploadBtn.toolTip = 上传文档
bbb.fileupload.presentationNamesLbl = 已上传幻灯片:
bbb.fileupload.deleteBtn.toolTip = 删除幻灯片
bbb.fileupload.showBtn = 演示
bbb.fileupload.showBtn.toolTip = 演示幻灯片
bbb.fileupload.okCancelBtn = 取消
bbb.fileupload.progressLbl.uploadSuccessful = 上传成功. 正在转换文档,请稍后.
bbb.fileupload.progressBar.uploadSuccessful = 上传成功.
bbb.fileupload.progressLbl.uploading = {0}% 已上传.
bbb.fileupload.progressBar.uploading = {0}% 已上传.
bbb.fileupload.progressLbl.converting = 正在转换{1}张幻灯片中第 {0} 张
bbb.fileupload.progressBar.converting = 正在转换{1}张幻灯片中第 {0} 张
bbb.fileupload.progressLbl.extracting = 正在压缩{1}张幻灯片中第 {0} 张
bbb.fileupload.progressBar.extracting = 正在压缩{1}张幻灯片中第 {0} 张
bbb.fileupload.genThumbText = 生成缩略图..
bbb.fileupload.progBarLbl = 上传进度:
# ChatWindow.mxml
bbb.chat.title = 聊天
bbb.chat.cmpColorPicker.toolTip = 文字颜色
bbb.chat.sendBtn = 发送
bbb.chat.sendBtn.toolTip = 发送消息
bbb.chat.publicChatUsername = 所有
# ListenersWindow.mxml
bbb.listeners.title = 语音参与者
bbb.listeners.muteAllBtn.toolTip = 全部静音
bbb.listeners.unmuteAllBtn.toolTip = 取消全部
bbb.listeners.ejectBtn.toolTip = 屏蔽语音参与者
# ListenerItem.mxml
bbb.listenerItem.nameLbl.toolTip = 单击按钮,进行静音/取消静音操作
bbb.listenerItem.talkImg.toolTip = 语音中
# PublishWindow.mxml
bbb.publishVideo.title = 摄像头
bbb.publishVideo.startPublishBtn.toolTip = 开始视频
# DesktopPublishWindow.mxml
bbb.desktopPublish.title = 桌面共享

View File

@ -38,6 +38,7 @@ package org.bigbluebutton.main.view
import org.bigbluebutton.modules.phone.views.components.ToolbarButton; import org.bigbluebutton.modules.phone.views.components.ToolbarButton;
import org.puremvc.as3.multicore.interfaces.INotification; import org.puremvc.as3.multicore.interfaces.INotification;
import org.puremvc.as3.multicore.patterns.mediator.Mediator; import org.puremvc.as3.multicore.patterns.mediator.Mediator;
import org.bigbluebutton.util.i18n.ResourceUtil;
/** /**
* This is the Mediator class for MainApplicationShell view compom\nent * This is the Mediator class for MainApplicationShell view compom\nent
@ -164,7 +165,7 @@ package org.bigbluebutton.main.view
// handleModuleStopped(info.moduleId, info.errors); // handleModuleStopped(info.moduleId, info.errors);
break; break;
case MainApplicationConstants.LOADED_MODULE: case MainApplicationConstants.LOADED_MODULE:
shell.statusInfo.text += notification.getBody() + "(loaded) "; shell.statusInfo.text += ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo.loaded',[notification.getBody()]);
// Should do this properly. // Should do this properly.
//if (notification.getBody() == "ViewersModule") { //if (notification.getBody() == "ViewersModule") {
@ -176,7 +177,7 @@ package org.bigbluebutton.main.view
var mod:String = notification.getBody().name as String; var mod:String = notification.getBody().name as String;
var prog:Number = notification.getBody().progress as Number; var prog:Number = notification.getBody().progress as Number;
shell.statusProgress.text = "Loading: " + mod + " " + prog + "% loaded."; shell.statusProgress.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.loaded',[mod, prog]);
break; break;
} }
} }
@ -184,16 +185,16 @@ package org.bigbluebutton.main.view
private function testRTMPConnection():void { private function testRTMPConnection():void {
var host:String = modulesProxy.getPortTestHost(); var host:String = modulesProxy.getPortTestHost();
var app:String = modulesProxy.getPortTestApplication(); var app:String = modulesProxy.getPortTestApplication();
shell.statusInfo.text = "Please wait while we test your connection to the server."; shell.statusInfo.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo.testRTMPConnection');
shell.statusInfo2.text = "This may take a minute or two."; shell.statusInfo2.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo2.testRTMPConnection');
shell.statusProgress.text = "Connecting to RTMP://" + host + ":1935/" + app + "."; shell.statusProgress.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.testRTMPConnection', [host, app]);
portTestProxy.connect("RTMP", host, "1935", app); portTestProxy.connect("RTMP", host, "1935", app);
} }
private function testRTMPTConnection():void { private function testRTMPTConnection():void {
var host:String = modulesProxy.getPortTestHost(); var host:String = modulesProxy.getPortTestHost();
var app:String = modulesProxy.getPortTestApplication(); var app:String = modulesProxy.getPortTestApplication();
shell.statusProgress.text = "Connecting to RTMPT://" + host + ":80/" + app + "."; shell.statusProgress.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.testRTMPTConnection', [host, app]);
portTestProxy.connect("RTMPT", host, "", "bigbluebutton"); portTestProxy.connect("RTMPT", host, "", "bigbluebutton");
} }

View File

@ -37,6 +37,7 @@
<mx:Script> <mx:Script>
<![CDATA[ <![CDATA[
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.common.Images; import org.bigbluebutton.common.Images;
import org.bigbluebutton.modules.viewers.events.JoinFailedEvent; import org.bigbluebutton.modules.viewers.events.JoinFailedEvent;
import com.asfusion.mate.events.Dispatcher; import com.asfusion.mate.events.Dispatcher;
@ -181,16 +182,16 @@
<flexmdi:MDICanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" <flexmdi:MDICanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off"
effectsLib="{flexlib.mdi.effects.effectsLib.MDIVistaEffects}" effectsLib="{flexlib.mdi.effects.effectsLib.MDIVistaEffects}"
width="100%" height="100%"> width="100%" height="100%">
<mx:Label x="200" y="400" id="statusInfo" text="Please wait while we load {numberOfModules} modules: "/> <mx:Label x="200" y="400" id="statusInfo" text="{ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo',[numberOfModules])}"/>
<mx:Label x="200" y="420" id="statusInfo2"/> <mx:Label x="200" y="420" id="statusInfo2"/>
<mx:Label x="200" y="440" id="statusProgress" text="Loading: "/> <mx:Label x="200" y="440" id="statusProgress" text="{ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.loading')}"/>
</flexmdi:MDICanvas> </flexmdi:MDICanvas>
<mx:ControlBar width="100%" height="20" paddingTop="0"> <mx:ControlBar width="100%" height="20" paddingTop="0">
<mx:Label text="(c) 2009, BigBlueButton version {appVersion} - For more information see http://www.bigbluebutton.org/." id="copyrightLabel2"/> <mx:Label text="{ResourceUtil.getInstance().getString('bbb.mainshell.copyrightLabel2',[appVersion])}" id="copyrightLabel2"/>
<mx:Spacer width="20"/> <mx:Spacer width="20"/>
<mx:Spacer width="100%"/> <mx:Spacer width="100%"/>
<mx:Button width="20" height="20" toolTip="Open Log Window" id="logBtn" icon="{logs_icon}" click="openLogWindow()" /> <mx:Button width="20" height="20" toolTip="{ResourceUtil.getInstance().getString('bbb.mainshell.logBtn.toolTip')}" id="logBtn" icon="{logs_icon}" click="openLogWindow()" />
<mx:Button width="20" height="20" toolTip="Toggle Full-Screen" id="fullScreen" icon="{fullscreen_icon}" click="toggleFullScreen()" /> <mx:Button width="20" height="20" toolTip="{ResourceUtil.getInstance().getString('bbb.mainshell.fullScreenBtn.toolTip')}" id="fullScreen" icon="{fullscreen_icon}" click="toggleFullScreen()" />
<mx:Button width="20" height="20" toolTip="Reset Layout" id="btnResetLayout" icon="{reset_layout_icon}" click="resetLayout()" /> <mx:Button width="20" height="20" toolTip="{ResourceUtil.getInstance().getString('bbb.mainshell.resetLayoutBtn.toolTip')}" id="btnResetLayout" icon="{reset_layout_icon}" click="resetLayout()" />
</mx:ControlBar> </mx:ControlBar>
</mx:VBox> </mx:VBox>

View File

@ -34,9 +34,10 @@
import org.bigbluebutton.main.events.CloseWindowEvent; import org.bigbluebutton.main.events.CloseWindowEvent;
import org.bigbluebutton.main.MainApplicationConstants; import org.bigbluebutton.main.MainApplicationConstants;
import org.bigbluebutton.main.view.MainApplicationShellMediator; import org.bigbluebutton.main.view.MainApplicationShellMediator;
import org.bigbluebutton.util.i18n.ResourceUtil;
public function loggedIn(name:String, room:String, role:String):void{ public function loggedIn(name:String, room:String, role:String):void{
loggedInUserLbl.text = "You are logged in as " + name + " to " + room + " as role " + role + "."; loggedInUserLbl.text = ResourceUtil.getInstance().getString('bbb.mainToolbar.loggedInUserLbl',[name, room, role]);//"You are logged in as " + name + " to " + room + " as role " + role + ".";
this.visible = true; this.visible = true;
} }
@ -69,7 +70,7 @@
<mx:HBox id="addedBtns"> <mx:HBox id="addedBtns">
</mx:HBox> </mx:HBox>
<mx:Spacer width="100%"/> <mx:Spacer width="100%"/>
<mx:LinkButton label="Help" click="navigateToURL(new URLRequest('http://www.bigbluebutton.org/content/videos'))"/> <mx:LinkButton label="{ResourceUtil.getInstance().getString('bbb.mainToolbar.helpBtn')}" click="navigateToURL(new URLRequest('http://www.bigbluebutton.org/content/videos'))"/>
<mx:Button label="Logout" id="btnLogout" toolTip="Log out" right="10" click="doLogout()"/> <mx:Button label="{ResourceUtil.getInstance().getString('bbb.mainToolbar.logoutBtn')}" id="btnLogout" toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.logoutBtn.toolTip')}" right="10" click="doLogout()"/>
</mx:ApplicationControlBar> </mx:ApplicationControlBar>

View File

@ -7,6 +7,7 @@ package org.bigbluebutton.modules.chat.maps
import org.bigbluebutton.main.events.CloseWindowEvent; import org.bigbluebutton.main.events.CloseWindowEvent;
import org.bigbluebutton.main.events.OpenWindowEvent; import org.bigbluebutton.main.events.OpenWindowEvent;
import org.bigbluebutton.modules.chat.views.components.ChatWindow; import org.bigbluebutton.modules.chat.views.components.ChatWindow;
import org.bigbluebutton.util.i18n.ResourceUtil;
public class ChatLocalEventMapDelegate public class ChatLocalEventMapDelegate
{ {
@ -24,7 +25,7 @@ package org.bigbluebutton.modules.chat.maps
} }
public function openChatWindow():void { public function openChatWindow():void {
_chatWindow.title = "Chat"; _chatWindow.title = ResourceUtil.getInstance().getString("bbb.chat.title");
_chatWindow.showCloseButton = false; _chatWindow.showCloseButton = false;
_chatWindow.xPosition = 675; _chatWindow.xPosition = 675;
_chatWindow.yPosition = 0; _chatWindow.yPosition = 0;

View File

@ -25,9 +25,10 @@
import org.bigbluebutton.modules.chat.model.business.UserVO; import org.bigbluebutton.modules.chat.model.business.UserVO;
import mx.collections.ArrayCollection; import mx.collections.ArrayCollection;
import mx.core.UIComponent; import mx.core.UIComponent;
import org.bigbluebutton.util.i18n.ResourceUtil;
private static const PUBLIC_CHAT_USERID:String = '0'; private static const PUBLIC_CHAT_USERID:String = '0';
private static const PUBLIC_CHAT_USERNAME:String = 'All'; private static const PUBLIC_CHAT_USERNAME:String = ResourceUtil.getInstance().getString("bbb.chat.publicChatUsername");
public var localDispatcher:IEventDispatcher; public var localDispatcher:IEventDispatcher;
@ -300,8 +301,8 @@
<mx:ApplicationControlBar id="chatCtrlBar" width="100%" height="10%"> <mx:ApplicationControlBar id="chatCtrlBar" width="100%" height="10%">
<mx:TextInput id="txtMsg" width="100%" enter="sendMessages()"/> <mx:TextInput id="txtMsg" width="100%" enter="sendMessages()"/>
<mx:ColorPicker id="cmpColorPicker" showTextField="false" toolTip="Text Color" selectedColor="0x000000"/> <mx:ColorPicker id="cmpColorPicker" showTextField="false" toolTip="{ResourceUtil.getInstance().getString('bbb.chat.cmpColorPicker.toolTip')}" selectedColor="0x000000"/>
<mx:Button label="Send" id="sendBtn" toolTip="Send Message" click="sendMessages()"/> <mx:Button label="{ResourceUtil.getInstance().getString('bbb.chat.sendBtn')}" id="sendBtn" toolTip="{ResourceUtil.getInstance().getString('bbb.chat.sendBtn.toolTip')}" click="sendMessages()"/>
<mx:ComboBox id="participantList" dataProvider="{participants}" close="onOpenChatBox()" /> <mx:ComboBox id="participantList" dataProvider="{participants}" close="onOpenChatBox()" />
</mx:ApplicationControlBar> </mx:ApplicationControlBar>
</mx:VBox> </mx:VBox>

View File

@ -31,6 +31,7 @@ package org.bigbluebutton.modules.viewers.view
import org.puremvc.as3.multicore.interfaces.IMediator; import org.puremvc.as3.multicore.interfaces.IMediator;
import org.puremvc.as3.multicore.interfaces.INotification; import org.puremvc.as3.multicore.interfaces.INotification;
import org.puremvc.as3.multicore.patterns.mediator.Mediator; import org.puremvc.as3.multicore.patterns.mediator.Mediator;
import org.bigbluebutton.util.i18n.ResourceUtil;
/** /**
* The ViewersWindowMediator is a mediator class for the ViewersWindow gui component * The ViewersWindowMediator is a mediator class for the ViewersWindow gui component
@ -116,7 +117,7 @@ package org.bigbluebutton.modules.viewers.view
private function handleOpenViewersWindow():void { private function handleOpenViewersWindow():void {
_viewersWindow.participants = proxy.participants; _viewersWindow.participants = proxy.participants;
_viewersWindow.isModerator = proxy.isModerator(); _viewersWindow.isModerator = proxy.isModerator();
_viewersWindow.title = "Web Participants"; _viewersWindow.title = ResourceUtil.getInstance().getString('bbb.viewers.title');
_viewersWindow.showCloseButton = false; _viewersWindow.showCloseButton = false;
_viewersWindow.xPosition = 0; _viewersWindow.xPosition = 0;
_viewersWindow.yPosition = 0; _viewersWindow.yPosition = 0;

View File

@ -22,9 +22,13 @@
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
verticalScrollPolicy="off" horizontalScrollPolicy="off"> verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Script>
<![CDATA[
import org.bigbluebutton.util.i18n.ResourceUtil;
]]>
</mx:Script>
<mx:Label id="nameLabel" textAlign="left" text="{data.name}" <mx:Label id="nameLabel" textAlign="left" text="{data.name}"
fontWeight="{data.me ? 'bold' : 'normal'}" fontWeight="{data.me ? 'bold' : 'normal'}"
color="{data.me ? 0x003399 : 0x000000}" color="{data.me ? 0x003399 : 0x000000}"
toolTip="{data.me ? 'You are logged in as this user.' : ''}"/> toolTip="{data.me ? ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.nameItemRenderer.nameLabel.toolTip') : ''}"/>
</mx:HBox> </mx:HBox>

View File

@ -30,7 +30,8 @@
import org.bigbluebutton.modules.viewers.view.events.LowerHandEvent; import org.bigbluebutton.modules.viewers.view.events.LowerHandEvent;
import org.bigbluebutton.modules.viewers.model.vo.Status; import org.bigbluebutton.modules.viewers.model.vo.Status;
import org.bigbluebutton.modules.viewers.view.components.Images; import org.bigbluebutton.modules.viewers.view.components.Images;
import org.bigbluebutton.util.i18n.ResourceUtil;
private var images:Images = new Images(); private var images:Images = new Images();
private function viewCamera():void private function viewCamera():void
@ -49,7 +50,7 @@
[Bindable] private var presenterIcon:Object = images.presenter; [Bindable] private var presenterIcon:Object = images.presenter;
]]> ]]>
</mx:Script> </mx:Script>
<mx:Image id="raiseHand" visible="{data.raiseHand}" click="lowerHand()" source="{handIcon}" toolTip="Hand Raised on {new Date()}"/> <mx:Image id="raiseHand" visible="{data.raiseHand}" click="lowerHand()" source="{handIcon}" toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.statusItemRenderer.raiseHand.toolTip'), [new Date()]}"/>
<mx:Image id="streamIcon" visible="{data.hasStream}" doubleClick="viewCamera()" source="{webcamIcon}" toolTip="Double-Click to view."/> <mx:Image id="streamIcon" visible="{data.hasStream}" doubleClick="viewCamera()" source="{webcamIcon}" toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.statusItemRenderer.streamIcon.toolTip')}"/>
<mx:Image id="presIcon" visible="{data.presenter}" source="{presenterIcon}" toolTip="Presenter"/> <mx:Image id="presIcon" visible="{data.presenter}" source="{presenterIcon}" toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.statusItemRenderer.presIcon.toolTip')}"/>
</mx:HBox> </mx:HBox>

View File

@ -38,6 +38,7 @@
import org.bigbluebutton.modules.viewers.view.components.Images; import org.bigbluebutton.modules.viewers.view.components.Images;
import org.bigbluebutton.modules.viewers.view.ViewersWindowMediator; import org.bigbluebutton.modules.viewers.view.ViewersWindowMediator;
import mx.collections.ArrayCollection; import mx.collections.ArrayCollection;
import org.bigbluebutton.util.i18n.ResourceUtil;
public static const TITLE:String = "Viewers"; public static const TITLE:String = "Viewers";
@ -151,11 +152,11 @@
<mx:DataGrid id="viewersGrid" dataProvider="{participants}" editable="false" <mx:DataGrid id="viewersGrid" dataProvider="{participants}" editable="false"
dragEnabled="false" itemClick="viewerSelectEvent(event);" width="100%" height="100%"> dragEnabled="false" itemClick="viewerSelectEvent(event);" width="100%" height="100%">
<mx:columns> <mx:columns>
<mx:DataGridColumn dataField="role" headerText="Role" dataTipField="Role" editable="false" width="35" <mx:DataGridColumn dataField="role" headerText="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.roleItemRenderer')}" dataTipField="Role" editable="false" width="35"
itemRenderer="org.bigbluebutton.modules.viewers.view.components.RoleItemRenderer" sortable="false"/> itemRenderer="org.bigbluebutton.modules.viewers.view.components.RoleItemRenderer" sortable="false"/>
<mx:DataGridColumn dataField="name" headerText="Name" editable="true" width="100" sortable="false" <mx:DataGridColumn dataField="name" headerText="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.nameItemRenderer')}" editable="true" width="100" sortable="false"
itemRenderer="org.bigbluebutton.modules.viewers.view.components.NameItemRenderer"/> itemRenderer="org.bigbluebutton.modules.viewers.view.components.NameItemRenderer"/>
<mx:DataGridColumn dataField="status" headerText="Status" sortable="false" <mx:DataGridColumn dataField="status" headerText="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.statusItemRenderer')}" sortable="false"
itemRenderer="org.bigbluebutton.modules.viewers.view.components.StatusItemRenderer"/> itemRenderer="org.bigbluebutton.modules.viewers.view.components.StatusItemRenderer"/>
</mx:columns> </mx:columns>
</mx:DataGrid> </mx:DataGrid>
@ -163,12 +164,12 @@
<mx:ControlBar width="100%"> <mx:ControlBar width="100%">
<mx:Button id="presentBtn" icon="{presenterIcon}" visible="{isModerator}" enabled="{viewersGrid.selectedItem != null}" <mx:Button id="presentBtn" icon="{presenterIcon}" visible="{isModerator}" enabled="{viewersGrid.selectedItem != null}"
width="20" height="20" width="20" height="20"
toolTip="Select web participant to be presenter." toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.presentBtn.toolTip')}"
click="assignPresenterClicked()"/> click="assignPresenterClicked()"/>
<mx:Spacer width="100%"/> <mx:Spacer width="100%"/>
<mx:Button id="raiseHandImage" icon="{handIcon}" toggle="true" <mx:Button id="raiseHandImage" icon="{handIcon}" toggle="true"
width="20" height="20" width="20" height="20"
toolTip="{toggleTooltip}" click="dispatchEvent(new Event(ViewersWindowMediator.CHANGE_STATUS))"/> toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.raiseHandBtn.toolTip')}" click="dispatchEvent(new Event(ViewersWindowMediator.CHANGE_STATUS))"/>
</mx:ControlBar> </mx:ControlBar>
<mx:SoundEffect id="userJoinSound" source="@Embed('../assets/sounds/user_join.mp3')" target="{this}" /> <mx:SoundEffect id="userJoinSound" source="@Embed('../assets/sounds/user_join.mp3')" target="{this}" />

View File

@ -0,0 +1,65 @@
package org.bigbluebutton.util.i18n
{
import flash.events.Event;
import flash.events.IEventDispatcher;
import flash.events.EventDispatcher;
import mx.controls.Alert;
import mx.events.ResourceEvent;
import mx.resources.IResourceManager;
import mx.resources.ResourceManager;
public class ResourceUtil extends EventDispatcher
{
private static var instance:ResourceUtil = null;
private static var MSG_RESOURCE:String = 'bbbResources';
private var localeChain:Array = [ "en_US", "zh_CN" ];
private var resourceManager:IResourceManager = ResourceManager.getInstance();
public function ResourceUtil(enforcer:SingletonEnforcer)
{
if (enforcer == null) {
throw new Error( "You Can Only Have One ResourceUtil" );
}
else {
// changeLocale(localeChain[0]);
}
}
public static function getInstance():ResourceUtil {
if (instance == null) {
instance = new ResourceUtil(new SingletonEnforcer);
}
return instance;
}
public function changeLocale(... chain):void{
if(chain != null && chain.length > 0)
{
var localeURI:String = 'locale/' + chain[0] + '_resources.swf';
var eventDispatcher:IEventDispatcher = resourceManager.loadResourceModule(localeURI,true);
localeChain = [chain[0]];
eventDispatcher.addEventListener(ResourceEvent.COMPLETE, localeChangeComplete);
}
}
private function localeChangeComplete(event:ResourceEvent):void{
resourceManager.localeChain = localeChain;
update();
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
[Bindable("change")]
public function getString(resourceName:String, parameters:Array = null, locale:String = null):String{
return resourceManager.getString(MSG_RESOURCE, resourceName, parameters, locale);
}
}
}
class SingletonEnforcer{}