incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1369982 [19/19] - in /incubator/flex/trunk/mustella/tests/RuntimeLocalization: ./ RTL_HaloSkin/ RTL_HaloSkin/Integration/ RTL_HaloSkin/Integration/Baselines/ RTL_HaloSkin/SWFs/ RTL_HaloSkin/SWFs/Assets/ RTL_HaloSkin/SWFs/Assets/Modules/ RT...
Date Mon, 06 Aug 2012 20:25:38 GMT
Added: incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/RTL_ResourceBundleMetadata_frFR_jaJP_enUS.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/RTL_ResourceBundleMetadata_frFR_jaJP_enUS.mxml?rev=1369982&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/RTL_ResourceBundleMetadata_frFR_jaJP_enUS.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/RTL_ResourceBundleMetadata_frFR_jaJP_enUS.mxml
Mon Aug  6 20:25:24 2012
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<s:Application width="800" height="800" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark" xmlns:Components="Components.*" backgroundColor="0x008800"
>
+
+<fx:Metadata>
+    [ResourceBundle("bundle1")]
+    [ResourceBundle("bundle2")]
+    [ResourceBundle("bundle3")]
+    [ResourceBundle("bundle4")]
+</fx:Metadata>
+
+<fx:Script><![CDATA[
+    import mx.resources.ResourceManager;
+]]></fx:Script>
+
+<!-- Embed fonts for cross platform compatibility of bitmap compares. -->
+<fx:Style>
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace mx "library://ns.adobe.com/flex/mx";
+    @font-face {
+        src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+
+    @font-face {
+        src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+
+    @font-face {
+        src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+    
+    global{
+        fontFamily: EmbeddedVerdana;
+        fontAntiAliasType: normal;
+    }
+    
+    
+    
+    
+    
+    
+    
+    @font-face {
+        src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVerdana2;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVerdana2;
+        embedAsCFF: true;
+    }
+
+    @font-face {
+        src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVerdana2;
+        embedAsCFF: true;
+    }
+    
+    s|Button{
+        fontFamily: EmbeddedVerdana2;
+        fontLookup: embeddedCFF;
+        fontAntiAliasType: normal;
+    }    
+</fx:Style>
+
+<fx:Declarations>
+    <!-- Fields needed to pull in framework bundles. -->
+    <mx:DateField />
+    <mx:NumberValidator />
+    <mx:NumberFormatter />
+    <fx:Array />
+</fx:Declarations>
+
+<s:layout>
+    <s:VerticalLayout />
+</s:layout>
+
+    <mx:HBox>
+        <mx:Label text="Feel free to change the locale chain manually here." />
+        <mx:TextInput id="tiLocaleChain" width="100" />
+        <mx:Button label="Apply!" click="{resourceManager.localeChain=tiLocaleChain.text.split(',')}"
/>
+    </mx:HBox>
+
+<!-- Fields needed by RTL_ResourceBundleMetadata_3Locales.mxml -->
+
+<!-- 
+    There are many custom classes so that we can call ResetComponent and still
+    have our binding expressions.
+-->
+
+<!--
+===================================================================
+ResourceBundle Metadata Properties
+===================================================================
+-->
+
+    <mx:Label color="0xffffff" text="Property ResourceBundle Metadata tests (resourceManager.getXX()):"
/>
+
+    <mx:HBox>
+        <mx:Label text="Framework string:" />
+        <Components:CLabelTextGetStringFramework id="lbl1" />
+    </mx:HBox>
+
+    <mx:HBox>
+        <mx:Label text="Non-framework string, as a property:" />
+        <Components:CLabelTextGetStringCustom id="lbl2" />
+    </mx:HBox>
+
+    <mx:HBox>
+        <mx:Label text="Number (alpha=0.3 for French, 0.7 for English, 0.5 for Japanese):"
 />
+        <Components:CTextInputAlphaGetNumber id="ti1" />
+    </mx:HBox>
+
+    <mx:HBox>
+        <mx:Label text="int (maxChars=7 for French, 12 for English, 3 for Japanese):"
 />
+        <Components:CTextInputMaxCharsGetInt id="ti2" />
+    </mx:HBox>
+
+    <mx:HBox>
+        <mx:Label text="uint (selectedColor=blue for French, green for English, red for
Japanese):"  />
+        <Components:CColorPickerSelectedColorGetUint id="cp1" />
+    </mx:HBox>
+    
+    <mx:HBox>
+        <mx:Label text="Boolean (unchecked/checked for French, checked/unchecked for English,
both checked for Japanese):"  />
+        <Components:CCheckBoxSelectedGetBooleanLeft id="ck1" />
+        <Components:CCheckBoxSelectedGetBooleanRight id="ck2" />
+    </mx:HBox>    
+
+    <mx:HBox>
+        <mx:Label text="StringArray (month names begin with fr, en, or ja):"  />
+        <Components:CDateChooserMonthNamesGetStringArray id="dc1" />
+    </mx:HBox>
+
+    <mx:HBox id="img1Container">
+        <mx:Label text="Class with Embed (image is the country's flag.):"  />
+        <Components:CImageSourceGetClass id="img1"  />
+    </mx:HBox>
+
+<!--
+===================================================================
+ResourceBundle Metadata Styles
+===================================================================
+-->
+    <mx:Label color="0xffffff" text="Style ResourceBundle Metadata tests (resourceManager.getXX()):"
/>
+    
+    <mx:HBox>
+        <mx:Label text="String (right italicized for French, left one for English, both
for Japanese):"  />
+        <Components:CLabelFontStyleGetStringLeft id="lbl3" />
+        <Components:CLabelFontStyleGetStringRight id="lbl4" />
+    </mx:HBox>    
+
+    <mx:HBox>
+        <mx:Label text="Number (right tiny for French, left tiny for English, both tiny
for Japanese):"  />
+        <Components:CLabelFontSizeGetNumberLeft id="lbl5" />
+        <Components:CLabelFontSizeGetNumberRight id="lbl6" />
+    </mx:HBox>
+
+    <mx:HBox>
+        <mx:Label text="int (3 zeroes for French, 4 for English, 6 for Japanese):"  />
+        <Components:CSliderPrecisionGetInt id="slider1" />
+    </mx:HBox>
+   
+    <mx:HBox>
+        <mx:Label text="uint (Red for French, blue for English, green for Japanese):"
 />
