Merge branch 'i18n'

Conflicts:
	app/coffee/infrastructure/Server.coffee
	app/views/project/list.jade
	package.json
This commit is contained in:
Henry Oswald 2014-07-29 13:44:10 +01:00
commit 39173fe583
5 changed files with 10 additions and 1 deletions

View file

@ -9,6 +9,7 @@ Server = require("./app/js/infrastructure/Server")
BackgroundTasks = require("./app/js/infrastructure/BackgroundTasks")
Errors = require "./app/js/errors"
argv = require("optimist")
.options("user", {alias : "u", description : "Run the server with permissions of the specified user"})
.options("group", {alias : "g", description : "Run the server with permissions of the specified group"})

View file

@ -49,6 +49,10 @@ module.exports = (app)->
res.locals.settings = Settings
next()
app.use (req, res, next)->
res.locals.translate = req.i18n.translate
next()
app.use (req, res, next)->
res.locals.getSiteHost = ->
Settings.siteUrl.substring(Settings.siteUrl.indexOf("//")+2)

View file

@ -18,6 +18,7 @@ oneDayInMilliseconds = 86400000
ReferalConnect = require('../Features/Referal/ReferalConnect')
RedirectManager = require("./RedirectManager")
OldAssetProxy = require("./OldAssetProxy")
translations = require "translations-sharelatex"
metrics.mongodb.monitor(Path.resolve(__dirname + "/../../../node_modules/mongojs/node_modules/mongodb"), logger)
metrics.mongodb.monitor(Path.resolve(__dirname + "/../../../node_modules/mongoose/node_modules/mongodb"), logger)
@ -46,6 +47,8 @@ app.configure () ->
app.set 'views', __dirname + '/../../views'
app.set 'view engine', 'jade'
app.use express.bodyParser(uploadDir: Settings.path.uploadFolder)
app.use express.bodyParser(uploadDir: __dirname + "/../../../data/uploads")
app.use translations.expressMiddlewear
app.use cookieParser
app.use express.session
proxy: Settings.behindProxy

View file

@ -25,6 +25,7 @@
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master",
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#master",
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#master",
"translations-sharelatex": "git+https://github.com/sharelatex/translations-sharelatex.git#master",
"soa-req-id": "git+https://github.com/sharelatex/soa-req-id.git#master",
"fairy": "0.0.2",
"node-uuid": "1.4.1",