Found a way to dynamically update localization strings in flexlib MDIWindow

This commit is contained in:
BigBlueButton 2010-09-02 03:42:44 +00:00
parent defdaa8270
commit d2257b46c9
7 changed files with 43 additions and 3 deletions

View File

@ -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");
}
]]>
</mx:Script>

View File

@ -236,6 +236,11 @@
closeWindow();
}
override protected function resourcesChanged():void{
super.resourcesChanged();
this.title = ResourceUtil.getInstance().getString('bbb.desktopPublish.title');
}
]]>
</mx:Script>
<mx:Image id="cursorImg" visible="false" source="@Embed('../../assets/images/cursor4.png')"/>

View File

@ -296,6 +296,11 @@
dispatchEvent(new ViewWindowEvent(ViewWindowEvent.CLOSE));
}
override protected function resourcesChanged():void{
super.resourcesChanged();
this.title = ResourceUtil.getInstance().getString('bbb.desktopView.title');
}
]]>
</mx:Script>
<mx:Move id="cursorMove" target="{cursorImg}"/>

View File

@ -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', ["", ""]) ;
}
]]>
</mx:Script>
<mx:TileList id="listenersList" height="100%" width="100%" itemClick="listenerSelectEvent(event);"

View File

@ -532,6 +532,11 @@
public function getSlideView():SlideView{
return this.slideView;
}
override protected function resourcesChanged():void{
super.resourcesChanged();
if ((slideView != null) && (!slideView.visible)) this.title = ResourceUtil.getInstance().getString('bbb.presentation.title');
}
]]>
</mx:Script>

View File

@ -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');
}
]]>
</mx:Script>

View File

@ -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',["", ""]);
}
]]>
</mx:Script>