mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
move i18n to core
This commit is contained in:
parent
3e6210c6d1
commit
61a8878e33
@ -1,6 +1,6 @@
|
|||||||
const program = require('commander');
|
const program = require('commander');
|
||||||
const Embark = require('../lib/index');
|
const Embark = require('../lib/index');
|
||||||
const i18n = require('./i18n/i18n.js');
|
const i18n = require('./core/i18n/i18n.js');
|
||||||
let embark = new Embark;
|
let embark = new Embark;
|
||||||
|
|
||||||
class Cmd {
|
class Cmd {
|
||||||
|
@ -8,7 +8,7 @@ i18n.configure({
|
|||||||
locales: supported_languages,
|
locales: supported_languages,
|
||||||
register: global,
|
register: global,
|
||||||
updateFiles: false,
|
updateFiles: false,
|
||||||
directory: path.join(__dirname, 'locales')
|
directory: path.join(__dirname, '../../../', 'locales')
|
||||||
});
|
});
|
||||||
|
|
||||||
function isSupported(locale) {
|
function isSupported(locale) {
|
@ -1,7 +1,8 @@
|
|||||||
const {PerformanceObserver, performance} = require('perf_hooks');
|
const {PerformanceObserver, performance} = require('perf_hooks');
|
||||||
require('colors');
|
require('colors');
|
||||||
const utils = require('../utils/utils.js');
|
const utils = require('../utils/utils.js');
|
||||||
const i18n = require('../i18n/i18n.js');
|
// TODO: remove this
|
||||||
|
const i18n = require('../../core/i18n/i18n.js');
|
||||||
i18n.setOrDetectLocale('en');
|
i18n.setOrDetectLocale('en');
|
||||||
|
|
||||||
|
|
||||||
@ -22,8 +23,6 @@ class NpmTimer{
|
|||||||
this._downloadComplete = 'downloadComplete' + this._packageName + this._version;
|
this._downloadComplete = 'downloadComplete' + this._packageName + this._version;
|
||||||
|
|
||||||
this.observer.observe({entryTypes: ['measure']});
|
this.observer.observe({entryTypes: ['measure']});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get observer(){
|
get observer(){
|
||||||
@ -42,7 +41,6 @@ class NpmTimer{
|
|||||||
else{
|
else{
|
||||||
// otherwise, find our download complete measurement
|
// otherwise, find our download complete measurement
|
||||||
entry = utils.last(items.getEntries().filter(entry => entry.name === this._downloadComplete));
|
entry = utils.last(items.getEntries().filter(entry => entry.name === this._downloadComplete));
|
||||||
|
|
||||||
if(entry){
|
if(entry){
|
||||||
strDuration = __('Finished downloading and installing {{packageName}} {{version}} in {{duration}}ms', {packageName: this._packageName, version: this._version, duration: entry.duration});
|
strDuration = __('Finished downloading and installing {{packageName}} {{version}} in {{duration}}ms', {packageName: this._packageName, version: this._version, duration: entry.duration});
|
||||||
performance.clearMarks();
|
performance.clearMarks();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user