+        <Components:CLabelColorGetUint id="lbl7" />
+    </mx:HBox>
+
+    <!-- Left's lineThrough is false, right's lineThrough is true, for French. -->
+    <!-- Left's lineThrough is true, right's lineThrough is false, for English. -->
+    <!-- Both have lineThrough = true for Japanese. -->
+    <mx:HBox>
+        <mx:Label text="Boolean:."  />
+        <mx:HBox>
+            <Components:CFxButtonLineThroughGetBooleanLeft id="btn1" />
+            <Components:CFxButtonLineThroughGetBooleanRight id="btn2" />
+        </mx:HBox>
+    </mx:HBox>
+
+     <mx:HBox>
+         <mx:Label text="StringArray (alternating colors are green/blue for French, red/blue
for English, white/red for Japanese):"  />
+         <Components:CListAlternatingColorsGetStringArray id="list1" />
+    </mx:HBox>    
+ 
+    <mx:HBox>
+         <mx:Label text="Class style using Embed (Button skins are the country's flag):"
 />
+         <Components:CButtonOverSkinGetClass id="btn3" />
+    </mx:HBox>
+    
+    <mx:HBox>
+        <mx:Label text="Class style using ClassReference (French has a backwards check,
English has a forwards one, Japanese has a square):"  />
+        <Components:CCheckBoxSelectedIconsGetClass id="ck3" />
+    </mx:HBox>
+
+</s:Application>

