diff --git a/app/core/application.coffee b/app/core/application.coffee index 73c6612f0..310355e7a 100644 --- a/app/core/application.coffee +++ b/app/core/application.coffee @@ -65,6 +65,7 @@ Application = initialize: -> lng: me.get('preferredLanguage', true) fallbackLng: 'en' resStore: locale + useDataAttrOptions: true #debug: true #sendMissing: true #sendMissingTo: 'current' diff --git a/app/locale/en.coffee b/app/locale/en.coffee index d3df6a4da..f2b863513 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -1,12 +1,4 @@ module.exports = nativeDescription: "English", englishDescription: "English", translation: - # Don't translate this block nor copy it to other locale files. - # This is just raw data that is automatically shared across all locales. - data: - levelsCount: "125" - bonusLevelsCount: "85" - heroesCount: "10" - worldsCount: "4" - home: slogan: "Learn to Code by Playing a Game" no_ie: "CodeCombat does not run in Internet Explorer 8 or older. Sorry!" # Warning that only shows up in IE8 and older @@ -560,9 +552,9 @@ subscribe: comparison_blurb: "Sharpen your skills with a CodeCombat subscription!" - feature1: "$t(data.levelsCount)+ basic levels across $t(data.worldsCount) worlds" - feature2: "$t(data.heroesCount) powerful new heroes with unique skills!" - feature3: "$t(data.bonusLevelsCount)+ bonus levels" + feature1: "__levelsCount__+ basic levels across __worldsCount__ worlds" + feature2: "__heroesCount__ powerful new heroes with unique skills!" + feature3: "__bonusLevelsCount__+ bonus levels" feature4: "{{gems}} bonus gems every month!" feature5: "Video tutorials" feature6: "Premium email support" diff --git a/app/templates/core/subscribe-modal.jade b/app/templates/core/subscribe-modal.jade index fde542d05..a14674e4d 100644 --- a/app/templates/core/subscribe-modal.jade +++ b/app/templates/core/subscribe-modal.jade @@ -32,7 +32,7 @@ tbody tr td.feature-description - span(data-i18n="subscribe.feature1") + span(data-i18n="subscribe.feature1", data-i18n-options='{"levelsCount": ' + view.i18nData.levelsCount + ', "worldsCount": ' + view.i18nData.worldsCount + '}') if !me.isOnPremiumServer() td.center-ok.free-cell span.glyphicon.glyphicon-ok @@ -40,14 +40,14 @@ span.glyphicon.glyphicon-ok tr td.feature-description - span(data-i18n="[html]subscribe.feature2") + span(data-i18n="[html]subscribe.feature2", data-i18n-options='{"heroesCount": ' + view.i18nData.heroesCount + '}') if !me.isOnPremiumServer() td.free-cell td.center-ok span.glyphicon.glyphicon-ok tr td.feature-description - span(data-i18n="subscribe.feature3") + span(data-i18n="subscribe.feature3", data-i18n-options='{"bonusLevelsCount": ' + view.i18nData.bonusLevelsCount + '}')) if !me.isOnPremiumServer() td.free-cell td.center-ok diff --git a/app/views/core/SubscribeModal.coffee b/app/views/core/SubscribeModal.coffee index da3e1988f..2addc1dea 100644 --- a/app/views/core/SubscribeModal.coffee +++ b/app/views/core/SubscribeModal.coffee @@ -11,6 +11,11 @@ module.exports = class SubscribeModal extends ModalView plain: true closesOnClickOutside: false planID: 'basic' + i18nData: + levelsCount: '145' + worldsCount: '5' + heroesCount: '14' + bonusLevelsCount: '95' subscriptions: 'stripe:received-token': 'onStripeReceivedToken'