Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Misnamed locale folder causes HTTP 404 error in Windows project

3125068Jun 7 2018 — edited Jun 8 2018

Hi,

I am building a hybrid ojet app that is based on the FixItFast template.

I've performed all the standard steps to create a baseline hybrid app and I can serve it to a browser.

When I skip the initial splash page I get the following error:

GET localhost:8001/js/libs/oj/v5.0.0/resources/nls/en-US/localeElements.js 404 (Not Found)

All the locales generated in the nls directory are prefixed with "locale_" so the folder that should be "en-US" is actually "locale_en-US".

Manually changing the folder name back to "en-US" temporarily solves the issue until I run serve again and the entire directory is regenerated and every folder starts with "locale_" again.

This problem only occurs within "platforms/browser/www" and "platforms/windows/www", but not in the android or ios platforms.

I have tried following steps from another forum post with unsuccessful results

I also found mainJsInjector.js from the oraclejet-tooling library that generates platform-specific main.js files with the following config:

    config: {

          ojL10n: {

               localePrefix: 'locale_'

          }

    }

Modifying mainJsInjector.js so that localePrefix is the empty string and rebuilding propagates to all the platforms' main.js but this still doesn't solve the problem.

Why do the locale folders get generated with a different name than path used in the HTTP request?

Here is the info about the project

JET 5.0

Cordova 8.0 targeting windows 10

Workflow:

  • ojet build --theme=fif:windows
  • ojet add hybrid --platform=windows
  • ojet serve windows --theme=fif --browser

Message was edited by: 3125068

This post has been answered by 3125068 on Jun 8 2018
Jump to Answer
Comments
Post Details
Added on Jun 7 2018
1 comment
440 views