Localization: "unable to open '...\src\main\locale\en_US'"

thomas.auinger's Avatar

thomas.auinger

05 Dec, 2013 04:07 PM

I added localization support for my project (for locale "de_DE" only), which I set in my build script as

locales = ['de_DE']

However the build now complains about a missing en_US folder (yes, it does not exist) and I wonder why...?

Execution failed for task ':flex:client:test'.
Compilation failed:
command line: Error: unable to open 'D:\Workspaces\Flex\cockpit\flex\client\src\main\locale\en_US'

  1. Support Staff 1 Posted by Yennick Trevels on 05 Dec, 2013 04:16 PM

    Yennick Trevels's Avatar

    That's strange indeed. By default the compiler uses en_US because that's specified in the flex-config.xml file in the SDK, but when you use the 'locales' property, it should override this default.

    As a little test, what happens when you remove the "locales = ['de_DE']" definition and instead specify it via the additionaCompilerOptions like this:

    additionalCompilerOptions = [
        '-locale',
        'de_DE'
    ]
    
  2. 2 Posted by pyotwuicsw on 06 Dec, 2013 08:21 AM

    pyotwuicsw's Avatar

    true

  3. Support Staff 3 Posted by Maxime Cowez on 07 Dec, 2013 10:26 PM

    Maxime Cowez's Avatar

    Would you mind trying to run your build in verbose mode (just add the -i flag) and see what arguments are effectively being passed to the compiler? It should read -locale=de_DE (not -locale+=de_DE) somewhere in there and the -locale flag should be used only once.

  4. 4 Posted by thomas.auinger on 09 Dec, 2013 09:29 AM

    thomas.auinger's Avatar

    Ok, just did. Occurs only once and correct:

    Compiling with mxmlc
      +configname=flex
      -source-path+=D:\Workspaces\Flex\cockpit\flex\client\src\main\as3
      -source-path+=D:\Workspaces\Flex\cockpit\flex\client\src\main\locale/{locale}
      -locale=de_DE
    
  5. Support Staff 5 Posted by Maxime Cowez on 09 Dec, 2013 11:32 PM

    Maxime Cowez's Avatar

    I just looked at an old project of mine that was Dutch only and it had locales = ['nl_BE', 'en_US'], with an empty en_US folder. Looks like it's mxmlc that absolutely wants an en_US locale as ultimate fallback.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac