Skip to content

Commit

Permalink
Merge pull request #19 from gdpelican/i18n
Browse files Browse the repository at this point in the history
I18n
  • Loading branch information
gdpelican committed Aug 12, 2015
2 parents 2e8c071 + a13f6d6 commit e6c0685
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import Presence from 'discourse/mixins/presence';
export default Ember.Component.extend(Presence, {
classNames: ['babble-post-composer'],

_init: function() {
this.set('placeholder', I18n.t('babble.placeholder'))
}.on('init'),

keyDown: function(event) {
if (event.keyCode == 13) {
this._actions.submit(this) // submit on enter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="babble-composer">
{{textarea value=text}}
<button {{action 'submit'}} {{bind-attr disabled="submitDisabled"}} class="btn btn-primary pull-right">Send</button>
{{textarea value=text placeholder=placeholder }}
<button {{action 'submit'}} {{bind-attr disabled="submitDisabled"}} class="btn btn-primary pull-right">{{i18n 'babble.send'}}</button>
</div>
6 changes: 6 additions & 0 deletions config/locales/client.de.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
de:
js:
babble:
placeholder: "Chat-Nachricht hier eingeben..."
send: "Abschicken"
title: "Shoutbox!"
6 changes: 6 additions & 0 deletions config/locales/client.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
en:
js:
babble:
placeholder: "type your chat message here..."
send: "Send"
title: "Shoutbox!"

0 comments on commit e6c0685

Please sign in to comment.