You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2012/12/21 07:37:47 UTC
svn commit: r1424812 -
/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
Author: aharui
Date: Fri Dec 21 06:37:47 2012
New Revision: 1424812
URL: http://svn.apache.org/viewvc?rev=1424812&view=rev
Log:
Add -language= command-line param. Not for documentation, but helps with testing. There are code paths affected by the default language before you select a language from the dropdown.
Modified:
incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml?rev=1424812&r1=1424811&r2=1424812&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml (original)
+++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Fri Dec 21 06:37:47 2012
@@ -36,7 +36,8 @@ variables are not required because the l
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="800" height="650" maxWidth="800" maxHeight="650" minWidth="800" minHeight="650"
- backgroundColor="0xDDDDDD"
+ backgroundColor="0xDDDDDD"
+ preinitialize="getInvoke()"
applicationComplete="handleApplicationComplete(event)" showStatusBar="false"
skinClass="ws.tink.spark.skins.controls.InstallApacheFlexSkin"
xmlns:controls="ws.tink.spark.controls.*"
@@ -182,6 +183,8 @@ variables are not required because the l
private var _numOptionalComponents:int = 4;
private var _numOptionalComponentsPermissions:int = 0;
+ private var languageOverride:String;
+
[Bindable] private var _viewResourceConstants:ViewResourceConstants;
[Bindable] private var _installationSteps:ArrayCollection = new ArrayCollection();
[Bindable] private var _installerComponentsDataProvider:ArrayCollection = new ArrayCollection();
@@ -189,6 +192,23 @@ variables are not required because the l
[Bindable] private var _currentLicenseLabel:String;
[Bindable] public var _messages:ArrayCollection = new ArrayCollection();
+ private function getInvoke():void
+ {
+ var nativeApplication:NativeApplication = NativeApplication.nativeApplication;
+ nativeApplication.addEventListener(InvokeEvent.INVOKE, parseArgs);
+ }
+
+ private function parseArgs(event:InvokeEvent):void
+ {
+ for each (var s:String in event.arguments)
+ {
+ if (s.indexOf("-language=") == 0)
+ {
+ languageOverride = s.substring(10);
+ }
+ }
+ }
+
protected function handleApplicationComplete(event:FlexEvent):void
{
_langSelect.dataProvider = ViewResourceConstants.supportedLanguages;
@@ -223,6 +243,10 @@ variables are not required because the l
var supportedLanguages:ArrayCollection = ViewResourceConstants.supportedLanguages;
var userLocale:String = new StringTools(LocaleID.DEFAULT).actualLocaleIDName.replace("-","_");
+
+ if (languageOverride)
+ userLocale = languageOverride;
+
var n:int = supportedLanguages.length;
for (var i:int = 0; i < n; i++)
{