Added: incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/pre_compile.sh
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/pre_compile.sh?rev=1369982&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/pre_compile.sh
(added)
+++ incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/pre_compile.sh
Mon Aug  6 20:25:24 2012
@@ -0,0 +1,106 @@
+#!/bin/sh
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+# Prevent rerunning when debugging by setting this to 0.
+DO_PRECOMPILE=1
+
+if [ $DO_PRECOMPILE != "0" ]
+then
+    
+    cd Assets
+    
+    echo "pre_compile.sh: SDK: $SDK_DIR"
+    echo "pre_compile.sh: SDK Version:"
+    $SDK_DIR/bin/mxmlc -version
+    
+    echo ""
+    echo "Removing previously compiled files..."
+    # Be careful to not delete bundles/flex20's SWC, since that is a 2.0 SWC we need to keep
around.
+    rm -f `find . -name "*.swf"`
+    rm -f `find bundles/custom -name "*.swc"`
+    rm -f `find bundles/custom2 -name "*.swc"`
+    rm -f `find bundles/framework -name "*.swc"`
+    rm -f `find Modules -name "*.swc"`
+    
+    # Do this so that we don't hit not-a-bug number SDK-11855: 
+    #    Compc: Empty locale/{locale} directory has to be created in project's or framework's
directory structure if specifying a locale.
+    # and don't create the locale/{locale} directory here in the SWFs directory or else the
tests will fail if bug SDK-11860 gets fixed.
+    # We will use -library-path=$LIBRARY_PATH whenever there is a locale that is not en_US.
+    echo "Defining a library path to avoid changing your frameworks directory..."
+    LIBRARY_PATH="$SDK_DIR/frameworks/libs,$SDK_DIR/frameworks/libs/mx"
+    
+    echo "Compiling new framework SWCs..."
+    $SDK_DIR/bin/compc -library-path=$LIBRARY_PATH -source-path=bundles/framework/de_DE -locale
de_DE -include-resource-bundles collections components containers controls core effects formatters
layout logging SharedResources skins states styles validators textLayout sparkEffects -o bundles/framework/deResources.swc
+    $SDK_DIR/bin/compc -source-path=bundles/framework/en_US -locale en_US -include-resource-bundles
collections components containers controls core effects formatters layout logging SharedResources
skins states styles validators textLayout -o bundles/framework/enResources.swc
+    $SDK_DIR/bin/compc -library-path=$LIBRARY_PATH -source-path=bundles/framework/fr_FR -locale
fr_FR -include-resource-bundles collections components containers controls core effects formatters
layout logging SharedResources skins states styles validators textLayout sparkEffects -o bundles/framework/frResources.swc
+    $SDK_DIR/bin/compc -library-path=$LIBRARY_PATH -source-path=bundles/framework/ja_JP -locale
ja_JP -include-resource-bundles collections components containers controls core effects formatters
layout logging SharedResources skins states styles validators textLayout sparkEffects -o bundles/framework/jaResources.swc
+    $SDK_DIR/bin/compc -library-path=$LIBRARY_PATH -source-path=bundles/framework/qa_QA -locale
qa_QA -include-resource-bundles collections components containers controls core effects formatters
layout logging SharedResources skins states styles validators textLayout sparkEffects -o bundles/framework/qaResources.swc
+    
+    # echo ""
+    # echo "Compiling new custom SWCs..."
+    $SDK_DIR/bin/compc -library-path=$LIBRARY_PATH -source-path=bundles/custom/fr_FR -locale
fr_FR -include-resource-bundles bundle1 bundle2 bundle3 bundle4 bundle5 -include-file locale/fr_FR/flag.gif
bundles/custom/fr_FR/flag.gif -include-classes HaloColors MyCheckBoxIcon_fr_FR -o bundles/custom/frCustomResources.swc
+    $SDK_DIR/bin/compc -library-path=$LIBRARY_PATH -source-path=bundles/custom/ja_JP -locale
ja_JP -include-resource-bundles bundle1 bundle2 bundle3 bundle4 bundle5 -include-file locale/ja_JP/flag.gif
bundles/custom/ja_JP/flag.gif -include-classes HaloColors MyCheckBoxIcon_ja_JP -o bundles/custom/jaCustomResources.swc
+    $SDK_DIR/bin/compc -source-path=bundles/custom/en_US -locale en_US -include-resource-bundles
bundle1 bundle2 bundle3 bundle4 bundle5 -include-file locale/en_US/flag.gif bundles/custom/en_US/flag.gif
-include-classes HaloColors MyCheckBoxIcon_en_US -o bundles/custom/enCustomResources.swc
+     
+    # echo ""
+    # echo "Compiling new resource module SWFs..."
+    $SDK_DIR/bin/mxmlc -static-rsls=true -locale=en_US -source-path=bundles/custom/{locale}
-include-resource-bundles bundle1 -o bundles/custom/resMod_enUS_bundle1_001.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -locale=en_US -source-path=bundles/custom2/{locale}
-include-resource-bundles bundle1 -o bundles/custom2/resMod_enUS_bundle1_101.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -locale=en_US -source-path=bundles/custom/{locale}
-include-resource-bundles bundle2 -o bundles/custom/resMod_enUS_bundle2.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -locale=en_US -source-path=bundles/custom/{locale}
-include-resource-bundles bundle2 bundle3 -o bundles/custom/resMod_enUS_bundles2,3.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -locale=en_US -source-path=bundles/custom/{locale}
-include-resource-bundles bundle1 bundle2 bundle3 -o bundles/custom/resMod_enUS_bundles1,2,3.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -library-path=$LIBRARY_PATH -locale=fr_FR -source-path=bundles/custom/{locale}
-include-resource-bundles bundle2 -o bundles/custom/resMod_frFR_bundle2.swf
+     
+    $SDK_DIR/bin/mxmlc -static-rsls=true -library-path=$LIBRARY_PATH -locale=en_US,fr_FR,ja_JP
-source-path=bundles/custom/{locale} -include-resource-bundles bundle1 -o bundles/custom/resMod_enUS,frFR,jaJP_bundle1.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -library-path=$LIBRARY_PATH -locale=en_US,fr_FR,ja_JP
-source-path=bundles/custom/{locale} -include-resource-bundles bundle2 -o bundles/custom/resMod_enUS,frFR,jaJP_bundle2.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -library-path=$LIBRARY_PATH -locale=en_US,fr_FR,ja_JP
-source-path=bundles/custom/{locale} -include-resource-bundles bundle2 bundle3 -o bundles/custom/resMod_enUS,frFR,jaJP_bundles2,3.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -library-path=$LIBRARY_PATH -locale=en_US,fr_FR,ja_JP
-source-path=bundles/custom/{locale} -include-resource-bundles bundle1 bundle2 bundle3 -o
bundles/custom/resMod_enUS,frFR,jaJP_bundles1,2,3.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -library-path=$LIBRARY_PATH -locale=ja_JP,fr_FR,de_DE
-source-path=bundles/framework/{locale} -include-resource-bundles collections containers controls
core effects formatters logging SharedResources skins states styles validators textLayout
sparkEffects -o bundles/framework/resMod_framework_jaJP,frFR,deDE.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -locale=en_US -source-path=bundles/framework/{locale}
-include-resource-bundles collections containers controls core effects formatters logging
SharedResources skins states styles validators textLayout sparkEffects -o bundles/framework/resMod_framework_enUS.swf
+    $SDK_DIR/bin/mxmlc -static-rsls=true -library-path=$LIBRARY_PATH -locale=ja_JP -source-path=bundles/framework/{locale}
-include-resource-bundles collections containers controls core effects formatters logging
SharedResources skins states styles validators textLayout sparkEffects -o bundles/framework/resMod_framework_jaJP.swf
+     
+    # This is a workaround to use until unloadResourceModule() is implemented.  We can't
reload a bundle until we unload it, so just keep loading more.
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_002.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_003.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_004.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_005.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_006.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_007.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_008.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_009.swf
+    cp bundles/custom/resMod_enUS_bundle1_001.swf bundles/custom/resMod_enUS_bundle1_010.swf
+    cp bundles/framework/resMod_framework_enUS.swf bundles/framework/resMod_framework_enUS_001.swf
+    cp bundles/framework/resMod_framework_enUS.swf bundles/framework/resMod_framework_enUS_002.swf
+    cp bundles/framework/resMod_framework_enUS.swf bundles/framework/resMod_framework_enUS_003.swf
+    cp bundles/framework/resMod_framework_enUS.swf bundles/framework/resMod_framework_enUS_004.swf
+    cp bundles/framework/resMod_framework_jaJP,frFR,deDE.swf bundles/framework/resMod_framework_jaJP,frFR,deDE_001.swf
+    cp bundles/framework/resMod_framework_jaJP,frFR,deDE.swf bundles/framework/resMod_framework_jaJP,frFR,deDE_002.swf
+    cp bundles/framework/resMod_framework_jaJP,frFR,deDE.swf bundles/framework/resMod_framework_jaJP,frFR,deDE_003.swf
+     
+    # echo ""
+    # echo "Compiling modules (ModuleLoader modules, not resource modules)..."
+    $SDK_DIR/bin/mxmlc -o Modules/module_framework_enUS.swf Modules/module_framework.mxml
+    $SDK_DIR/bin/mxmlc -library-path=$LIBRARY_PATH -locale=ja_JP -library-path+=bundles/framework/jaResources.swc
-o Modules/module_framework_jaJP.swf Modules/module_framework.mxml
+    $SDK_DIR/bin/mxmlc -locale=en_US -source-path=bundles/custom/{locale} -o Modules/module_nonframework_enUS.swf
Modules/module_nonframework.mxml
+    $SDK_DIR/bin/mxmlc -library-path=$LIBRARY_PATH -locale=ja_JP -library-path+=bundles/framework/jaResources.swc
-source-path=bundles/custom/{locale} -o Modules/module_nonframework_jaJP.swf Modules/module_nonframework.mxml
+    
+    # On Vista, we don't have permissions to any of the files we just created.
+    chmod a+rwx `find . -name *.swf`
+    chmod a+rwx `find . -name *.swc`
+fi
\ No newline at end of file

Propchange: incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/SWFs/pre_compile.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message