From d2257b46c9c01a115a636e66bb1102ea307ab263 Mon Sep 17 00:00:00 2001 From: BigBlueButton Date: Thu, 2 Sep 2010 03:42:44 +0000 Subject: [PATCH] Found a way to dynamically update localization strings in flexlib MDIWindow --- .../modules/chat/views/components/ChatWindow.mxml | 8 +++++++- .../deskshare/view/components/DesktopPublishWindow.mxml | 5 +++++ .../deskshare/view/components/DesktopViewWindow.mxml | 5 +++++ .../modules/listeners/views/ListenersWindow.mxml | 8 ++++++++ .../modules/present/views/PresentationWindow.mxml | 5 +++++ .../modules/videoconf/views/PublishWindow.mxml | 8 +++++++- .../modules/viewers/views/ViewersWindow.mxml | 7 ++++++- 7 files changed, 43 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/components/ChatWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/components/ChatWindow.mxml index 83f59070d9..3196caed31 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/components/ChatWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/components/ChatWindow.mxml @@ -36,6 +36,7 @@ import mx.core.Application; import org.bigbluebutton.main.views.MainCanvas; + import org.bigbluebutton.util.i18n.ResourceUtil; private var _xPosition:int; private var _yPosition:int; @@ -63,7 +64,12 @@ chatView.txtMsg.enabled = true; chatView.sendBtn.enabled = true; } - } + } + + override protected function resourcesChanged():void{ + super.resourcesChanged(); + this.title = ResourceUtil.getInstance().getString("bbb.chat.title"); + } ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml index 581c001e1c..3421bbd96e 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml @@ -236,6 +236,11 @@ closeWindow(); } + override protected function resourcesChanged():void{ + super.resourcesChanged(); + this.title = ResourceUtil.getInstance().getString('bbb.desktopPublish.title'); + } + ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml index 5fb0d49899..62651b5aac 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml @@ -296,6 +296,11 @@ dispatchEvent(new ViewWindowEvent(ViewWindowEvent.CLOSE)); } + override protected function resourcesChanged():void{ + super.resourcesChanged(); + this.title = ResourceUtil.getInstance().getString('bbb.desktopView.title'); + } + ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/listeners/views/ListenersWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/listeners/views/ListenersWindow.mxml index e491dea2b8..0d00d4feb3 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/listeners/views/ListenersWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/listeners/views/ListenersWindow.mxml @@ -160,6 +160,14 @@ moderator = e.moderator; showCloseButton = false; } + + override protected function resourcesChanged():void{ + super.resourcesChanged(); + if (listeners.length > 4) + windowTitle = ResourceUtil.getInstance().getString('bbb.listeners.title', [":", listeners.length]) ; + else + windowTitle = ResourceUtil.getInstance().getString('bbb.listeners.title', ["", ""]) ; + } ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml index 8e96f8afcc..3706c03d62 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml @@ -25,7 +25,7 @@ implements="org.bigbluebutton.common.IBbbModuleWindow" creationComplete="init()" width="{camWidth + 6}" height="{camHeight + 73}" - title="Stream webcam" + title="{ResourceUtil.getInstance().getString('bbb.publishVideo.title')}" backgroundImage="{bbbLogo}" resizable="false" xmlns:mate="http://mate.asfusion.com/"> @@ -42,6 +42,7 @@ import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent; import org.bigbluebutton.modules.videoconf.events.StartBroadcastEvent; import org.bigbluebutton.modules.videoconf.events.StopBroadcastEvent; + import org.bigbluebutton.util.i18n.ResourceUtil; private var images:Images = new Images(); [Bindable] public var camIcon:Class = images.control_play; @@ -159,6 +160,11 @@ } } + override protected function resourcesChanged():void{ + super.resourcesChanged(); + this.title = ResourceUtil.getInstance().getString('bbb.publishVideo.title'); + } + ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/viewers/views/ViewersWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/viewers/views/ViewersWindow.mxml index 661ede9f0b..d5f8eeea37 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/viewers/views/ViewersWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/viewers/views/ViewersWindow.mxml @@ -54,7 +54,7 @@ import org.bigbluebutton.util.i18n.ResourceUtil; [Bindable] - private var windowTitle:String = ResourceUtil.getInstance().getString('bbb.viewers.title',["", ""]) ; + private var windowTitle:String = ResourceUtil.getInstance().getString('bbb.viewers.title',["", ""]); [Bindable] public var participants:ArrayCollection = new ArrayCollection(); @@ -138,6 +138,11 @@ dispatchEvent(new KickUserEvent(viewersGrid.selectedItem.userid)); } } + + override protected function resourcesChanged():void{ + super.resourcesChanged(); + this.title = ResourceUtil.getInstance().getString('bbb.viewers.title',["", ""]); + } ]]>