xmpp.chapril.org-conversejs/src/headless/shared/i18n.js
JC Brand d3ab68011a Split core.js file into multiple smaller ones
Update storing of app settings. Store settings in a closured
`app_settings` object inside `@converse/headless/shared/settings`

Remove the `_converse.settings` object.
2021-03-09 14:11:28 +01:00

27 lines
632 B
JavaScript

import { sprintf } from 'sprintf-js';
/**
* @namespace i18n
*/
export default {
initialize () {},
/**
* Overridable string wrapper method which can be used to provide i18n
* support.
*
* The default implementation in @converse/headless simply calls sprintf
* with the passed in arguments.
*
* If you install the full version of Converse, then this method gets
* overwritten in src/i18n/index.js to return a translated string.
* @method __
* @private
* @memberOf i18n
* @param { String } str
*/
__ (...args) {
return sprintf(...args);
}
};