@ohif/i18n: Fix issues with exports and update docs (#598)

* update i18n version -- already published

* update ohif/i18n version and add modules

* update ohif/i18n version

* update translating documentation

* replace addLocales method and exported modules

* lock files

* Update index.js

* fix(@ohif/i18n): export custom methods in the main i18n object

`initI18n`, `addLocales` and `T` are now being exported inside the main `i18n` object.

* remove unecessary dependencies

* update vtk-extension lock file
This commit is contained in:
Rodrigo Antinarelli authored and Erik Ziegler committed 2019-06-29 09:33:38 +02:00
1 parent cb565427b3
commit 16cea8681e
8 files changed
+278 -351

No files matched your search

+4 -5
View File
@@ -6,8 +6,6 @@ import pkg from '../package.json';
import { debugMode, detectionOptions } from './config';
import locales from './locales';
let translate;
function addLocales(newLocales) {
customDebug(`Adding locales ${newLocales}`, 'info');
@@ -44,8 +42,8 @@ function initI18n(detection = detectionOptions) {
},
})
.then(function(t) {
translate = t;
customDebug(`t function available.`, 'info');
i18n.T = t;
customDebug(`T function available.`, 'info');
});
}
@@ -53,6 +51,7 @@ customDebug(`version ${pkg.version} loaded.`, 'info');
initI18n();
export { translate as t, addLocales, initI18n };
i18n.initI18n = initI18n;
i18n.addLocales = addLocales;
export default i18n;