You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/02/26 15:56:40 UTC
[royale-asjs] branch develop updated: finally not using defines for
locales, just a public static var that can be setup in your app.
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 7be9b4c finally not using defines for locales, just a public static var that can be setup in your app.
7be9b4c is described below
commit 7be9b4ceed264141fcb2ee491afa0e515d90a71c
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Feb 26 16:55:38 2019 +0100
finally not using defines for locales, just a public static var that can be setup in your app.
---
examples/royale/TourDeJewel/src/main/royale/App.mxml | 13 ++++++++++++-
.../projects/JewelJS/src/main/config/compile-js-config.xml | 4 ----
frameworks/projects/Jewel/asconfig.json | 6 ------
frameworks/projects/Jewel/build.xml | 5 -----
frameworks/projects/Jewel/pom.xml | 6 ------
.../projects/Jewel/src/main/config/compile-swf-config.xml | 4 ----
.../org/apache/royale/jewel/beads/validators/Validator.as | 2 +-
7 files changed, 13 insertions(+), 27 deletions(-)
diff --git a/examples/royale/TourDeJewel/src/main/royale/App.mxml b/examples/royale/TourDeJewel/src/main/royale/App.mxml
index f94a869..ed3cf1e 100644
--- a/examples/royale/TourDeJewel/src/main/royale/App.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/App.mxml
@@ -21,8 +21,19 @@
<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:js="library://ns.apache.org/royale/basic"
- xmlns:local="*">
+ xmlns:local="*" initialize="setUp()">
+ <fx:Script>
+ <![CDATA[
+ import org.apache.royale.jewel.beads.validators.Validator;
+
+ public function setUp():void
+ {
+ // you can change language here
+ //Validator.locale = "es_ES";
+ }
+ ]]>
+ </fx:Script>
<fx:Style source="../../main/resources/jewel-example-styles.css"/>
<j:valuesImpl>
diff --git a/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
index a735bd4..fe6ef45 100644
--- a/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml
@@ -43,10 +43,6 @@
<name>COMPILE::JS</name>
<value>true</value>
</define>
- <define>
- <name>LOCALE::language</name>
- <value>'en_US'</value>
- </define>
<keep-as3-metadata>
<name>Bindable</name>
diff --git a/frameworks/projects/Jewel/asconfig.json b/frameworks/projects/Jewel/asconfig.json
index 9262709..cb77061 100644
--- a/frameworks/projects/Jewel/asconfig.json
+++ b/frameworks/projects/Jewel/asconfig.json
@@ -29,12 +29,6 @@
"source-path": [
"src/main/royale"
],
- "define": [
- {
- "name": "LOCALE::language",
- "value": "'en_US'"
- }
- ],
"output": "target/Jewel.swc"
}
}
diff --git a/frameworks/projects/Jewel/build.xml b/frameworks/projects/Jewel/build.xml
index a7c3473..dba5aaa 100644
--- a/frameworks/projects/Jewel/build.xml
+++ b/frameworks/projects/Jewel/build.xml
@@ -26,7 +26,6 @@
<property environment="env"/>
<property file="${ROYALE_HOME}/build.properties"/>
<property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
- <property name="locale" value="en_US"/>
<property name="target.name" value="${ant.project.name}.swc" />
@@ -92,16 +91,12 @@
<jvmarg value="-Dsun.io.useCanonCaches=false" />
<jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" />
<arg value="+royalelib=${ROYALE_HOME}/frameworks" />
- <arg value="-compiler.define+=LOCALE::language,'${locale}'" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-compiler.strict-xml=true" />
<arg value="-compiler.targets=SWF,JSRoyale" />
<arg value="-output=${basedir}/target/${target.name}" />
<arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" />
- <arg value="-js-compiler-define+=LOCALE::language,'${locale}'" />
- <arg value="-js-compiler-define+=COMPILE::SWF,false" />
- <arg value="-js-compiler-define+=COMPILE::JS,true" />
<arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" />
<arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" />
</java>
diff --git a/frameworks/projects/Jewel/pom.xml b/frameworks/projects/Jewel/pom.xml
index 74aa185..74d84db 100644
--- a/frameworks/projects/Jewel/pom.xml
+++ b/frameworks/projects/Jewel/pom.xml
@@ -66,12 +66,6 @@
<skipExtern>true</skipExtern>
<additionalCompilerOptions>-source-map=true</additionalCompilerOptions>
<!--<additionalCompilerOptions>-compiler.fxg-base-class=flash.display.Sprite</additionalCompilerOptions>-->
- <defines>
- <property>
- <name>LOCALE::language</name>
- <value>'"en_US"'</value>
- </property>
- </defines>
</configuration>
</plugin>
<plugin>
diff --git a/frameworks/projects/Jewel/src/main/config/compile-swf-config.xml b/frameworks/projects/Jewel/src/main/config/compile-swf-config.xml
index 484e733..10f07d4 100644
--- a/frameworks/projects/Jewel/src/main/config/compile-swf-config.xml
+++ b/frameworks/projects/Jewel/src/main/config/compile-swf-config.xml
@@ -60,10 +60,6 @@
<name>COMPILE::JS</name>
<value>false</value>
</define>
- <define>
- <name>LOCALE::language</name>
- <value>'en_US'</value>
- </define>
<keep-as3-metadata>
<name>Bindable</name>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as
index 8ceb80d..eb9d369 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as
@@ -48,7 +48,7 @@ package org.apache.royale.jewel.beads.validators
* locale
* @royalesuppresspublicvarwarning
*/
- public static var locale :String = LOCALE::language;
+ public static var locale :String = "en_US";
[Embed("locale/en_US/validator.properties", mimeType="text/plain")]
/**