UNPKG

t8on

Version:

Set up, format and translate phrases easily

38 lines (23 loc) 2.31 kB
'use strict'; exports.__esModule = true; exports.fallbackLocale = exports.currentLocale = exports.setLocale = exports.loadRoot = exports.load = exports.translateCurrent = exports.translateTo = exports.translate = exports.formatCurrent = exports.formatTo = exports.format = exports.Translation = undefined; var _deprecate = require('./util/deprecate'); var _deprecate2 = _interopRequireDefault(_deprecate); var _translation = require('./translation'); var _translation2 = _interopRequireDefault(_translation); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.Translation = _translation2.default; 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 _translation2.default(); var format = exports.format = (0, _deprecate2.default)(t.format, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var formatTo = exports.formatTo = (0, _deprecate2.default)(t.formatTo, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var formatCurrent = exports.formatCurrent = (0, _deprecate2.default)(t.formatCurrent, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var translate = exports.translate = (0, _deprecate2.default)(t.translate, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var translateTo = exports.translateTo = (0, _deprecate2.default)(t.translateTo, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var translateCurrent = exports.translateCurrent = (0, _deprecate2.default)(t.translateCurrent, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var load = exports.load = (0, _deprecate2.default)(t.load, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var loadRoot = exports.loadRoot = (0, _deprecate2.default)(t.loadRoot, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var setLocale = exports.setLocale = (0, _deprecate2.default)(t.setLocale, EXPORTED_SINGLETON_METHODS_DEPRECATION_NOTICE); var currentLocale = exports.currentLocale = t.currentLocale; var fallbackLocale = exports.fallbackLocale = t.fallbackLocale; exports.default = t;