浏览代码

Send button must be translateable and should type "submit"

JC Brand 8 年之前
父节点
当前提交
de2f33f333
共有 4 个文件被更改,包括 9 次插入7 次删除
  1. 2 1
      src/converse-chatview.js
  2. 5 4
      src/converse-muc.js
  3. 1 1
      src/templates/chatarea.html
  4. 1 1
      src/templates/chatbox.html

+ 2 - 1
src/converse-chatview.js

@@ -125,7 +125,8 @@
                                         title: this.model.get('fullname'),
                                         unread_msgs: __('You have unread messages'),
                                         info_close: __('Close this chat box'),
-                                        label_personal_message: __('Personal message')
+                                        label_personal_message: __('Personal message'),
+                                        label_send: __('Send')
                                     }
                                 )
                             )

+ 5 - 4
src/converse-muc.js

@@ -409,10 +409,11 @@
                     if (!this.$('.chat-area').length) {
                         this.$('.chatroom-body').empty()
                             .append(tpl_chatarea({
-                                    'unread_msgs': __('You have unread messages'),
-                                    'show_toolbar': _converse.show_toolbar,
                                     'label_message': __('Message'),
-                                    'show_send_button': _converse.show_send_button
+                                    'label_send': __('Send'),
+                                    'show_send_button': _converse.show_send_button,
+                                    'show_toolbar': _converse.show_toolbar,
+                                    'unread_msgs': __('You have unread messages')
                                 }))
                             .append(this.occupantsview.$el);
                         this.renderToolbar(tpl_chatroom_toolbar);
@@ -2098,7 +2099,7 @@
                             this.renderRoomFeatures, 100, {'leading': false}
                         );
                     }
-                    var changed_features = {}
+                    var changed_features = {};
                     _.each(_.keys(model.changed), function (k) {
                         if (!_.isNil(ROOM_FEATURES_MAP[k])) {
                             changed_features[ROOM_FEATURES_MAP[k]] = !model.changed[k];

+ 1 - 1
src/templates/chatarea.html

@@ -8,7 +8,7 @@
         <textarea type="text" class="chat-textarea {[ if (show_send_button) { ]}chat-textarea-send-button{[ } ]}"
             placeholder="{{{label_message}}}"/>
     {[ if (show_send_button) { ]}
-        <button type="button" class="pure-button send-button">Send</button>
+        <button type="submit" class="pure-button send-button">{{{ label_send }}}</button>
     {[ } ]}
     </form>
 </div>

+ 1 - 1
src/templates/chatbox.html

@@ -29,7 +29,7 @@
             placeholder="{{{label_personal_message}}}"/>
 
         {[ if (show_send_button) { ]}
-            <button type="button" class="pure-button send-button">Send</button>
+            <button type="submit" class="pure-button send-button">{{{ label_send }}}</button>
         {[ } ]}
         </form>
         {[ } ]}