diff --git a/locales/en/app.json b/locales/en/app.json new file mode 100644 index 0000000000..ccaa36d8ec --- /dev/null +++ b/locales/en/app.json @@ -0,0 +1,10 @@ +{ + "Habit": "Habit", + "Daily": "Daily", + "Todo": "Todo", + "Reward": "Reward", + "Habits": "Habits", + "Dailies": "Dailies", + "Todos": "Todos", + "Rewards": "Rewards" +} \ No newline at end of file diff --git a/locales/he/app.json b/locales/he/app.json new file mode 100644 index 0000000000..83c7bec24e --- /dev/null +++ b/locales/he/app.json @@ -0,0 +1,10 @@ +{ + "Habit": "Habit", + "Daily": "Daily", + "Todo": "Todo", + "Reward": "Reward", + "Habits": "נווו קדימה!", + "Dailies": "Dailies", + "Todos": "Todos", + "Rewards": "Rewards" +} \ No newline at end of file diff --git a/package.json b/package.json index a185c5fd20..40f0d85c07 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "superagent": "~0.12.4", "resolve": "~0.2.3", "browserify": "1.17.3", - "expect.js": "~0.2.0" + "expect.js": "~0.2.0", + "derby-i18n": "0.0.1" }, "private": true, "subdomain": "habitrpg", diff --git a/src/app/browser.coffee b/src/app/browser.coffee index 8f2410001f..ed88fb03e1 100644 --- a/src/app/browser.coffee +++ b/src/app/browser.coffee @@ -114,7 +114,7 @@ setupTour = (model) -> } ] - $('.main-avatar').popover('destroy') #remove previous popovers + $('.main-herobox').popover('destroy') #remove previous popovers tour = new Tour() _.each tourSteps, (step) -> tour.addStep _.defaults step, {html:true} diff --git a/src/app/character.coffee b/src/app/character.coffee index 9478e09768..7b215fb746 100644 --- a/src/app/character.coffee +++ b/src/app/character.coffee @@ -92,17 +92,17 @@ module.exports.app = (appExports, model) -> user.on 'set', 'flags.customizationsNotification', (captures, args) -> return unless captures == true - $('.main-avatar').popover('destroy') #remove previous popovers + $('.main-herobox').popover('destroy') #remove previous popovers html = """ - Click your avatar to customize your appearance. [Close] + Click your avatar to customize your appearance. [Close] """ - $('.main-avatar').popover + $('.main-herobox').popover title: "Customize Your Avatar" placement: 'bottom' trigger: 'manual' html: true content: html - $('.main-avatar').popover 'show' + $('.main-herobox').popover 'show' userSchema = diff --git a/src/app/i18n.coffee b/src/app/i18n.coffee new file mode 100644 index 0000000000..07b233a562 --- /dev/null +++ b/src/app/i18n.coffee @@ -0,0 +1,5 @@ +i18n = require 'derby-i18n' + +i18n.plurals.add 'he', (n) -> n + +module.exports = i18n diff --git a/src/app/index.coffee b/src/app/index.coffee index c1a8b48aba..33f75bee36 100644 --- a/src/app/index.coffee +++ b/src/app/index.coffee @@ -1,10 +1,17 @@ derby = require 'derby' app = derby.createApp module + {get, view, ready} = app derby.use require('derby-ui-boot'), {styles: []} derby.use require '../../ui' derby.use require 'derby-auth/components' +# Translations +i18n = require './i18n' +i18n.localize app, + availableLocales: ['en', 'he'] + defaultLocale: 'en' + # Custom requires character = require './character' tasks = require './tasks' diff --git a/src/app/party.coffee b/src/app/party.coffee index 30592b5557..47fb07fe6c 100644 --- a/src/app/party.coffee +++ b/src/app/party.coffee @@ -71,38 +71,31 @@ module.exports.partySubscribe = partySubscribe = (page, model, params, next, cb) module.exports.app = (appExports, model) -> user = model.at('_user') - unlockPartiesNotification = -> - $('.main-avatar').popover('destroy') #remove previous popovers + user.on 'set', 'flags.partyEnabled', (captures, args) -> + return if (captures != true) or user.get('party.current') + $('.user-menu').popover('destroy') #remove previous popovers html = """
- Congratulations, you have unlocked the Party System! You can now group with your friends by adding their User Ids.
- [Close]
+ Be social, join a party and play Habit with your friends! You'll be better at your habits with accountability partners. LFG anyone?
+ [Close]
| {username(:member.auth)} | ({:member.id}) |
| {username(:member.auth)} | ({:member.id}) |
You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:
-{_user.id}
-
+ You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:
+{_user.id}
+
{/}
<@footer>
diff --git a/views/app/rewards.html b/views/app/rewards.html
index da0eadecf4..37cfb2189c 100644
--- a/views/app/rewards.html
+++ b/views/app/rewards.html
@@ -20,7 +20,7 @@