Return-Path: X-Original-To: apmail-incubator-flex-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 936A99EA5 for ; Fri, 21 Dec 2012 06:38:11 +0000 (UTC) Received: (qmail 73072 invoked by uid 500); 21 Dec 2012 06:38:11 -0000 Delivered-To: apmail-incubator-flex-commits-archive@incubator.apache.org Received: (qmail 72858 invoked by uid 500); 21 Dec 2012 06:38:09 -0000 Mailing-List: contact flex-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-commits@incubator.apache.org Received: (qmail 72828 invoked by uid 99); 21 Dec 2012 06:38:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Dec 2012 06:38:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Dec 2012 06:38:07 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 874CA23889B3; Fri, 21 Dec 2012 06:37:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1424812 - /incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Date: Fri, 21 Dec 2012 06:37:47 -0000 To: flex-commits@incubator.apache.org From: aharui@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121221063747.874CA23889B3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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++) {