Opened 10 years ago

Closed 10 years ago

#14132 closed defect (duplicate)

dojo/i18n systematic failures in Rhino

Reported by: haysmark Owned by: Adam Peller
Priority: high Milestone: 1.7.1
Component: Internationalization Version: 1.7.0b1
Keywords: Cc: Rawld Gill, liucougar
Blocked By: Blocking:


Do we not support i18n in Rhino?

The dojo/i18n code has several different conditions on the use dojo.xhrGet that only trigger when the planets align. Apparently Rhino does not meet all of these conditions, so our i18n tests simply do not work in Rhino.

Even if you get rid of the condition to force the xhr to load, you get errors about ActiveXObject being undefined instead.

Test case and first test's results:

C:\Users\IBM_ADMIN\IBM\dojo\util\doh>java -jar ../shrinksafe/js.jar ../../dojo/dojo.js baseUrl=../../dojo load=doh test=dojo/tests/i18n

The Dojo Unit Test Harness, $Rev: 23869 $
Copyright (c) 2011, The Dojo Foundation, All Rights Reserved
loading test dojo/tests/i18n

        NO registerUrl() METHOD AVAILABLE.
        NO registerUrl() METHOD AVAILABLE.
9 tests to run in 1 groups
GROUP "tests.i18n" has 9 tests to run
TypeError: Cannot find function xhrGet in object [object Object].
        ERROR IN:
                 (function () {doh.assertEqual(value, dojo.i18n.getLocalization(
"dojo/tests", "salutations", locale).hello);})
org.mozilla.javascript.EcmaError: TypeError: Cannot find function xhrGet in obje
ct [object Object]. (<eval'ed string>#1(Function)#1(eval)#155)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.jav
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.jav
        at org.mozilla.javascript.ScriptRuntime.typeError(
        at org.mozilla.javascript.ScriptRuntime.typeError2(
        at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.j
        at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRun
        at org.mozilla.javascript.Interpreter.interpretLoop(
        at script(<eval'ed string>#1(Function)#1(eval):155)
        at script.forEach(<eval'ed string>#1(Function)#1(eval):283)
        at script(<eval'ed string>#1(Function)#1(eval):141)
        at script(<eval'ed string>#1(Function)#1(eval):66)
        at script(<eval'ed string>#1(Function)#1(eval):106)
        at script(<eval'ed string>#1(Function)#1(eval):174)
        at script(<eval'ed string>#1(Function)#1(eval):16)
        at script(<eval'ed string>#1(Function)#1(eval):1311)
        at script(<eval'ed string>#1(Function)#1(eval):1377)
        at script(<eval'ed string>#1(Function)#1(eval):1444)
        at script(<eval'ed string>#1(Function)#1(eval):1515)
        at script(<eval'ed string>#1(Function)#1(eval):29)

Change History (1)

comment:1 Changed 10 years ago by Adam Peller

Cc: Rawld Gill liucougar added
Resolution: duplicate
Status: newclosed

dup of #13457

see for a quick workaround for synch I used to get the build system running

Note: See TracTickets for help on using tickets.