diff --git a/package.json b/package.json index e5bff27561..c298540374 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "grunt": "~0.4.1", "grunt-contrib-cssmin": "~0.8.0", "grunt-browserify": "~1.3.1", - "grunt-contrib-clean": "~0.5.0" + "grunt-contrib-clean": "~0.5.0", + "habitrpg": "git://github.com/HabitRPG/habitrpg.git#develop" }, "scripts": { "test": "mocha" diff --git a/script/i18n.coffee b/script/i18n.coffee index 795e2041f6..42fc89c644 100644 --- a/script/i18n.coffee +++ b/script/i18n.coffee @@ -13,6 +13,8 @@ module.exports = vars = arguments[1] locale = arguments[2] + locale ?= 'en' + string = if (locale and !module.exports.strings) then module.exports.translations[locale][stringName] else module.exports.strings[stringName] if string diff --git a/test/algos.mocha.coffee b/test/algos.mocha.coffee index 6038da0572..b5b11477a4 100644 --- a/test/algos.mocha.coffee +++ b/test/algos.mocha.coffee @@ -6,6 +6,7 @@ expect = require 'expect.js' sinon = require 'sinon' moment = require 'moment' shared = require '../script/index.coffee' +shared.i18n.translations = require('habitrpg/src/i18n.js').translations test_helper = require './test_helper' test_helper.addCustomMatchers() $w = (s)->s.split(' ')