t8on
Version:
Set up, format and translate phrases easily
25 lines (17 loc) • 1.45 kB
JavaScript
import deprecate from './util/deprecate';
import Translation from './translation';
export { Translation };
var EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE = 'Deprecation warning: usage of t8on singleton\'s properties ' + 'and methods imported manually is considered deprecated. ' + 'All *named* exports except Translation will be removed ' + 'in upcoming major release. Please export the singleton and call ' + 'its methods directly, such as t.translate()';
var t = new Translation();
export var format = deprecate(t.format, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var formatTo = deprecate(t.formatTo, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var formatCurrent = deprecate(t.formatCurrent, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var translate = deprecate(t.translate, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var translateTo = deprecate(t.translateTo, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var translateCurrent = deprecate(t.translateCurrent, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var load = deprecate(t.load, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var loadRoot = deprecate(t.loadRoot, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var setLocale = deprecate(t.setLocale, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE);
export var currentLocale = t.currentLocale;
export var fallbackLocale = t.fallbackLocale;
export default t;