incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigosma...@apache.org
Subject svn commit: r1424368 - /incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
Date Thu, 20 Dec 2012 08:41:14 GMT
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



Mime
View raw message