Commit 7b0e1d33 authored by JC Brand's avatar JC Brand

Working on a way to build converse without locales.

- Add nolocales.js and let the __ function handle case where there aren't any
  locales specified.

Also:
In require config, change localstorage to backbone.localStorage (for better
integration with bungle).
parent ef1a57c6
......@@ -14,7 +14,7 @@
if (typeof define === 'function' && define.amd) {
define("converse", [
"locales",
"localstorage",
"backbone.localStorage",
"tinysort",
"strophe",
"strophe.muc",
......@@ -76,6 +76,9 @@
_.extend(this, _.pick(settings, whitelist));
var __ = $.proxy(function (str) {
if (i18n === undefined) {
return str;
}
var t = this.i18n.translate(str);
if (arguments.length>1) {
return t.fetch.apply(t, [].slice.call(arguments,1));
......
/*
* This file can be used if no locale support is required.
*/
(function (root, factory) {
define("locales", [], function () {
root.locales = {};
});
})(this);
......@@ -5,7 +5,7 @@ require.config({
"tinysort": "components/tinysort/src/jquery.tinysort",
"underscore": "components/underscore/underscore",
"backbone": "components/backbone/backbone",
"localstorage": "components/backbone.localStorage/backbone.localStorage",
"backbone.localStorage": "components/backbone.localStorage/backbone.localStorage",
"strophe": "components/strophe/strophe",
"strophe.muc": "components/strophe.muc/index",
"strophe.roster": "components/strophe.roster/index",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment