Skip to content

Commit

Permalink
Merge pull request #10 from DevExpress/localization-imports-rework
Browse files Browse the repository at this point in the history
Rework localization imports
  • Loading branch information
nightskylark authored Dec 13, 2016
2 parents f370a8e + b8dd63b commit 51ab02b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
8 changes: 4 additions & 4 deletions examples/bundled.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<script type="text/javascript" src="../node_modules/jszip/dist/jszip.js"></script>

<script type="text/javascript" src="../node_modules/devextreme/dist/js/dx.all.debug.js"></script>
<script type="text/javascript" src="../node_modules/devextreme/dist/js/localization/dx.all.de.js"></script>
<script type="text/javascript" src="../node_modules/devextreme/dist/js/localization/dx.all.ja.js"></script>
<script type="text/javascript" src="../node_modules/devextreme/dist/js/localization/dx.all.ru.js"></script>
<script type="text/javascript" src="../node_modules/devextreme/dist/js/localization/dx.messages.de.js"></script>
<script type="text/javascript" src="../node_modules/devextreme/dist/js/localization/dx.messages.ja.js"></script>
<script type="text/javascript" src="../node_modules/devextreme/dist/js/localization/dx.messages.ru.js"></script>

<script type="text/javascript" src="../dist/devextreme-intl.dev.js"></script>
<script type="text/javascript" src="../dist/devextreme-intl.js"></script>
</head>

<body>
Expand Down
26 changes: 10 additions & 16 deletions examples/modular.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
},
map: {
devextreme: 'npm:devextreme',
'devextreme-intl': '../dist/devextreme-intl.dev.js',
'devextreme-intl': '../dist/devextreme-intl.js',
jquery: 'npm:jquery/dist/jquery.min.js',
jszip: 'npm:jszip/dist/jszip.min.js'
jszip: 'npm:jszip/dist/jszip.min.js',
json: 'npm:systemjs-plugin-json/json.js'
},
packages: {
'devextreme': {
Expand All @@ -33,22 +34,15 @@
<script>
System.import('devextreme-intl');

System.import('devextreme/localization/de/core.de.js');
System.import('devextreme/localization/de/widgets-base.de.js');
System.import('devextreme/localization/de/widgets-mobile.de.js');
System.import('devextreme/localization/de/widgets-web.de.js');

System.import('devextreme/localization/ja/core.ja.js');
System.import('devextreme/localization/ja/widgets-base.ja.js');
System.import('devextreme/localization/ja/widgets-mobile.ja.js');
System.import('devextreme/localization/ja/widgets-web.ja.js');
System.import('devextreme/localization').then(function(localization) {
var deMessages = System.import('devextreme/localization/messages/de.json!json');
var jaMessages = System.import('devextreme/localization/messages/ja.json!json');
var ruMessages = System.import('devextreme/localization/messages/ru.json!json');

System.import('devextreme/localization/ru/core.ru.js');
System.import('devextreme/localization/ru/widgets-base.ru.js');
System.import('devextreme/localization/ru/widgets-mobile.ru.js');
System.import('devextreme/localization/ru/widgets-web.ru.js');
localization.loadMessages(deMessages);
localization.loadMessages(jaMessages);
localization.loadMessages(ruMessages);

System.import('devextreme/localization').then(function(localization) {
localization.locale(navigator.language);
});
</script>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"phantomjs-prebuilt": "^2.1.7",
"qunitjs": "^1.23.1",
"systemjs": "^0.19.41",
"systemjs-plugin-json": "^0.2.2",
"webpack": "^1.13.3",
"yargs": "^6.4.0"
},
Expand Down

0 comments on commit 51ab02b

Please sign in to comment.