Switch to ES2015, remove now useless replace

This commit is contained in:
Mathieu Acthernoene 2017-03-30 02:09:32 +02:00
parent a19790da39
commit 91662a4cda
1 changed files with 5 additions and 7 deletions

View File

@ -1,9 +1,7 @@
'use strict';
import {NativeModules} from 'react-native'
import I18n from 'i18n-js'
const {RNI18n} = NativeModules
const { NativeModules } = require('react-native');
const { RNI18n } = NativeModules;
let I18n = require('i18n-js');
I18n.locale = RNI18n.locale
I18n.locale = (RNI18n) ? RNI18n.locale.replace(/_/, '-') : '';
module.exports = I18n;
export default I18n