diff --git a/lib/templates_helpers/at_error.js b/lib/templates_helpers/at_error.js index 5673dfe..9aeb045 100644 --- a/lib/templates_helpers/at_error.js +++ b/lib/templates_helpers/at_error.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atErrorHelpers = { singleError: function() { var errors = AccountsTemplates.state.form.get("error"); diff --git a/lib/templates_helpers/at_input.js b/lib/templates_helpers/at_input.js index fe74eeb..8b407e2 100644 --- a/lib/templates_helpers/at_input.js +++ b/lib/templates_helpers/at_input.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atInputRendered = [function(){ var fieldId = this.data._id; diff --git a/lib/templates_helpers/at_message.js b/lib/templates_helpers/at_message.js index baa9ca0..e4192fb 100644 --- a/lib/templates_helpers/at_message.js +++ b/lib/templates_helpers/at_message.js @@ -1,7 +1,12 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atMessageHelpers = { message: function() { var messageText = AccountsTemplates.state.form.get("message"); if (messageText) return T9n.get(messageText, markIfMissing=false); }, -}; \ No newline at end of file +}; diff --git a/lib/templates_helpers/at_nav_button.js b/lib/templates_helpers/at_nav_button.js index c434060..e5d142c 100644 --- a/lib/templates_helpers/at_nav_button.js +++ b/lib/templates_helpers/at_nav_button.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atNavButtonHelpers = { text: function(){ var key = Meteor.userId() ? AccountsTemplates.texts.navSignOut : AccountsTemplates.texts.navSignIn; diff --git a/lib/templates_helpers/at_pwd_form.js b/lib/templates_helpers/at_pwd_form.js index 2f8d53c..0e57f5c 100644 --- a/lib/templates_helpers/at_pwd_form.js +++ b/lib/templates_helpers/at_pwd_form.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atPwdFormHelpers = { disabled: function() { return AccountsTemplates.disabled(); diff --git a/lib/templates_helpers/at_pwd_form_btn.js b/lib/templates_helpers/at_pwd_form_btn.js index fc26362..f4fd8ea 100644 --- a/lib/templates_helpers/at_pwd_form_btn.js +++ b/lib/templates_helpers/at_pwd_form_btn.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atPwdFormBtnHelpers = { submitDisabled: function(){ var disable = _.chain(AccountsTemplates.getFields()) diff --git a/lib/templates_helpers/at_pwd_link.js b/lib/templates_helpers/at_pwd_link.js index dd93a39..f3fc2fa 100644 --- a/lib/templates_helpers/at_pwd_link.js +++ b/lib/templates_helpers/at_pwd_link.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atPwdLinkHelpers = { disabled: function() { return AccountsTemplates.disabled(); @@ -21,4 +26,4 @@ AT.prototype.atPwdLinkEvents = { event.preventDefault(); AccountsTemplates.linkClick("forgotPwd"); }, -}; \ No newline at end of file +}; diff --git a/lib/templates_helpers/at_reCaptcha.js b/lib/templates_helpers/at_reCaptcha.js index ea0c0c6..0e9c880 100644 --- a/lib/templates_helpers/at_reCaptcha.js +++ b/lib/templates_helpers/at_reCaptcha.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atReCaptchaRendered = function() { $.getScript('//www.google.com/recaptcha/api.js?hl=' + T9n.getLanguage()); }; diff --git a/lib/templates_helpers/at_resend_verification_email_link.js b/lib/templates_helpers/at_resend_verification_email_link.js index 5587900..161416e 100644 --- a/lib/templates_helpers/at_resend_verification_email_link.js +++ b/lib/templates_helpers/at_resend_verification_email_link.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atResendVerificationEmailLinkHelpers = { disabled: function () { return AccountsTemplates.disabled(); @@ -21,4 +26,4 @@ AT.prototype.atResendVerificationEmailLinkEvents = { event.preventDefault(); AccountsTemplates.linkClick('resendVerificationEmail'); }, -}; \ No newline at end of file +}; diff --git a/lib/templates_helpers/at_result.js b/lib/templates_helpers/at_result.js index d4b287d..6322dde 100644 --- a/lib/templates_helpers/at_result.js +++ b/lib/templates_helpers/at_result.js @@ -1,7 +1,12 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atResultHelpers = { result: function() { var resultText = AccountsTemplates.state.form.get("result"); if (resultText) return T9n.get(resultText, markIfMissing=false); }, -}; \ No newline at end of file +}; diff --git a/lib/templates_helpers/at_sep.js b/lib/templates_helpers/at_sep.js index 7c27557..05dffac 100644 --- a/lib/templates_helpers/at_sep.js +++ b/lib/templates_helpers/at_sep.js @@ -1,5 +1,10 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atSepHelpers = { sepText: function(){ return T9n.get(AccountsTemplates.texts.sep, markIfMissing=false); }, -}; \ No newline at end of file +}; diff --git a/lib/templates_helpers/at_signin_link.js b/lib/templates_helpers/at_signin_link.js index 14f6e88..c24f79f 100644 --- a/lib/templates_helpers/at_signin_link.js +++ b/lib/templates_helpers/at_signin_link.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atSigninLinkHelpers = { disabled: function() { return AccountsTemplates.disabled(); diff --git a/lib/templates_helpers/at_signup_link.js b/lib/templates_helpers/at_signup_link.js index 29c809a..243e210 100644 --- a/lib/templates_helpers/at_signup_link.js +++ b/lib/templates_helpers/at_signup_link.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atSignupLinkHelpers = { disabled: function() { return AccountsTemplates.disabled(); diff --git a/lib/templates_helpers/at_social.js b/lib/templates_helpers/at_social.js index 912fd6e..e7b7978 100644 --- a/lib/templates_helpers/at_social.js +++ b/lib/templates_helpers/at_social.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atSocialHelpers = { disabled: function() { if (AccountsTemplates.disabled()) diff --git a/lib/templates_helpers/at_terms_link.js b/lib/templates_helpers/at_terms_link.js index 0ada35c..fdcc1c1 100644 --- a/lib/templates_helpers/at_terms_link.js +++ b/lib/templates_helpers/at_terms_link.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atTermsLinkHelpers = { disabled: function() { return AccountsTemplates.disabled(); @@ -30,4 +35,4 @@ AT.prototype.atTermsLinkEvents = { if (AccountsTemplates.disabled()) event.preventDefault(); }, -}; \ No newline at end of file +}; diff --git a/lib/templates_helpers/at_title.js b/lib/templates_helpers/at_title.js index 74f711b..54b9dfb 100644 --- a/lib/templates_helpers/at_title.js +++ b/lib/templates_helpers/at_title.js @@ -1,3 +1,8 @@ +import { T9n } from 'meteor-accounts-t9n'; +T9n.setLanguage('en'); +import { en } from 'meteor-accounts-t9n/build/en'; +T9n.map("en", en); + AT.prototype.atTitleHelpers = { title: function() { var parentData = Template.currentData(); diff --git a/package.js b/package.js index 079ab6e..1247400 100644 --- a/package.js +++ b/package.js @@ -15,6 +15,7 @@ Package.onUse(function(api) { 'check', 'underscore', 'reactive-var', + 'ecmascript@0.10.0' ], ['client', 'server']); api.use([ @@ -30,7 +31,6 @@ Package.onUse(function(api) { api.imply([ 'accounts-base', - 'softwarerero:accounts-t9n@1.3.3', ], ['client', 'server']); api.imply([