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!

Can't add custom translations to my OJET application

Rubén García TerceroJul 23 2019 — edited Jul 29 2019

Hi, I'm facing some issues when adding custom translations to the OJET bundle. I tried doing it in the same way Geertjan did , but mine doesn't work as expected.

This is my files structure, my requireJS config and my l10.js :

pastedImage_0.png

requirejs.config(

{

baseUrl: 'js',

// Path mappings for the logical module names

// Update the main-release-paths.json for release mode when updating the mappings

paths:

//injector:mainReleasePaths

{

'knockout': 'libs/knockout/knockout-3.4.2.debug',

'jquery': 'libs/jquery/jquery-3.3.1',

'jqueryui-amd': 'libs/jquery/jqueryui-amd-1.12.1',

'promise': 'libs/es6-promise/es6-promise',

'hammerjs': 'libs/hammer/hammer-2.0.8',

'ojdnd': 'libs/dnd-polyfill/dnd-polyfill-1.0.0',

'ojs': 'libs/oj/v7.0.1/debug',

'ojL10n': 'libs/oj/v7.0.1/ojL10n',

'ojtranslations': 'libs/oj/v7.0.1/resources',

'text': 'libs/require/text',

'signals': 'libs/js-signals/signals',

'customElements': 'libs/webcomponents/custom-elements.min',

'proj4': 'libs/proj4js/dist/proj4-src',

'css': 'libs/require-css/css',

'touchr': 'libs/touchr/touchr',

'config': 'config'

},

config:{

ojL10n:{

merge:{

'ojtranslations/nls/ojtranslations':'resources/nls/l10'

}

}

}

//endinjector

}

);

define( {

"root":{

"login_title":"Inicio de sesión",

"navBar_calendario_label":"Calendario",

.

.

.

"navBar_bRevision_label":"Histórico"

},

"en":true,

"es":true,

"fr":true,

"it":true }

);

Looks identical to the sample Geertjan provided on Github and the one that is in the documentation, so I don't really understand why it isn't working.

Just to clarify, this is what the bundle looks like in the Geertjan sample, and how it looks in mine:

pastedImage_4.png

The custom translations appear.

pastedImage_5.png

Just the ojet components are in the bundle.

Thanks in advance,

Ruben Garcia Tercero.

Comments
Post Details
Added on Jul 23 2019
4 comments
486 views