浏览代码

Added login-panel placeholder and roster-item Name translations

This will allow to translate 'user@server' and 'password' in the login
screen and also in the roster-item tooltip, there's 'Name:' which can
now be translated
Guillermo Bonvehí 10 年之前
父节点
当前提交
70191eac00
共有 3 个文件被更改,包括 7 次插入4 次删除
  1. 4 1
      converse.js
  2. 2 2
      src/templates/login_panel.html
  3. 1 1
      src/templates/roster_item.html

+ 4 - 1
converse.js

@@ -3686,6 +3686,7 @@
                             'desc_status': STATUSES[chat_status||'offline'],
                             'desc_chat': __('Click to chat with this contact'),
                             'desc_remove': __('Click to remove this contact'),
+                            'title_fullname': __('Name'),
                             'allow_contact_removal': converse.allow_contact_removal
                         })
                     ));
@@ -5333,7 +5334,9 @@
                         'label_username': __('XMPP Username:'),
                         'label_password': __('Password:'),
                         'label_anon_login': __('Click here to log in anonymously'),
-                        'label_login': __('Log In')
+                        'label_login': __('Log In'),
+                        'placeholder_username': __('user@server'),
+                        'placeholder_password': __('password')
                     })
                 ));
                 this.$tabs = cfg.$parent.parent().find('#controlbox-tabs');

+ 2 - 2
src/templates/login_panel.html

@@ -5,9 +5,9 @@
     {[ if (!auto_login) { ]}
         {[ if (authentication == LOGIN) { ]}
             <label>{{label_username}}</label>
-            <input name="jid" placeholder="user@server">
+            <input name="jid" placeholder="{{placeholder_username}}">
             <label>{{label_password}}</label>
-            <input type="password" name="password" placeholder="password">
+            <input type="password" name="password" placeholder="{{placeholder_password}}">
             <input class="submit" type="submit" value="{{label_login}}">
             <span class="conn-feedback"></span>
         {[ } ]}

+ 1 - 1
src/templates/roster_item.html

@@ -1,4 +1,4 @@
-<a class="open-chat" title="Name: {{fullname}}
+<a class="open-chat" title="{{title_fullname}}: {{fullname}}
 JID: {{jid}}
 {{desc_chat}}" href="#"><span class="icon-{{chat_status}}" title="{{desc_status}}"></span>{{fullname}}</a>
 {[ if (allow_contact_removal) { ]}