fix i18n and import site settings

This commit is contained in:
Rimian Perkins 2017-02-28 12:39:07 +11:00
parent b6a4d5dc8e
commit 10e63f2a4c
4 changed files with 11 additions and 9 deletions

View File

@ -1,13 +1,17 @@
import { ajax } from 'discourse/lib/ajax';
import { getRegister } from 'discourse-common/lib/get-owner';
export default Ember.Component.extend({
donateAmounts: [1, 5, 10, 25],
result: null,
donateAmounts: [5, 10],
amount: null,
stripe: null,
stripe: function() {
return Stripe(Discourse.discourse_donations_public_key);
}.property('stripe'),
init() {
this._super();
var public_key = getRegister(this).lookup('site-settings:main').discourse_donations_public_key
this.set('stripe', Stripe(public_key));
},
card: function() {
var elements = this.get('stripe').elements();

View File

@ -6,5 +6,3 @@ en:
card: Kreditkarte oder Bankkarte
success: Bezahlung erfolgreich !
submit: Spende bezahlen
secret_key: Secret Key
public_key: Public Key

View File

@ -6,5 +6,3 @@ en:
card: Credit or debit card
success: Payment Successful!
submit: Make Payment
secret_key: Secret Key
public_key: Public Key

View File

@ -1,3 +1,5 @@
en:
site_settings:
discourse_donations_enabled: "Enable the discourse donations plugin."
discourse_donations_enabled: Enable the discourse donations plugin.
discourse_donations_secret_key: Stripe Secret Key
discourse_donations_public_key: Stripe Public Key