You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Jagan Langa Sami Durai <ja...@sybrant.com> on 2013/01/23 09:31:31 UTC

Issue In ANT Task To Compile Resource Bundle for Other Languages

Hi,

Following is my macro for creating the resource module for some
module/application. when i use this macro, its working fine for en_US, but
when i try to run this macro with fr_FR or ja_JP its not working. and its
throwing the following errors( like [mxmlc] Error: Unable to resolve
resource bundle "validators" for locale "fr_FR" and others.)  Is there any
mistake in the following macro, Am i doing it in wrong way..? Please Help
me for this.

My Macro:

<!-- Compiles Localization Resource Bundle. -->
<macrodef name="compileLocale" description="Compiles the Resource package
for the given locale">
<attribute name="locale" default="en_US" />
<attribute name="debug" default="false" />
<attribute name="module" />
<attribute name="dest" default="${DEPLOY_DIR}" />
<sequential>
<!--
            Create the Flex Home directory for the language in question.
            This is necessary to compensate for a bug in pre-3.2 releases
of
            mxmlc.
            -->
<mkdir dir="${FLEX_HOME}/frameworks/locale/@{locale}" />
<mkdir dir="@{dest}/locale/@{locale}" />

<!-- Invoke MXMLC -->
<mxmlc output="@{dest}/locale/@{locale}/@{module}.swf"
optimize="true"
fork="true">

<locale>@{locale}</locale>

<load-config filename="${FLEX_CONFIG_XML}" />

<source-path path-element="${SRC_ROOT}/@{module}/src/locale/{locale}" />
<include-resource-bundles bundle="@{module}" />
<source-path path-element="${FLEX_HOME}/frameworks/" />

<include-resource-bundles bundle="collections" />
<include-resource-bundles bundle="controls" />
<include-resource-bundles bundle="core" />
<include-resource-bundles bundle="effects" />
<include-resource-bundles bundle="formatters" />
<include-resource-bundles bundle="logging" />
<include-resource-bundles bundle="messaging" />
<include-resource-bundles bundle="modules" />
<include-resource-bundles bundle="rpc" />
<include-resource-bundles bundle="SharedResources" />
<include-resource-bundles bundle="skins" />
<include-resource-bundles bundle="states" />
<include-resource-bundles bundle="styles" />
<include-resource-bundles bundle="utils" />
<include-resource-bundles bundle="validators" />

<include-resource-bundles bundle="components" />
<include-resource-bundles bundle="sparkEffects" />
<include-resource-bundles bundle="layout" />
<include-resource-bundles bundle="textLayout" />
<include-resource-bundles bundle="osmf" />

<compiler.debug>@{debug}</compiler.debug>

</mxmlc>
</sequential>
</macrodef>
My Error:
 [mxmlc] Error: Unable to resolve resource bundle "validators" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "styles" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "states" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "logging" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "effects" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "osmf" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "textLayout" for
locale "ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "controls" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "rpc" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "formatters" for
locale "ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "utils" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "sparkEffects" for
locale "ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "layout" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "messaging" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "components" for
locale "ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "modules" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "SharedResources" for
locale "ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "collections" for
locale "ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "skins" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "skins" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "styles" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "effects" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
"ja_JP".
    [mxmlc] Error: Unable to resolve resource bundle "skins" for locale
"ja_JP".

-- 
*
Regards,
S. Jagan  Langa**|**Flex Developer*
*Sybrant Technologies Pvt Ltd*
*--------------------------------
*
‘Shriram The Gateway (SEZ)’, Block A1,
3rd Floor, 16 GST Road, Perungalathur,
Chennai - 600 063, India
India | USA | Germany | China

Mobile: +91 98430 50897
Skype: seesamjagan

Re: Issue In ANT Task To Compile Resource Bundle for Other Languages

Posted by Carol Frampton <cf...@adobe.com>.
Sorry but I'm not going to take the time to figure out what your macro is
doing.

If you would like to create the bundles for the non-English languages,
from the root directory execute "ant other.locales".

