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 ED495D14C for ; Thu, 20 Dec 2012 08:41:40 +0000 (UTC) Received: (qmail 94751 invoked by uid 500); 20 Dec 2012 08:41:40 -0000 Delivered-To: apmail-incubator-flex-commits-archive@incubator.apache.org Received: (qmail 94576 invoked by uid 500); 20 Dec 2012 08:41:39 -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 94546 invoked by uid 99); 20 Dec 2012 08:41:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2012 08:41:38 +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; Thu, 20 Dec 2012 08:41:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 513442388962; Thu, 20 Dec 2012 08:41:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1424368 - /incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Date: Thu, 20 Dec 2012 08:41:14 -0000 To: flex-commits@incubator.apache.org From: bigosmallm@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121220084114.513442388962@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bigosmallm Date: Thu Dec 20 08:41:13 2012 New Revision: 1424368 URL: http://svn.apache.org/viewvc?rev=1424368&view=rev Log: Fix for FLEX-33223 (Failed installer translation into languages ​​other than en_US) Patch submitted by Stefan Horochovec 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=1424368&r1=1424367&r2=1424368&view=diff ============================================================================== --- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml (original) +++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Thu Dec 20 08:41:13 2012 @@ -191,19 +191,28 @@ variables are not required because the l protected function handleApplicationComplete(event:FlexEvent):void { - _langSelect.dataProvider = ViewResourceConstants.supportedLanguages; - _langSelect.selectedIndex = 0; - selectDefaultLanguage(); - - _viewResourceConstants = ViewResourceConstants.instance; - resourceManager.addEventListener(Event.CHANGE, _viewResourceConstants.update); - _viewResourceConstants.update(); + _langSelect.dataProvider = ViewResourceConstants.supportedLanguages; + _langSelect.selectedIndex = 0; + defineResourceManagerDefaultLanguage(); updateWindow(); loadXML(); } + /** + * Define on ResourceManager all keys for translation. + * If some key is not present on any other language selected by user, the default value will be displayed + * on the screen + */ + private function defineResourceManagerDefaultLanguage() : void + { + resourceManager.localeChain = [ ViewResourceConstants.DEFAULT_LANGUAGE ]; + _viewResourceConstants = ViewResourceConstants.instance; + _viewResourceConstants.update(); + selectDefaultLanguage(); + } + private function updateWindowTitle():void { this.nativeWindow.title = _viewResourceConstants.INFO_WINDOW_TITLE; @@ -225,6 +234,10 @@ variables are not required because the l break; } } + resourceManager.addEventListener(Event.CHANGE, _viewResourceConstants.update); + + _viewResourceConstants.update(); + } protected function updateWindow():void