Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
3.5.0
-
None
-
None
-
Dojo project in Cordova on Windows 8 platform
Description
We are trying to prototype the project using Dojo+Cordova.
It is working really well on Android and iOS platforms but having an internationalization issue when we run a Windows 8 version. We are targeting tablets.
In particular on Windows 8 platform when we run an app in Visual Studio 2013 it does not return the resource file for internationalization. To be more precise it is returning object in a Dojo doLoad function in i18n.js but it is empty There is no Root element in the object.
index.js file
var app = {
// Application Constructor
initialize: function()
,
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
bindEvents: function()
,
// deviceready Event Handler
//
// The scope of 'this' is the event. In order to call the 'receivedEvent'
// function, we must explicitly call 'app.receivedEvent(...);'
onDeviceReady: function() {
app.receivedEvent('deviceready');
console.log('In onDeviceReady');
require(["dojo", "dojo/i18n"],
function () {
require(["dojo/i18n!./js/nls/tdresourse.js", "dojo/domReady!"],
function (tdresourse)
);
});
},
// Update DOM on a Received Event
receivedEvent: function(id)
};
index.html file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<meta name="msapplication-tap-highlight" content="no" />
<title>Hello World</title>
<script data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js" type="text/javascript"></script>
</head>
<body>
<div class="app">
<h1>Apache Cordova</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
<div id="output">Test</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>