Hi, I know that this problem was considered you have not once. Before you write, read several tutorials and requests in this group. But I could not fix the problem. I started working with the flex-mojos quite recently, and now there is a need localize an application. For the beginning I tried to localize the application in Flex builder. It worked well. Then began to move it in IntelliJ IDEA and here and get the error:
> Unable to resolve resource bundle "mainGUI" for locale "en_US".
The problem occures, when I declare the resources bundle in an MXML file,
like this:*
*
> <fx:Metadata>
> [ResourceBundle('mainGUI')]
> </fx:Metadata>
Here is part of the pom.xml where i try use locales:
> <build>
> <finalName>sample</finalName>
> <sourceDirectory>src/main/flex</sourceDirectory>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.sonatype.flexmojos</groupId>
> <artifactId>flexmojos-maven-plugin</artifactId>
> <version>${flexmojos.version}</version>
> <extensions>true</extensions>
> <configuration>
>
> <allowSourcePathOverlap>true</allowSourcePathOverlap>
> <runtimeLocales>
> <locale>en_US</locale>
> <locale>ru_RU</locale>
> </runtimeLocales>
>
> <resourceBundlePath>src/main/flex/locales/{locale}</resourceBundlePath>
> </configuration>
> </plugin>
> </plugins>
> </pluginManagement>
> ...
I have locales file:
> src/main/flex/locales/en_US/mainGUI.properties
> src/main/flex/locales/ru_RU/mainGUI.properties
Versions of flex:
> <flex.framework.version>4.1.0.16248</flex.framework.version>
> <flexmojos.version>3.8</flexmojos.version>
If I don't use the <fx:Metadata> the application is compiled, but the
labeles "OK","Cancel", etc. are displayed as "null" and
when dropdownlist using, the debuger shows Error #1069
(__AS3__.vec.Vector.<flash.display::DisplayObject>;).
Without the use of the localization, the application works correctly.
In the annex to letter attach pom and iml files of flex-modul
Thanks for the help
Alexandr.
P.S. Sorry for the partially machine translation :)
--
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos
http://flexmojos.sonatype.org/
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>edu.sample</groupId> <artifactId>sample</artifactId> <version>1.0</version> </parent> <groupId>edu.sample</groupId> <artifactId>flex</artifactId> <packaging>swf</packaging> <version>1.0</version> <name>Sample client</name> <dependencies> <dependency> <groupId>com.adobe.flex.framework</groupId> <artifactId>flex-framework</artifactId> <version>${flex.framework.version}</version> <type>pom</type> </dependency> <dependency> <groupId>com.adobe.flex.framework</groupId> <artifactId>datavisualization</artifactId> <version>${flex.framework.version}</version> <type>swc</type> </dependency> <dependency> <groupId>com.adobe.flexunit</groupId> <artifactId>flexunit</artifactId> <version>4.0-rc-1</version> <type>swc</type> <scope>test</scope> </dependency> <dependency> <scope>internal</scope> <groupId>org.graniteds</groupId> <artifactId>granite-essentials-swc</artifactId> <version>${graniteds.version}</version> <type>swc</type> </dependency> <dependency> <groupId>org.graniteds</groupId> <artifactId>granite-swc</artifactId> <version>${graniteds.version}</version> <type>swc</type> </dependency> <dependency> <groupId>edu.sample</groupId> <artifactId>biz-logic</artifactId> <version>1.0</version> <type>jar</type> </dependency> </dependencies> <build> <finalName>sample</finalName> <sourceDirectory>src/main/flex</sourceDirectory> <pluginManagement> <plugins> <plugin> <groupId>org.sonatype.flexmojos</groupId> <artifactId>flexmojos-maven-plugin</artifactId> <version>${flexmojos.version}</version> <extensions>true</extensions> <configuration> <allowSourcePathOverlap>true</allowSourcePathOverlap> <runtimeLocales> <locale>en_US</locale> <locale>ru_RU</locale> </runtimeLocales> <resourceBundlePath>src/main/flex/locales/{locale}</resourceBundlePath> <!--mergeResourceBundle>true</mergeResourceBundle--> <!--includeResourceBundles> <bundle>mainGUI</bundle> </includeResourceBundles--> </configuration> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.4.3</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.sonatype.flexmojos</groupId> <artifactId>flexmojos-maven-plugin</artifactId> <version>${flexmojos.version}</version> <extensions>true</extensions> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <generatorToUse>graniteds21</generatorToUse> <baseOutputDirectory>${project.build.directory}/generated-sources</baseOutputDirectory> <outputDirectory>${project.build.directory}/../src/main/flex</outputDirectory> <extraOptions> <tide>true</tide> <uid>uid</uid> <entityFactory>org.granite.generator.as3.BVEntityFactory</entityFactory> <outputEnumToBaseOutputDirectory>false</outputEnumToBaseOutputDirectory> </extraOptions> <includeJavaClasses> <include>edu.samples.sample.domain.**</include> <include>edu.samples.sample.services.I*Service</include> </includeJavaClasses> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>edu.sample</groupId> <artifactId>biz-logic</artifactId> <version>1.0</version> <type>jar</type> </dependency> <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>1.0.0.GA</version> </dependency> <dependency> <groupId>javax.jdo</groupId> <artifactId>jdo2-api</artifactId> <version>2.3-eb</version> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>antlr</groupId> <artifactId>antlr</artifactId> <version>2.7.7</version> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> <version>2.2.3</version> </dependency> <dependency> <groupId>com.thoughtworks.xstream</groupId> <artifactId>xstream</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>org.graniteds</groupId> <artifactId>granite-core</artifactId> <version>${graniteds.version}</version> </dependency> <dependency> <groupId>org.graniteds</groupId> <artifactId>granite-generator-share</artifactId> <version>${graniteds.version}</version> </dependency> <dependency> <groupId>org.graniteds</groupId> <artifactId>granite-generator</artifactId> <version>${graniteds.version}</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.sonatype.flexmojos</groupId> <artifactId>flexmojos-maven-plugin</artifactId> <version>${flexmojos.version}</version> <extensions>true</extensions> <dependencies> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>compiler</artifactId> <version>${flex.framework.version}</version> <type>pom</type> </dependency> <dependency> <groupId>com.adobe.flex.framework</groupId> <artifactId>datavisualization</artifactId> <version>${flex.framework.version}</version> <type>swc</type> </dependency> </dependencies> <configuration> <contextRoot>${context.root}</contextRoot> <sourceFile>Main.mxml</sourceFile> <incremental>true</incremental> <debug>true</debug> <resourceBundlePath>src/main/resources</resourceBundlePath> <keepAs3Metadatas> <keepAs3Metadata>Bindable</keepAs3Metadata> <keepAs3Metadata>Managed</keepAs3Metadata> <keepAs3Metadata>ChangeEvent</keepAs3Metadata> <keepAs3Metadata>NonCommittingChangeEvent</keepAs3Metadata> <keepAs3Metadata>Transient</keepAs3Metadata> <keepAs3Metadata>Id</keepAs3Metadata> <keepAs3Metadata>Version</keepAs3Metadata> <keepAs3Metadata>Name</keepAs3Metadata> <keepAs3Metadata>In</keepAs3Metadata> <keepAs3Metadata>Out</keepAs3Metadata> <keepAs3Metadata>Inject</keepAs3Metadata> <keepAs3Metadata>Produces</keepAs3Metadata> <keepAs3Metadata>PostConstruct</keepAs3Metadata> <keepAs3Metadata>Destroy</keepAs3Metadata> <keepAs3Metadata>Observer</keepAs3Metadata> <keepAs3Metadata>ManagedEvent</keepAs3Metadata> </keepAs3Metadatas> </configuration> </plugin> </plugins> </build> </project>
flex.iml
Description: Binary data
