app.js + todo

This commit is contained in:
psychobunny
2013-09-20 16:02:25 -04:00
parent 451ffafb9e
commit a631707db4
2 changed files with 20 additions and 8 deletions

21
app.js
View File

@@ -79,20 +79,27 @@
};
var templates = require('./public/src/templates.js'),
translator = require('./public/src/translator.js'),
webserver = require('./src/webserver.js'),
websockets = require('./src/websockets.js'),
plugins = require('./src/plugins'); // Don't remove this - plugins initializes itself
global.templates = {};
templates.init([
'header', 'footer', 'logout', 'outgoing', 'admin/header', 'admin/footer', 'admin/index',
'emails/reset', 'emails/reset_plaintext', 'emails/email_confirm', 'emails/email_confirm_plaintext',
'emails/header', 'emails/footer',
'noscript/header', 'noscript/home', 'noscript/category', 'noscript/topic'
]);
translator.loadAll(function () {
// todo: replace below with read directory code, derp.
templates.init([
'header', 'footer', 'logout', 'outgoing', 'admin/header', 'admin/footer', 'admin/index',
'emails/reset', 'emails/reset_plaintext', 'emails/email_confirm', 'emails/email_confirm_plaintext',
'emails/header', 'emails/footer',
'noscript/header', 'noscript/home', 'noscript/category', 'noscript/topic'
]);
templates.ready(webserver.init);
});
templates.ready(webserver.init);
});
} else if (nconf.get('upgrade')) {

View File

@@ -1,2 +1,7 @@
1. NPM INSTALL
For now, language packs will be stored here. Eventually, will be moved to server side to allow for npm installability.
When that happens, server code will generate compressed JSON language files in this folder.
When that happens, server code will generate compressed JSON language files in this folder.
2. SERVERSIDE METHODS
Allow server side code to call language.get(key)