You can study what other.locales is doing if you want to figure out how to
do it for just one locale rather than all of them.

Carol

On 1/23/13 3 :31AM, "Jagan Langa Sami Durai" <ja...@sybrant.com> wrote:

>Hi,
>
>Following is my macro for creating the resource module for some
>module/application. when i use this macro, its working fine for en_US, but
>when i try to run this macro with fr_FR or ja_JP its not working. and its
>throwing the following errors( like [mxmlc] Error: Unable to resolve
>resource bundle "validators" for locale "fr_FR" and others.)  Is there any
>mistake in the following macro, Am i doing it in wrong way..? Please Help
>me for this.
>
>My Macro:
>
><!-- Compiles Localization Resource Bundle. -->
><macrodef name="compileLocale" description="Compiles the Resource package
>for the given locale">
><attribute name="locale" default="en_US" />
><attribute name="debug" default="false" />
><attribute name="module" />
><attribute name="dest" default="${DEPLOY_DIR}" />
><sequential>
><!--
>            Create the Flex Home directory for the language in question.
>            This is necessary to compensate for a bug in pre-3.2 releases
>of
>            mxmlc.
>            -->
><mkdir dir="${FLEX_HOME}/frameworks/locale/@{locale}" />
><mkdir dir="@{dest}/locale/@{locale}" />
>
><!-- Invoke MXMLC -->
><mxmlc output="@{dest}/locale/@{locale}/@{module}.swf"
>optimize="true"
>fork="true">
>
><locale>@{locale}</locale>
>
><load-config filename="${FLEX_CONFIG_XML}" />
>
><source-path path-element="${SRC_ROOT}/@{module}/src/locale/{locale}" />
><include-resource-bundles bundle="@{module}" />
><source-path path-element="${FLEX_HOME}/frameworks/" />
>
><include-resource-bundles bundle="collections" />
><include-resource-bundles bundle="controls" />
><include-resource-bundles bundle="core" />
><include-resource-bundles bundle="effects" />
><include-resource-bundles bundle="formatters" />
><include-resource-bundles bundle="logging" />
><include-resource-bundles bundle="messaging" />
><include-resource-bundles bundle="modules" />
><include-resource-bundles bundle="rpc" />
><include-resource-bundles bundle="SharedResources" />
><include-resource-bundles bundle="skins" />
><include-resource-bundles bundle="states" />
><include-resource-bundles bundle="styles" />
><include-resource-bundles bundle="utils" />
><include-resource-bundles bundle="validators" />
>
><include-resource-bundles bundle="components" />
><include-resource-bundles bundle="sparkEffects" />
><include-resource-bundles bundle="layout" />
><include-resource-bundles bundle="textLayout" />
><include-resource-bundles bundle="osmf" />
>
><compiler.debug>@{debug}</compiler.debug>
>
></mxmlc>
></sequential>
></macrodef>
>My Error:
> [mxmlc] Error: Unable to resolve resource bundle "validators" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "styles" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "states" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "logging" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "effects" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "osmf" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "textLayout" for
>locale "ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "controls" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "rpc" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "formatters" for
>locale "ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "utils" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "sparkEffects" for
>locale "ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "layout" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "messaging" for
>locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "components" for
>locale "ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "modules" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "SharedResources" for
>locale "ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "collections" for
>locale "ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "skins" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "skins" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "styles" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "effects" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "core" for locale
>"ja_JP".
>    [mxmlc] Error: Unable to resolve resource bundle "skins" for locale
>"ja_JP".
>
>-- 
>*
>Regards,
>S. Jagan  Langa**|**Flex Developer*
>*Sybrant Technologies Pvt Ltd*
>*--------------------------------
>*
>ŒShriram The Gateway (SEZ)¹, Block A1,
>3rd Floor, 16 GST Road, Perungalathur,
>Chennai - 600 063, India
>India | USA | Germany | China
>
>Mobile: +91 98430 50897
>Skype: seesamjagan