Browse Source

Migrate remaining modal views to msgid

master
Igor Zhukov 10 years ago committed by Roman Anasal
parent
commit
80eee8d5ec
  1. 10
      app/partials/chat_create_modal.html
  2. 10
      app/partials/chat_edit_modal.html
  3. 37
      app/partials/chat_modal.html
  4. 79
      app/partials/confirm_modal.html
  5. 39
      app/partials/contacts_modal.html
  6. 8
      app/partials/country_select_modal.html
  7. 41
      app/partials/dialog.html
  8. 12
      app/partials/edit_contact_modal.html
  9. 90
      app/partials/error_modal.html
  10. 16
      app/partials/import_contact_modal.html
  11. 35
      app/partials/mobile/chat_modal.html
  12. 35
      app/partials/mobile/contacts_modal.html
  13. 6
      app/partials/mobile/country_select_modal.html
  14. 8
      app/partials/mobile/peer_select.html
  15. 21
      app/partials/mobile/phonebook_modal.html
  16. 35
      app/partials/mobile/settings_modal.html
  17. 20
      app/partials/mobile/user_modal.html
  18. 8
      app/partials/peer_select.html
  19. 8
      app/partials/photo_modal.html
  20. 12
      app/partials/profile_edit_modal.html
  21. 46
      app/partials/settings_modal.html
  22. 25
      app/partials/user_modal.html
  23. 8
      app/partials/video_modal.html

10
app/partials/chat_create_modal.html

@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
<form class="modal_simple_form" ng-submit="createGroup()">
<h4>Create Group</h4>
<h4 my-i18n="group_create_modal_title"></h4>
<div class="form-group">
<input class="form-control input-sm" my-focused type="text" placeholder="Group name" ng-model="group.name"/>
<input class="form-control input-sm" my-focused type="text" placeholder="{{'group_create_name' | i18n}}" ng-model="group.name"/>
</div>
</form>
@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
</div>
<div class="modal-footer">
<a class="btn btn-link" ng-click="$dismiss()">Cancel</a>
<button class="btn btn-primary" ng-class="{disabled: group.creating}" ng-click="createGroup()" ng-bind="group.creating ? 'Creating...' : 'Create Group'" ng-disabled="group.creating"></button>
<a class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel"></a>
<button class="btn btn-primary" ng-class="{disabled: group.creating}" ng-click="createGroup()" ng-bind="group.creating ? 'group_create_submit_active' : 'group_create_submit' | i18n" ng-disabled="group.creating"></button>
</div>
</div>
</div>

10
app/partials/chat_edit_modal.html

@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
<form class="modal_simple_form" ng-submit="updateGroup()">
<h4>Edit Group</h4>
<h4 my-i18n="group_edit_modal_title"></h4>
<div class="form-group">
<input class="form-control input-sm" my-focused type="text" placeholder="Group name" ng-model="group.name"/>
<input class="form-control input-sm" my-focused type="text" placeholder="{{'group_edit_name' | i18n}}" ng-model="group.name"/>
</div>
</form>
@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
</div>
<div class="modal-footer">
<a class="btn btn-link" ng-click="$dismiss()">Cancel</a>
<button class="btn btn-primary" ng-class="{disabled: group.updating}" ng-click="updateGroup()" ng-bind="group.updating ? 'Saving...' : 'Save'" ng-disabled="group.updating"></button>
<a class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel">Cancel</a>
<button class="btn btn-primary" ng-class="{disabled: group.updating}" ng-click="updateGroup()" ng-bind="group.updating ? 'group_edit_submit_active' : 'group_edit_submit' | i18n" ng-disabled="group.updating"></button>
</div>
</div>
</div>

37
app/partials/chat_modal.html

@ -19,39 +19,42 @@ @@ -19,39 +19,42 @@
<h4 class="chat_modal_header" ng-bind-html="chatFull.chat.rTitle"></h4>
<p class="chat_modal_members_count" ng-if="chatFull.chat.participants_count > 0">
<ng-pluralize count="chatFull.chat.participants_count"
when="{'0': 'No members', 'one': '1 member', 'other': '{} members'}">
when="group_modal_pluralize_participants">
</ng-pluralize>
</p>
<div class="chat_modal_actions_wrap clearfix">
<button ng-if="!chatFull.chat.left &amp;&amp; chatFull.participants.participants.length" class="btn btn-primary chat_modal_invite_btn" ng-click="inviteToGroup()">Add member</button>
<button ng-if="chatFull.chat._ != 'chatForbidden' &amp;&amp; chatFull.chat.left" class="btn btn-primary chat_modal_main_btn" ng-click="returnToGroup()">Return to group</button>
<button ng-if="chatFull.chat._ == 'chatForbidden'" class="btn btn-danger chat_modal_delete_btn" ng-click="flushHistory()">Delete chat</button>
<button ng-if="!chatFull.chat.left &amp;&amp; chatFull.participants.participants.length" class="btn btn-primary chat_modal_invite_btn" ng-click="inviteToGroup()" my-i18n="group_modal_add_member"></button>
<button ng-if="chatFull.chat._ != 'chatForbidden' &amp;&amp; chatFull.chat.left" class="btn btn-primary chat_modal_main_btn" ng-click="returnToGroup()" my-i18n="group_modal_return"></button>
<button ng-if="chatFull.chat._ == 'chatForbidden'" class="btn btn-danger chat_modal_delete_btn" ng-click="flushHistory()" my-i18n="group_modal_menu_delete_chat"></button>
<span ng-if="chatFull.chat._ != 'chatForbidden' &amp;&amp; !chatFull.chat.left &amp;&amp; !photo.updating" class="btn btn-primary chat_modal_main_btn" >
<input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />
Update photo
<my-i18n msgid="group_modal_update_photo"></my-i18n>
</span>
<span ng-if="photo.updating" class="btn btn-primary chat_modal_main_btn disabled" disabled>
Updating<span my-loading-dots></span>
<my-i18n msgid="group_modal_update_active"></my-i18n><span my-loading-dots></span>
</span>
<div class="dropdown chat_modal_other_btn" ng-if="chatFull.chat._ != 'chatForbidden' &amp;&amp; !chatFull.chat.left">
<button class="btn btn-link dropdown-toggle">More<i class="icon icon-caret"></i></button>
<button class="btn btn-link dropdown-toggle">
<my-i18n msgid="group_modal_menu_more"></my-i18n>
<i class="icon icon-caret"></i>
</button>
<ul class="dropdown-menu">
<li ng-if="chatFull.thumb.location">
<a ng-click="deletePhoto()">Delete photo</a>
<a ng-click="deletePhoto()" my-i18n="group_modal_menu_delete_photo"></a>
</li>
<li>
<a ng-click="editTitle()">Edit group</a>
<a ng-click="editTitle()" my-i18n="group_modal_menu_edit_group"></a>
</li>
<li>
<a ng-click="leaveGroup()">Leave group</a>
<a ng-click="leaveGroup()" my-i18n="group_modal_menu_leave_group"></a>
</li>
<li>
<a ng-click="flushHistory()">Delete chat</a>
<a ng-click="flushHistory()" my-i18n="group_modal_menu_delete_chat"></a>
</li>
</ul>
</div>
@ -62,26 +65,26 @@ @@ -62,26 +65,26 @@
</div>
<div class="modal_section">
<h3 class="modal_section_header">Settings</h3>
<h3 class="modal_section_header" my-i18n="group_modal_settings"></h3>
<div class="modal_section_body">
<div class="tg_form_group">
<a class="tg_checkbox" ng-click="settings.notifications = !settings.notifications" ng-class="settings.notifications ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Notifications</span>
<span class="tg_checkbox_label" my-i18n="group_modal_notifications"></span>
</a>
</div>
</div>
</div>
<div class="modal_section">
<h3 class="modal_section_header">Members</h3>
<h3 class="modal_section_header" my-i18n="group_modal_members"></h3>
<div class="modal_section_body">
<div class="chat_modal_members_list">
<div class="chat_modal_participant_wrap clearfix" ng-repeat="participant in chatFull.participants.participants | orderBy:'-user.sortStatus'">
<a ng-if="participant.canKick" ng-click="kickFromGroup(participant.user_id)" class="chat_modal_participant_kick pull-right">Kick</a>
<a ng-if="participant.canKick" ng-click="kickFromGroup(participant.user_id)" class="chat_modal_participant_kick pull-right" my-i18n="group_modal_members_kick"></a>
<a class="chat_modal_participant_photo pull-left" my-user-photolink="participant.user_id" img-class="chat_modal_participant_photo" status="true"></a>
@ -93,9 +96,7 @@ @@ -93,9 +96,7 @@
</div>
<div class="chat_modal_members_forbidden" ng-if="chatFull.chat._ == 'chatForbidden' || chatFull.chat.left">
Group members list is unavailable.
</div>
<div class="chat_modal_members_forbidden" ng-if="chatFull.chat._ == 'chatForbidden' || chatFull.chat.left" my-i18n="group_modal_members_unavailable"></div>
</div>
</div>

79
app/partials/confirm_modal.html

@ -5,61 +5,62 @@ @@ -5,61 +5,62 @@
<div class="modal-body">
<div class="confirm_modal_description" ng-switch="type">
<span ng-switch-when="LOGOUT">Are you sure you want to log out?</span>
<span ng-switch-when="WEBOGRAM_UPDATED_RELOAD">A new version of Webogram has been downloaded. Launch it?</span>
<span ng-switch-when="HISTORY_FLUSH">Are you sure? This can not be undone!</span>
<span ng-switch-when="TERMINATE_SESSIONS">Are you sure you want to log out all devices except for the current one?</span>
<span ng-switch-when="HTTPS_MIXED_FAIL">
Your browser <a href="http://mzl.la/13jCUSU" target="_blank">does not support</a> mixed content which is neccessary for MTProto support on https. <a href="https://github.com/zhukov/webogram/issues/237" target="_blank">Learn more &raquo;</a><br/><br/>
Would you like use http-version instead?
<span ng-switch-when="LOGOUT" my-i18n="confirm_modal_logout"></span>
<span ng-switch-when="WEBOGRAM_UPDATED_RELOAD" my-i18n="confirm_modal_update_reload"></span>
<span ng-switch-when="HISTORY_FLUSH" my-i18n="confirm_modal_history_flush"></span>
<span ng-switch-when="TERMINATE_SESSIONS" my-i18n="confirm_modal_terminate_sessions"></span>
<span ng-switch-when="HTTPS_MIXED_FAIL" my-i18n="confirm_modal_mixed_content_fail_http_redirect">
<my-i18n-param name="moz-link"><a href="http://mzl.la/13jCUSU" target="_blank">{0}</a></my-i18n-param>
<my-i18n-param name="issue-link"><a href="https://github.com/zhukov/webogram/issues/237" target="_blank">{0} &raquo;</a></my-i18n-param>
</span>
<span ng-switch-when="FILES_CLIPBOARD_PASTE">
<ng-pluralize count="files.length"
when="{'one': 'Are you sure to send file from clipboard?', 'other': 'Are you sure to send {} files from clipboard?'}">
when="confirm_modal_clipboard_X_files_send">
</ng-pluralize>
</span>
<span ng-switch-when="FILE_CLIPBOARD_PASTE">Are you sure to send file(s) from clipboard?</span>
<span ng-switch-when="MESSAGE_DELETE">Are you sure you want to delete the message?</span>
<span ng-switch-when="CONTACTS_IMPORT_PERFORM">Telegram will now sync your contacts in order to find your friends.</span>
<span ng-switch-when="FILE_CLIPBOARD_PASTE" my-i18n="confirm_modal_clipboard_file_send"></span>
<span ng-switch-when="MESSAGE_DELETE" my-i18n="confirm_modal_message_delete"></span>
<span ng-switch-when="CONTACTS_IMPORT_PERFORM" my-i18n="confirm_modal_contacts_import"></span>
<div ng-switch-when="LOGIN_PHONE_CORRECT">
Is this phone number correct?
<div class="confirm_phone_number"> <span ng-bind="country_code"></span> <span ng-bind="phone_number"></span> </div>
<my-i18n msgid="confirm_modal_login_phone_correct"></my-i18n>
<div class="confirm_phone_number">
<span ng-bind="country_code"></span> <span ng-bind="phone_number"></span>
</div>
</div>
<span ng-switch-when="FORWARD_PEER">Forward to <strong ng-switch="peer_id > 0">
<span ng-switch-when="true" ng-bind-html="peer_data.rFullName"></span>
<span ng-switch-default ng-bind-html="peer_data.rTitle"></span>
</strong>?</span>
<span ng-switch-when="SHARE_CONTACT_PEER">Send to <strong ng-switch="peer_id > 0">
<span ng-switch-when="true" ng-bind-html="peer_data.rFullName"></span>
<span ng-switch-default ng-bind-html="peer_data.rTitle"></span>
</strong>?</span>
<span ng-switch-when="EXT_SHARE_PEER">Share with <strong ng-switch="peer_id > 0">
<span ng-switch-when="true" ng-bind-html="peer_data.rFullName"></span>
<span ng-switch-default ng-bind-html="peer_data.rTitle"></span>
</strong>?</span>
<span ng-switch-default ng-bind="message || 'Are you sure?'"></span>
<my-i18n>
<span ng-switch-when="FORWARD_PEER" my-i18n-format="confirm_modal_forward_to_peer"></span>
<span ng-switch-when="SHARE_CONTACT_PEER" my-i18n-format="confirm_modal_send_to_peer"></span>
<span ng-switch-when="EXT_SHARE_PEER" my-i18n-format="confirm_modal_share_file_peer"></span>
<my-i18n-param name="peer">
<strong ng-switch="peer_id > 0">
<span ng-switch-when="true" ng-bind-html="peer_data.rFullName"></span>
<span ng-switch-default ng-bind-html="peer_data.rTitle"></span>
</strong>
</my-i18n-param>
</my-i18n>
<span ng-switch-default ng-bind="message || {{'confirm_modal_are_u_sure' | i18n}}"></span>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-link" ng-click="$dismiss()" ng-switch="type">
<span ng-switch-default>Cancel</span>
<span ng-switch-default my-i18n="modal_cancel"></span>
</a>
<button type="button" class="btn btn-primary" ng-switch="type" ng-click="$close()" my-focused>
<span ng-switch-when="LOGOUT">Log Out</span>
<span ng-switch-when="HISTORY_FLUSH">Delete Chat</span>
<span ng-switch-when="FILES_CLIPBOARD_PASTE">Send</span>
<span ng-switch-when="FILE_CLIPBOARD_PASTE">Send</span>
<span ng-switch-when="MESSAGE_DELETE">Delete</span>
<span ng-switch-when="FORWARD_PEER">Forward message</span>
<span ng-switch-when="PHOTO_SHARE_PEER">Forward photo</span>
<span ng-switch-when="VIDEO_SHARE_PEER">Forward video</span>
<span ng-switch-when="SHARE_CONTACT_PEER">Send contact</span>
<span ng-switch-when="EXT_SHARE_PEER">Share file</span>
<span ng-switch-default>OK</span>
<span ng-switch-when="LOGOUT" my-i18n="confirm_modal_logout_submit"></span>
<span ng-switch-when="HISTORY_FLUSH" my-i18n="confirm_modal_history_flush_submit"></span>
<span ng-switch-when="FILES_CLIPBOARD_PASTE" my-i18n="confirm_modal_clipboard_files_send_submit"></span>
<span ng-switch-when="FILE_CLIPBOARD_PASTE" my-i18n="confirm_modal_clipboard_file_send_submit"></span>
<span ng-switch-when="MESSAGE_DELETE" my-i18n="confirm_modal_message_delete_submit"></span>
<span ng-switch-when="FORWARD_PEER" my-i18n="confirm_modal_forward_message_submit"></span>
<span ng-switch-when="PHOTO_SHARE_PEER" my-i18n="confirm_modal_share_photo_submit"></span>
<span ng-switch-when="VIDEO_SHARE_PEER" my-i18n="confirm_modal_share_video_submit"></span>
<span ng-switch-when="SHARE_CONTACT_PEER" my-i18n="confirm_modal_share_contact_submit"></span>
<span ng-switch-when="EXT_SHARE_PEER" my-i18n="confirm_modal_share_file_submit"></span>
<span ng-switch-default my-i18n="modal_ok"></span>
</button>
</div>
</div>
</div>

39
app/partials/contacts_modal.html

@ -6,28 +6,24 @@ @@ -6,28 +6,24 @@
<div class="contacts_modal_header">
<div class="contacts_modal_edit_wrap" ng-if="!action || action == 'edit'" ng-switch="action">
<a ng-switch-when="edit" class="contacts_modal_edit_link" ng-click="toggleEdit(false)">
Cancel
</a>
<a ng-switch-default class="contacts_modal_edit_link" ng-click="toggleEdit(true)">
Edit
</a>
<a ng-switch-when="edit" class="contacts_modal_edit_link" ng-click="toggleEdit(false)" my-i18n="contacts_modal_edit_cancel"></a>
<a ng-switch-default class="contacts_modal_edit_link" ng-click="toggleEdit(true)" my-i18n="contacts_modal_edit_list"></a>
</div>
<h4 class="contacts_modal_title" ng-switch="action">
<div ng-switch-when="new_group" ng-switch="selectedCount > 0">
<span ng-switch-when="true">
<ng-pluralize count="selectedCount" when="{'one': '1 participant', 'other': '{} participants'}">
<ng-pluralize count="selectedCount" when="contacts_modal_pluralize_new_group_members">
</ng-pluralize>
</span>
<span ng-switch-default>New Group</span>
<span ng-switch-default my-i18n="group_create_contacts_modal_title"></span>
</div>
<span ng-switch-default>Contacts</span>
<span ng-switch-default my-i18n="contacts_modal_title"></span>
</h4>
</div>
<div class="contacts_modal_search">
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="contacts_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>
@ -37,8 +33,8 @@ @@ -37,8 +33,8 @@
<div class="contacts_wrap nano" my-infinite-scroller>
<div class="contacts_scrollable_wrap nano-content" ng-switch="contactsEmpty">
<div ng-switch-when="true" class="contacts_modal_contacts_empty" my-vertical-position="0.2" padding="true">
Your contacts list is empty. You can <a href="" ng-click="importContact()">add new contact</a> by phone number.
<div ng-switch-when="true" class="contacts_modal_contacts_empty" my-vertical-position="0.2" padding="true" my-i18n="contacts_modal_empty_list">
<my-i18n-param name="import-link"><a href="" ng-click="importContact()">{0}</a></my-i18n-param>
</div>
<ul ng-switch-default class="contacts_modal_members_list nav nav-pills nav-stacked">
@ -66,21 +62,16 @@ @@ -66,21 +62,16 @@
<div class="modal-footer contacts_modal_panel" ng-switch="action">
<div ng-switch-when="new_group" class="pull-right">
<button class="btn btn-link" ng-click="$dismiss()">Cancel</button>
<button class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit">
Next
</button>
<button class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel"></button>
<button class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit" my-i18n="modal_next"></button>
</div>
<button ng-switch-when="select" class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit">
Next
</button>
<button ng-switch-when="select" class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit" my-i18n="modal_next"></button>
<button ng-switch-when="edit" class="btn btn-danger" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="deleteSelected()">
Delete <strong ng-bind="selectedCount"></strong>
</button>
<button ng-switch-default class="btn btn-link" ng-click="importContact()">
New contact
<my-i18n msgid="contacts_modal_edit_delete"></my-i18n>
<strong ng-bind="selectedCount"></strong>
</button>
<button ng-switch-default class="btn btn-link" ng-click="importContact()" my-i18n="contacts_modal_new_contact"></button>
</div>
</div>
</div>

8
app/partials/country_select_modal.html

@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
<div class="modal-body">
<h4 class="modal_simple_header">Country</h4>
<h4 class="modal_simple_header" my-i18n="country_select_modal_title"></h4>
<div class="countries_modal_search">
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="countries_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="$dismiss()">Done</button>
<button type="button" class="btn btn-primary" ng-click="$dismiss()" my-i18n="modal_done"></button>
</div>
</div>
</div>

41
app/partials/dialog.html

@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
<div ng-switch="dialogMessage.deleted">
<div ng-switch-when="true" class="im_dialog_message">
<span class="im_dialog_message_text">deleted message</span>
<span class="im_dialog_message_text" my-i18n="conversation_message_deleted"></span>
</div>
<div ng-switch-default class="im_dialog_message">
<span class="im_dialog_chat_from_wrap">
@ -44,39 +44,36 @@ @@ -44,39 +44,36 @@
></span><span
class="im_dialog_chat_from"
ng-if="dialogMessage.out"
>You</span>{{((dialogMessage.out || dialogMessage.peerID &lt; 0) &amp;&amp; (dialogMessage.message.length || dialogMessage.media &amp;&amp; dialogMessage.media._ != 'messageMediaEmpty')) ? ':' : ''}}
my-i18n="conversation_you"
></span>{{((dialogMessage.out || dialogMessage.peerID &lt; 0) &amp;&amp; (dialogMessage.message.length || dialogMessage.media &amp;&amp; dialogMessage.media._ != 'messageMediaEmpty')) ? ':' : ''}}
</span>
<span class="im_dialog_message_media" ng-if="dialogMessage.media &amp;&amp; dialogMessage.media._ != 'messageMediaEmpty'" ng-switch="dialogMessage.media._">
<span ng-switch-when="messageMediaPhoto">Photo</span>
<span ng-switch-when="messageMediaVideo">Video</span>
<span ng-switch-when="messageMediaDocument">Document</span>
<span ng-switch-when="messageMediaAudio">Audio</span>
<span ng-switch-when="messageMediaGeo">Location</span>
<span ng-switch-when="messageMediaContact">Contact</span>
<span ng-switch-when="messageMediaPhoto" my-i18n="conversation_media_photo"></span>
<span ng-switch-when="messageMediaVideo" my-i18n="conversation_media_video"></span>
<span ng-switch-when="messageMediaDocument" my-i18n="conversation_media_document"></span>
<span ng-switch-when="messageMediaAudio" my-i18n="conversation_media_audio"></span>
<span ng-switch-when="messageMediaGeo" my-i18n="conversation_media_location"></span>
<span ng-switch-when="messageMediaContact" my-i18n="conversation_media_contact"></span>
</span>
<span class="im_dialog_message_service" ng-if="dialogMessage._ == 'messageService'" ng-switch="dialogMessage.action._">
<span ng-switch-when="messageActionChatCreate">created the group</span>
<span ng-switch-when="messageActionChatEditTitle">changed group name</span>
<span ng-switch-when="messageActionChatEditPhoto">changed group photo</span>
<span ng-switch-when="messageActionChatDeletePhoto">removed group photo</span>
<span ng-switch-when="messageActionChatCreate" my-i18n="conversation_group_created"></span>
<span ng-switch-when="messageActionChatEditTitle" my-i18n="conversation_group_renamed"></span>
<span ng-switch-when="messageActionChatEditPhoto" my-i18n="conversation_group_photo_updated"></span>
<span ng-switch-when="messageActionChatDeletePhoto" my-i18n="conversation_group_photo_removed"></span>
<span ng-switch-when="messageActionChatAddUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true">
returned to group
</span>
<span ng-switch-default>
invited <span ng-bind-html="dialogMessage.action.user.rFullName"></span>
<span ng-switch-when="true" my-i18n="conversation_returned_to_group"></span>
<span ng-switch-default my-i18n="conversation_invited_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param>
</span>
</span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true">
left group
</span>
<span ng-switch-default>
kicked <span ng-bind-html="dialogMessage.action.user.rFullName"></span>
<span ng-switch-when="true" my-i18n="conversation_left_group"></span>
<span ng-switch-default my-i18n="conversation_kicked_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param>
</span>
</span>
</span>

12
app/partials/edit_contact_modal.html

@ -6,16 +6,16 @@ @@ -6,16 +6,16 @@
<form class="modal_simple_form" ng-submit="doImport()">
<h4>Edit contact</h4>
<h4 my-i18n="contact_edit_modal_title"></h4>
<div class="form-group">
<span class="form-control uneditable-input input-sm disabled" disabled ng-bind="importContact.phone | phoneNumber"></span>
</div>
<div class="form-group">
<input class="form-control input-sm" my-focused type="text" placeholder="First name" ng-model="importContact.first_name"/>
<input class="form-control input-sm" my-focused type="text" placeholder="{{'contact_edit_modal_first_name' | i18n}}" ng-model="importContact.first_name"/>
</div>
<div class="form-group">
<input class="form-control input-sm" type="text" placeholder="Last name" ng-model="importContact.last_name"/>
<input class="form-control input-sm" type="text" placeholder="{{'contact_edit_modal_last_name' | i18n}}" ng-model="importContact.last_name"/>
</div>
</form>
@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
</div>
<div class="modal-footer">
<a class="btn btn-link" ng-click="$dismiss()">Cancel</a>
<button class="btn btn-primary" ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'Saving...' : 'Save'" ng-disabled="progress.enabled"></button>
<a class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel"></a>
<button class="btn btn-primary" ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'contact_edit_modal_submit_active' : 'contact_edit_modal_submit'| i18n" ng-disabled="progress.enabled"></button>
</div>
</div>
</div>

90
app/partials/error_modal.html

@ -5,68 +5,44 @@ @@ -5,68 +5,44 @@
<div class="modal-body">
<h4 ng-if="error" class="modal_simple_header" ng-switch="error.type">
<span ng-switch-when="ACCOUNT_REQUIRED">No account</span>
<span ng-switch-default ng-switch="error.code">
<span ng-switch-when="400">Error</span>
<span ng-switch-when="401">Unauthorized</span>
<span ng-switch-when="403">Access denied</span>
<span ng-switch-when="404">Not found</span>
<span ng-switch-when="406">Network error</span>
<span ng-switch-when="420">Too fast</span>
<span ng-switch-default>Server error</span>
<span ng-switch-when="400" my-i18n="error_modal_bad_request_title"></span>
<span ng-switch-when="401" my-i18n="error_modal_unauthorized_title"></span>
<span ng-switch-when="403" my-i18n="error_modal_forbidden_title"></span>
<span ng-switch-when="404" my-i18n="error_modal_not_found_title"></span>
<span ng-switch-when="406" my-i18n="error_modal_network_title"></span>
<span ng-switch-when="420" my-i18n="error_modal_flood_title"></span>
<span ng-switch-default my-i18n="error_modal_internal_title"></span>
</span>
</h4>
<h4 ng-if="!error" class="modal_simple_header" ng-bind="title || 'Alert'"></h4>
<h4 ng-if="!error" class="modal_simple_header" ng-switch="title.length > 0">
<span ng-switch-when="true" ng-bind="title"></span>
<span ng-switch-default my-i18n="error_modal_alert"></span>
</h4>
<div ng-if="error" class="error_modal_description" ng-switch="error.type">
<span ng-switch-when="NETWORK_BAD_REQUEST">
Please check your internet connection.
</span>
<span ng-switch-when="NETWORK_BAD_RESPONSE">
Please check your internet connection.
</span>
<span ng-switch-when="FIRSTNAME_INVALID">
The first name you entered is invalid.
</span>
<span ng-switch-when="LASTNAME_INVALID">
The last name you entered is invalid.
</span>
<span ng-switch-when="PHONE_NUMBER_INVALID">
The phone number you entered is invalid.
</span>
<span ng-switch-when="USERS_TOO_MUCH">
You have selected too much users.
</span>
<span ng-switch-when="PHOTO_INVALID_DIMENSIONS">
The photo dimensions are invalid, please select another file.
</span>
<span ng-switch-when="VIDEO_EXT_INVALID">
The video file extension is invalid or unsupported, please select another file.
</span>
<span ng-switch-when="PHOTO_CROP_SIZE_SMALL">
The photo you provided is too small.
</span>
<span ng-switch-when="ACCOUNT_REQUIRED">
Sorry, there is no <strong>Telegram</strong> account for {{phone | phoneNumber}}<br/><br/>
Please <strong>sign up</strong> using our mobile apps for <a href="https://telegram.org/" target="_blank">iOS</a> or <a href="https://telegram.org/" target="_blank">Android</a>.
</span>
<span ng-switch-when="USER_NOT_USING_TELEGRAM">
Sorry, there is no <strong>Telegram</strong> account with the phone number you provided.
</span>
<span ng-switch-when="USERS_NOT_USING_TELEGRAM">
Sorry, there are no <strong>Telegram</strong> accounts with the phone numbers you provided.
</span>
<span ng-switch-when="PHONEBOOK_GET_CONTACTS_FAILED">
Telegram needs access to phonebook to import contacts.
</span>
<span ng-switch-when="NETWORK_BAD_REQUEST" my-i18n="error_modal_network_description"></span>
<span ng-switch-when="NETWORK_BAD_RESPONSE" my-i18n="error_modal_network_description"></span>
<span ng-switch-when="FIRSTNAME_INVALID" my-i18n="error_modal_firstname_invali_description"></span>
<span ng-switch-when="LASTNAME_INVALID" my-i18n="error_modal_lastname_invalid_description"></span>
<span ng-switch-when="PHONE_NUMBER_INVALID" my-i18n="error_modal_phone_invalid_description"></span>
<span ng-switch-when="USERS_TOO_MUCH" my-i18n="error_modal_users_too_much_description"></span>
<span ng-switch-when="PHOTO_INVALID_DIMENSIONS" my-i18n="error_modal_photo_dimensions_invalid_description"></span>
<span ng-switch-when="VIDEO_EXT_INVALID" my-i18n="error_modal_video_file_invalid_description"></span>
<span ng-switch-when="PHOTO_CROP_SIZE_SMALL" my-i18n="error_modal_photo_too_small_description"></span>
<span ng-switch-when="USER_NOT_USING_TELEGRAM" my-i18n="error_modal_no_phone_user_description_md"></span>
<span ng-switch-when="USERS_NOT_USING_TELEGRAM" my-i18n="error_modal_no_phone_users_description_md"></span>
<span ng-switch-when="PHONEBOOK_GET_CONTACTS_FAILED" my-i18n="error_modal_phonebook_required_description"></span>
<div ng-switch-default ng-switch="error.code">
<span ng-switch-when="400">One of the params is missing or invalid.</span>
<span ng-switch-when="401">This action requires authorization access. Please <a href="#/login">log in</a>.</span>
<span ng-switch-when="403">You are not allowed for this action.</span>
<span ng-switch-when="404">The page was not found.</span>
<span ng-switch-when="420">You are performing too many actions. Please try again later.</span>
<span ng-switch-default>Internal server error occured. Please try again later.</span>
<span ng-switch-when="400" my-i18n="error_modal_bad_request_description"></span>
<span ng-switch-when="401" my-i18n="error_modal_unauthorized_description">
<my-i18n-param name="login-link"><a href="#/login">{0}</a></my-i18n-param>
</span>
<span ng-switch-when="403" my-i18n="error_modal_forbidden_description"></span>
<span ng-switch-when="404" my-i18n="error_modal_not_found_description"></span>
<span ng-switch-when="420" my-i18n="error_modal_flood_description"></span>
<span ng-switch-default my-i18n="error_modal_internal_description"></span>
</div>
</div>
@ -76,7 +52,7 @@ @@ -76,7 +52,7 @@
Result: {{error.originalError ? error.originalError : (error.stack ? (error.name || '') + ' ' + (error.description || error.message) : error)}}
Stack: {{error.stack}}</textarea>
<div ng-switch-default>
<a href="" ng-click="error.detailsShown = true">Technical details here</a>
<a href="" ng-click="error.detailsShown = true" my-i18n="error_modal_tech_details"></a>
</div>
</div>
@ -84,4 +60,4 @@ Stack: {{error.stack}}</textarea> @@ -84,4 +60,4 @@ Stack: {{error.stack}}</textarea>
</div>
</div>
</div>

16
app/partials/import_contact_modal.html

@ -6,16 +6,16 @@ @@ -6,16 +6,16 @@
<form class="modal_simple_form" ng-submit="doImport()">
<h4>Add new contact</h4>
<h4 my-i18n="contact_import_modal_title"></h4>
<div class="form-group">
<input class="form-control input-sm" my-focused type="text" placeholder="Phone number" ng-model="importContact.phone"/>
<input class="form-control input-sm" my-focused type="text" placeholder="{{'contact_import_modal_phone' | i18n}}" ng-model="importContact.phone"/>
</div>
<div class="form-group">
<input class="form-control input-sm" type="text" placeholder="First name" ng-model="importContact.first_name"/>
<input class="form-control input-sm" type="text" placeholder="{{'contact_edit_modal_first_name' | i18n}}" ng-model="importContact.first_name"/>
</div>
<div class="form-group">
<input class="form-control input-sm" type="text" placeholder="Last name" ng-model="importContact.last_name"/>
<input class="form-control input-sm" type="text" placeholder="{{'contact_edit_modal_last_name' | i18n}}" ng-model="importContact.last_name"/>
</div>
</form>
@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
</div>
<div class="modal-footer">
<a class="btn btn-link pull-left" ng-if="phonebookAvailable" ng-click="importPhonebook()">Phonebook</a>
<a class="btn btn-link" ng-click="$dismiss()">Cancel</a>
<button class="btn btn-primary" ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'Importing...' : 'Save'" ng-disabled="progress.enabled"></button>
<a class="btn btn-link pull-left" ng-if="phonebookAvailable" ng-click="importPhonebook()" my-i18n="contact_import_modal_phonebook"></a>
<a class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel"></a>
<button class="btn btn-primary" ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? 'contact_import_modal_submit_active' : 'contact_import_modal_submit' | i18n" ng-disabled="progress.enabled"></button>
</div>
</div>
</div>

35
app/partials/mobile/chat_modal.html

@ -12,16 +12,16 @@ @@ -12,16 +12,16 @@
</a>
<ul class="dropdown-menu">
<li ng-if="chatFull.thumb.location">
<a ng-click="deletePhoto()">Delete photo</a>
<a ng-click="deletePhoto()" my-i18n="group_modal_menu_delete_photo"></a>
</li>
<li>
<a ng-click="editTitle()">Edit group</a>
<a ng-click="editTitle()" my-i18n="group_modal_menu_edit_group"></a>
</li>
<li>
<a ng-click="leaveGroup()">Leave group</a>
<a ng-click="leaveGroup()" my-i18n="group_modal_menu_leave_group"></a>
</li>
<li>
<a ng-click="flushHistory()">Delete chat</a>
<a ng-click="flushHistory()" my-i18n="group_modal_menu_delete_chat"></a>
</li>
</ul>
</div>
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
<a ng-click="$close()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>Group info</h4>
<h4 my-i18n="group_modal_info"></h4>
</div>
</a>
</li>
@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
<h4 class="mobile_user_modal_header" ng-bind-html="chatFull.chat.rTitle"></h4>
<p class="mobile_user_modal_status" ng-if="chatFull.chat.participants_count > 0">
<ng-pluralize count="chatFull.chat.participants_count"
when="{'0': 'No members', 'one': '1 member', 'other': '{} members'}">
when="group_modal_pluralize_participants">
</ng-pluralize>
</p>
</div>
@ -68,41 +68,42 @@ @@ -68,41 +68,42 @@
</div>
<div class="mobile_modal_action_wrap" ng-if="!chatFull.chat.left &amp;&amp; chatFull.participants.participants.length">
<a class="mobile_modal_action" ng-click="inviteToGroup()">Add member</a>
<a class="mobile_modal_action" ng-click="inviteToGroup()" my-i18n="group_modal_add_member"></a>
</div>
<div class="mobile_modal_action_wrap" ng-if="chatFull.chat._ != 'chatForbidden' &amp;&amp; chatFull.chat.left">
<a class="mobile_modal_action" ng-click="returnToGroup()">Return to group</a>
<a class="mobile_modal_action" ng-click="returnToGroup()" my-i18n="group_modal_return"></a>
</div>
<div class="mobile_modal_action_wrap" ng-if="chatFull.chat._ == 'chatForbidden'">
<a class="mobile_modal_action" ng-click="flushHistory()">Return to group</a>
<a class="mobile_modal_action" ng-click="flushHistory()" my-i18n="group_modal_return"></a>
</div>
<div class="mobile_modal_action_wrap" ng-if="chatFull.chat._ != 'chatForbidden' &amp;&amp; !chatFull.chat.left &amp;&amp; !photo.updating">
<span class="mobile_modal_action mobile_modal_upload_action">
<input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />
Update photo
<my-i18n="group_modal_update_photo"></my-i18n>
</span>
</div>
<div class="mobile_modal_action_wrap" ng-if="photo.updating">
<span class="mobile_modal_action">
Updating<span my-loading-dots></span>
<span class="mobile_modal_action" my-i18n>
<my-i18n="group_modal_update_active"></my-i18n>
<span my-loading-dots></span>
</span>
</div>
<div class="mobile_modal_action_wrap">
<a class="mobile_modal_action tg_checkbox clearfix" ng-click="settings.notifications = !settings.notifications" ng-class="settings.notifications ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Notifications</span>
<span class="tg_checkbox_label" my-i18n="group_modal_notifications"></span>
</a>
</div>
<div class="mobile_modal_section">
<h4 class="mobile_modal_section_header">Members</h4>
<h4 class="mobile_modal_section_header" my-i18n="group_modal_members"></h4>
<div class="mobile_modal_section_body">
<div class="chat_modal_members_list">
<div class="chat_modal_participant_wrap clearfix" ng-repeat="participant in chatFull.participants.participants | orderBy:'-user.sortStatus'">
<a ng-if="participant.canKick" ng-click="kickFromGroup(participant.user_id)" class="chat_modal_participant_kick pull-right">Kick</a>
<a ng-if="participant.canKick" ng-click="kickFromGroup(participant.user_id)" class="chat_modal_participant_kick pull-right" my-i18n="group_modal_members_kick"></a>
<a class="chat_modal_participant_photo pull-left" my-user-photolink="participant.user_id" img-class="chat_modal_participant_photo" status="true"></a>
@ -114,9 +115,7 @@ @@ -114,9 +115,7 @@
</div>
<div class="chat_modal_members_forbidden" ng-if="chatFull.chat._ == 'chatForbidden' || chatFull.chat.left">
Group members list is unavailable.
</div>
<div class="chat_modal_members_forbidden" ng-if="chatFull.chat._ == 'chatForbidden' || chatFull.chat.left" my-i18n="group_modal_members_unavailable"></div>
</div>
</div>

35
app/partials/mobile/contacts_modal.html

@ -8,12 +8,8 @@ @@ -8,12 +8,8 @@
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right" ng-if="!action || action == 'edit'" ng-switch="action">
<a ng-switch-when="edit" ng-click="toggleEdit(false)">
Cancel
</a>
<a ng-switch-default ng-click="toggleEdit(true)">
Edit
</a>
<a ng-switch-when="edit" class="contacts_modal_edit_link" ng-click="toggleEdit(false)" my-i18n="contacts_modal_edit_cancel"></a>
<a ng-switch-default class="contacts_modal_edit_link" ng-click="toggleEdit(true)" my-i18n="contacts_modal_edit_list"></a>
</li>
<li>
<a ng-click="$dismiss()" class="navbar-quick-media-back">
@ -22,12 +18,12 @@ @@ -22,12 +18,12 @@
<h4 ng-switch="action">
<div ng-switch-when="new_group" ng-switch="selectedCount > 0">
<span ng-switch-when="true">
<ng-pluralize count="selectedCount" when="{'one': '1 participant', 'other': '{} participants'}">
<ng-pluralize count="selectedCount" when="contacts_modal_pluralize_new_group_members">
</ng-pluralize>
</span>
<span ng-switch-default>New Group</span>
<span ng-switch-default my-i18n="group_create_contacts_modal_title"></span>
</div>
<span ng-switch-default>Contacts</span>
<span ng-switch-default my-i18n="contacts_modal_title"></span>
</h4>
</div>
</a>
@ -43,7 +39,7 @@ @@ -43,7 +39,7 @@
<div class="modal-body mobile_modal_body">
<div class="contacts_modal_search">
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="contacts_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>
@ -77,18 +73,13 @@ @@ -77,18 +73,13 @@
</div>
<div class="modal-footer contacts_modal_panel" ng-switch="action">
<button ng-switch-when="new_group" class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit">
Next
</button>
<button ng-switch-when="select" class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit">
Next
</button>
<button ng-switch-when="edit" class="btn btn-danger" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="deleteSelected()">
Delete <strong ng-bind="selectedCount"></strong>
</button>
<button ng-switch-default class="btn btn-link" ng-click="importContact()">
New contact
<button ng-switch-when="new_group" class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit" my-i18n="modal_next"></button>
<button ng-switch-when="select" class="btn btn-primary" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit" my-i18n="modal_next"></button>
<button ng-switch-when="edit" class="btn btn-danger" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="deleteSelected()" my-i18n>
<my-i18n msgid="contacts_modal_edit_delete"></my-i18n>
<strong ng-bind="selectedCount"></strong>
</button>
<button ng-switch-default class="btn btn-link" ng-click="importContact()" my-i18n="contacts_modal_new_contact"></button>
</div>
</div>
</div>

6
app/partials/mobile/country_select_modal.html

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>Country</h4>
<h4 class="modal_simple_header" my-i18n="country_select_modal_title"></h4>
</div>
</a>
</li>
@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
<div class="modal-body mobile_modal_body">
<div class="countries_modal_search">
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="countries_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>
@ -53,4 +53,4 @@ @@ -53,4 +53,4 @@
</div>
</div>
</div>

8
app/partials/mobile/peer_select.html

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>Select conversation</h4>
<h4 my-i18n="conversation_select_modal_title"></h4>
</div>
</a>
</li>
@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
<div class="im_dialogs_modal_col_wrap" ng-controller="AppImDialogsController" my-dialogs>
<div class="im_dialogs_panel">
<div class="im_dialogs_search">
<input my-focused class="form-control im_dialogs_search_field" type="search" placeholder="Search" ng-model="search.query"/>
<input my-focused class="form-control im_dialogs_search_field" type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="im_dialogs_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>
</div>
@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
<li class="im_dialog_wrap" my-dialog dialog-message="dialogMessage" ng-repeat="dialogMessage in dialogs track by dialogMessage.peerID"></li>
</ul>
<div class="im_dialogs_contacts_wrap" ng-show="contacts.length > 0">
<h5>Contacts</h5>
<h5 my-i18n="conversation_select_modal_contacts"></h5>
<ul class="nav nav-pills nav-stacked">
<li class="im_dialog_wrap" ng-repeat="contact in contacts | orderBy:'user.sortName' track by contact.userID" ng-class="{active: curDialog.peerID == contact.userID}">
<a class="im_dialog" ng-click="dialogSelect(contact.peerString)">
@ -73,4 +73,4 @@ @@ -73,4 +73,4 @@
</div>
</div>
</div>

21
app/partials/mobile/phonebook_modal.html

@ -9,15 +9,15 @@ @@ -9,15 +9,15 @@
<ul class="nav navbar-nav navbar-quick-nav">
<li class="navbar-quick-right">
<a ng-click="toggleSelection()" ng-switch="selectedCount > 0">
<span ng-switch-when="true">Deselect all</span>
<span ng-switch-default>Select all</span>
<span ng-switch-when="true" my-i18n="phonebook_modal_deselect_all"></span>
<span ng-switch-default my-i18n="phonebook_modal_select_all"></span>
</a>
</li>
<li>
<a ng-click="$dismiss()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>Phonebook</h4>
<h4 my-i18n="phonebook_modal_title"></h4>
</div>
</a>
</li>
@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
<div class="modal-body mobile_modal_body">
<div class="contacts_modal_search">
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="contacts_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>
@ -42,9 +42,7 @@ @@ -42,9 +42,7 @@
<div class="contacts_wrap nano" my-infinite-scroller>
<div class="contacts_scrollable_wrap nano-content" ng-switch="contactsEmpty">
<div ng-switch-when="true" class="contacts_modal_contacts_empty" my-vertical-position="0.2" padding="true">
Your phonebook is empty.
</div>
<div ng-switch-when="true" class="contacts_modal_contacts_empty" my-vertical-position="0.2" padding="true" my-i18n="phonebook_modal_empty"></div>
<ul ng-switch-default class="contacts_modal_members_list nav nav-pills nav-stacked">
@ -82,9 +80,12 @@ @@ -82,9 +80,12 @@
<div class="modal-footer contacts_modal_panel" ng-show="multiSelect">
<button class="btn btn-primary" ng-class="{disabled: !selectedCount || progress.enabled}" ng-disabled="!selectedCount || progress.enabled" ng-click="submitSelected()" type="submit" ng-switch="progress.enabled">
<span ng-switch-when="true">Importing<span my-loading-dots></span></span>
<span ng-switch-default>Import contacts</span>
<span ng-switch-when="true">
<my-i18n msgid="phonebook_modal_submit_active"></my-i18n>
<span my-loading-dots></span>
</span>
<span ng-switch-default my-i18n="phonebook_modal_submit"></span>
</button>
</div>
</div>
</div>

35
app/partials/mobile/settings_modal.html

@ -12,13 +12,13 @@ @@ -12,13 +12,13 @@
</a>
<ul class="dropdown-menu">
<li ng-if="photo.location">
<a ng-click="deletePhoto()">Delete profile photo</a>
<a ng-click="deletePhoto()" my-i18n="settings_modal_delete_photo"></a>
</li>
<li>
<a ng-click="editProfile()">Edit profile</a>
<a ng-click="editProfile()" my-i18n="settings_modal_edit_profile"></a>
</li>
<li>
<a ng-click="terminateSessions()">Terminate all sessions</a>
<a ng-click="terminateSessions()" my-i18n="settings_modal_terminate_sessions"></a>
</li>
</ul>
</div>
@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
<a ng-click="$close()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>Settings</h4>
<h4 my-i18n="settings_modal_title"></h4>
</div>
</a>
</li>
@ -63,57 +63,60 @@ @@ -63,57 +63,60 @@
</div>
<div class="mobile_modal_action_wrap" ng-switch="photo.updating">
<span ng-switch-when="true" class="mobile_modal_action">
Updating<span my-loading-dots></span>
<span ng-switch-when="true" class="mobile_modal_action" my-i18n>
<my-i18n msgid="settings_modal_photo_updating"></my-i18n>
<span my-loading-dots></span>
</span>
<span ng-switch-default class="mobile_modal_action mobile_modal_upload_action">
<input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />
Set profile photo
<my-i18n msgid="settings_modal_set_photo"></my-i18n>
</span>
</div>
<div class="mobile_modal_action_wrap">
<a class="mobile_modal_action tg_checkbox clearfix" ng-click="toggleDesktop()" ng-class="notify.desktop ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Notification alerts</span>
<span class="tg_checkbox_label" my-i18n="settings_modal_notification_alert"></span>
</a>
</div>
<div class="mobile_modal_action_wrap" ng-if="!notify.desktop &amp;&amp; notify.canVibrate">
<a class="mobile_modal_action tg_checkbox clearfix" ng-click="toggleVibrate()" ng-class="notify.vibrate ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Vibrate</span>
<span class="tg_checkbox_label" my-i18n="settings_modal_vibrate"></span>
</a>
</div>
<div class="mobile_modal_action_wrap">
<a class="mobile_modal_action tg_checkbox clearfix" ng-click="toggleSound()" ng-class="notify.volume ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Sounds</span>
<span class="tg_checkbox_label" my-i18n="settings_modal_sounds"></span>
</a>
</div>
<div class="mobile_modal_action_wrap">
<a class="mobile_modal_action tg_checkbox clearfix" ng-click="toggleCtrlEnter(send.enter == 1 ? 0 : 1)" ng-class="send.enter == 1 ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Send on Enter</span>
<span class="tg_checkbox_label" my-i18n="settings_modal_send_on_enter"></span>
</a>
</div>
<div class="mobile_modal_section" ng-if="profile.phone">
<h4 class="mobile_modal_section_header">Phone</h4>
<h4 class="mobile_modal_section_header" my-i18n="settings_modal_phone"></h4>
<div class="mobile_modal_section_value" ng-bind="profile.phone | phoneNumber"></div>
</div>
<div class="mobile_modal_section">
<h4 class="mobile_modal_section_header">About</h4>
<h4 class="mobile_modal_section_header" my-i18n="settings_modal_about"></h4>
<div class="mobile_modal_section_body settings_about_section_body clearfix">
<div class="settings_external_services pull-right">
<a href="https://github.com/zhukov/webogram" target="_blank" title="Source code on GitHub" class="settings_external_service"><i class="icon icon-github"></i></a>
<a href="https://twitter.com/telegram_web" target="_blank" title="Follow us on Twitter!" class="settings_external_service"><i class="icon icon-twitter"></i></a>
<a href="https://github.com/zhukov/webogram" target="_blank" title="{{'settings_modal_source_code_github' | i18n}}" class="settings_external_service"><i class="icon icon-github"></i></a>
<a href="https://twitter.com/telegram_web" target="_blank" title="{{'settings_modal_follow_us_twitter' | i18n}}" class="settings_external_service"><i class="icon icon-twitter"></i></a>
</div>
<p>
<a ng-click="openChangelog()">Recent updates (ver. <span ng-bind="version"></span>)</a>
<a ng-click="openChangelog()" my-i18n="settings_modal_recent_updates">
<my-i18n-param name="version" ng-bind="version"></my-i18n-param>
</a>
</p>
</div>
</div>

20
app/partials/mobile/user_modal.html

@ -12,16 +12,16 @@ @@ -12,16 +12,16 @@
</a>
<ul class="dropdown-menu">
<li ng-if="user._ == 'userContact'">
<a ng-click="importContact(true)">Edit contact</a>
<a ng-click="importContact(true)" my-i18n="user_modal_edit_contact"></a>
</li>
<li ng-if="user._ == 'userContact'">
<a ng-click="deleteContact()">Delete contact</a>
<a ng-click="deleteContact()" my-i18n="user_modal_delete_contact"></a>
</li>
<li ng-if="user.phone.length > 0 &amp;&amp; user._ != 'userContact'">
<a ng-click="importContact()">Add to contacts</a>
<a ng-click="importContact()" my-i18n="user_modal_add_contact"></a>
</li>
<li>
<a ng-click="flushHistory()">Delete chat</a>
<a ng-click="flushHistory()" my-i18n="user_modal_delete_chat"></a>
</li>
</ul>
</div>
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
<a ng-click="$close()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4>Contact info</h4>
<h4 my-i18n="user_modal_contact_info"></h4>
</div>
</a>
</li>
@ -65,25 +65,25 @@ @@ -65,25 +65,25 @@
</div>
<div class="mobile_modal_action_wrap">
<a class="mobile_modal_action" ng-click="goToHistory()">Send message</a>
<a class="mobile_modal_action" ng-click="goToHistory()" my-i18n="user_modal_send_message"></a>
</div>
<div ng-if="user.phone.length > 0" class="mobile_modal_action_wrap">
<a class="mobile_modal_action" ng-click="shareContact()">Share contact</a>
<a class="mobile_modal_action" ng-click="shareContact()" my-i18n="user_modal_share_contact"></a>
</div>
<div class="mobile_modal_action_wrap">
<a class="mobile_modal_action tg_checkbox clearfix" ng-click="settings.notifications = !settings.notifications" ng-class="settings.notifications ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Notifications</span>
<span class="tg_checkbox_label" my-i18n="user_modal_notifications"></span>
</a>
</div>
<div class="mobile_modal_section">
<h4 class="mobile_modal_section_header">Phone</h4>
<h4 class="mobile_modal_section_header" my-i18n="user_modal_phone"></h4>
<div class="mobile_modal_section_value" ng-bind="user.phone | phoneNumber"></div>
</div>
</div>
</div>
</div>

8
app/partials/peer_select.html

@ -4,12 +4,10 @@ @@ -4,12 +4,10 @@
<div class="modal-body">
<h4 class="modal_simple_header visible-xs">Contacts</h4>
<div class="im_dialogs_modal_col_wrap" ng-controller="AppImDialogsController" my-dialogs>
<div class="im_dialogs_panel">
<div class="im_dialogs_search">
<input my-focused class="form-control im_dialogs_search_field no_outline" type="search" placeholder="Search" ng-model="search.query"/>
<input my-focused class="form-control im_dialogs_search_field no_outline" type="search" placeholder="{{'modal_search' | i18n}}" ng-model="search.query"/>
<a class="im_dialogs_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>
</div>
@ -20,7 +18,7 @@ @@ -20,7 +18,7 @@
<li class="im_dialog_wrap" my-dialog dialog-message="dialogMessage" ng-repeat="dialogMessage in dialogs track by dialogMessage.peerID"></li>
</ul>
<div class="im_dialogs_contacts_wrap" ng-show="contacts.length > 0">
<h5>Contacts</h5>
<h5 my-i18n="conversation_select_modal_contacts"></h5>
<ul class="nav nav-pills nav-stacked">
<li class="im_dialog_wrap" ng-repeat="contact in contacts | orderBy:'user.sortName' track by contact.userID" ng-class="{active: curDialog.peerID == contact.userID}">
<a class="im_dialog" ng-click="dialogSelect(contact.peerString)">
@ -50,4 +48,4 @@ @@ -50,4 +48,4 @@
</div>
</div>
</div>

8
app/partials/photo_modal.html

@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
<div class="media_meta_wrap clearfix">
<div class="media_modal_actions pull-right">
<a href="" class="media_modal_action_link" ng-click="download()">Download</a>
<a href="" class="media_modal_action_link" ng-if="canForward" ng-click="forward()">Forward</a>
<a href="" class="media_modal_action_link" ng-if="canDelete" ng-click="delete()">Delete</a>
<a href="" class="media_modal_action_link" ng-click="download()" my-i18n="media_modal_download"></a>
<a href="" class="media_modal_action_link" ng-if="canForward" ng-click="forward()" my-i18n="media_modal_forward"></a>
<a href="" class="media_modal_action_link" ng-if="canDelete" ng-click="delete()" my-i18n="media_modal_delete"></a>
</div>
<p class="media_modal_info">
@ -19,4 +19,4 @@ @@ -19,4 +19,4 @@
</div>
</div>
</div>

12
app/partials/profile_edit_modal.html

@ -6,13 +6,13 @@ @@ -6,13 +6,13 @@
<form class="modal_simple_form" ng-submit="updateProfile()">
<h4>Edit Profile</h4>
<h4 my-i18n="profile_edit_modal_title"></h4>
<div class="form-group import_modal_field_wrap" ng-class="{'has-error': error.field == 'first_name'}">
<input class="form-control input-sm" my-focused type="text" placeholder="First name" ng-model="profile.first_name" name="first_name"/>
<input class="form-control input-sm" my-focused type="text" placeholder="{{'profile_edit_first_name' | i18n}}" ng-model="profile.first_name" name="first_name"/>
</div>
<div class="form-group import_modal_field_wrap" ng-class="{'has-error': error.field == 'last_name'}">
<input class="form-control input-sm" type="text" placeholder="Last name" ng-model="profile.last_name"/>
<input class="form-control input-sm" type="text" placeholder="{{'profile_edit_last_name' | i18n}}" ng-model="profile.last_name"/>
</div>
</form>
@ -20,8 +20,8 @@ @@ -20,8 +20,8 @@
</div>
<div class="modal-footer">
<a class="btn btn-link" ng-click="$dismiss()">Cancel</a>
<button class="btn btn-primary" ng-class="{disabled: profile.updating}" ng-click="updateProfile()" ng-bind="profile.updating ? 'Saving...' : 'Save'" ng-disabled="profile.updating"></button>
<a class="btn btn-link" ng-click="$dismiss()" my-i18n="modal_cancel"></a>
<button class="btn btn-primary" ng-class="{disabled: profile.updating}" ng-click="updateProfile()" ng-bind="profile.updating ? 'profile_edit_submit_active' : 'profile_edit_submit' | i18n" ng-disabled="profile.updating"></button>
</div>
</div>
</div>

46
app/partials/settings_modal.html

@ -22,23 +22,27 @@ @@ -22,23 +22,27 @@
<div class="user_modal_actions_wrap clearfix">
<span class="btn btn-primary user_modal_main_btn" ng-if="!photo.updating">
<input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />
Set profile photo
<my-i18n msgid="settings_modal_set_photo"></my-i18n>
</span>
<span class="btn btn-primary user_modal_main_btn disabled" disabled ng-if="photo.updating">
Updating<span my-loading-dots></span>
<my-i18n msgid="settings_modal_photo_updating"></my-i18n>
<span my-loading-dots></span>
</span>
<div class="dropdown user_modal_other_btn">
<button class="btn btn-link dropdown-toggle">More<i class="icon icon-caret"></i></button>
<button class="btn btn-link dropdown-toggle">
<my-i18n msgid="settings_modal_menu_more"></my-i18n>
<i class="icon icon-caret"></i>
</button>
<ul class="dropdown-menu">
<li ng-if="photo.location">
<a ng-click="deletePhoto()">Delete profile photo</a>
<a ng-click="deletePhoto()" my-i18n="settings_modal_delete_photo"></a>
</li>
<li>
<a ng-click="editProfile()">Edit profile</a>
<a ng-click="editProfile()" my-i18n="settings_modal_edit_profile"></a>
</li>
<li>
<a ng-click="terminateSessions()">Terminate all sessions</a>
<a ng-click="terminateSessions()" my-i18n="settings_modal_terminate_sessions"></a>
</li>
</ul>
</div>
@ -49,30 +53,30 @@ @@ -49,30 +53,30 @@
</div>
<div class="modal_section" ng-if="profile.phone">
<h3 class="modal_section_header">Phone</h3>
<h3 class="modal_section_header" my-i18n="settings_modal_phone"></h3>
<div class="modal_section_body">
<p><span ng-bind="profile.phone | phoneNumber"></span></p>
</div>
</div>
<div class="modal_section">
<h3 class="modal_section_header">Settings</h3>
<h3 class="modal_section_header" my-i18n="settings_modal_settings"></h3>
<div class="modal_section_body">
<div class="tg_form_group">
<label>Language</label>
<label my-i18n="settings_modal_language"></label>
<select class="tg_select" ng-model="i18n.locale">
<option value="{{lang}}" ng-selected="lang == i18n.locale" ng-repeat="(lang, name) in i18n.supported">{{name}}</option>
<option value="{{lang}}" ng-selected="lang == i18n.locale" ng-repeat="(lang, name) in i18n.supported" ng-bind="name"></option>
</select>
<a class="tg_checkbox" ng-click="toggleDesktop()" ng-class="notify.desktop ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Desktop notifications</span>
<span class="tg_checkbox_label" my-i18n="settings_modal_notifications"></span>
</a>
<a class="tg_checkbox" ng-click="toggleSound()" ng-class="notify.volume ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Sound</span>
<span class="tg_checkbox_label" my-i18n="settings_modal_sound"></span>
</a>
<div class="tg_range_wrap" ng-show="notify.volume > 0">
@ -89,16 +93,12 @@ @@ -89,16 +93,12 @@
<div class="tg_form_group">
<a class="tg_radio" ng-click="toggleCtrlEnter(1)" ng-class="send.enter == 1 ? 'tg_radio_on' : ''">
<i class="icon icon-radio"></i>
<span>
<strong>Enter</strong> - send message, <strong>Shift + Enter</strong> - new line
</span>
<span my-i18n="settings_modal_enter_send_description_md"></span>
</a>
<a class="tg_radio" ng-click="toggleCtrlEnter(0)" ng-class="send.enter == 0 ? 'tg_radio_on' : ''">
<i class="icon icon-radio"></i>
<span>
<strong>Ctrl + Enter</strong> - send message, <strong>Enter</strong> - new line
</span>
<span my-i18n="settings_modal_ctrl_enter_send_description_md"></span>
</a>
</div>
@ -106,14 +106,16 @@ @@ -106,14 +106,16 @@
</div>
<div class="modal_section">
<h3 class="modal_section_header">About</h3>
<h3 class="modal_section_header" my-i18n="settings_modal_about"></h3>
<div class="modal_section_body settings_about_section_body">
<div class="settings_external_services pull-right">
<a href="https://github.com/zhukov/webogram" target="_blank" title="Source code on GitHub" class="settings_external_service"><i class="icon icon-github"></i></a>
<a href="https://twitter.com/telegram_web" target="_blank" title="Follow us on Twitter!" class="settings_external_service"><i class="icon icon-twitter"></i></a>
<a href="https://github.com/zhukov/webogram" target="_blank" title="{{'settings_modal_source_code_github' | i18n}}" class="settings_external_service"><i class="icon icon-github"></i></a>
<a href="https://twitter.com/telegram_web" target="_blank" title="{{'settings_modal_follow_us_twitter' | i18n}}" class="settings_external_service"><i class="icon icon-twitter"></i></a>
</div>
<p>
<a ng-click="openChangelog()">Recent updates (ver. <span ng-bind="version"></span>)</a>
<a ng-click="openChangelog()" my-i18n="settings_modal_recent_updates">
<my-i18n-param name="version" ng-bind="version"></my-i18n-param>
</a>
</p>
</div>
</div>

25
app/partials/user_modal.html

@ -19,25 +19,28 @@ @@ -19,25 +19,28 @@
<p class="user_modal_status" ng-if="user.status" my-user-status="::user.id"></p>
<div class="user_modal_actions_wrap clearfix">
<button class="btn btn-primary user_modal_main_btn" ng-click="goToHistory()">Send message</button>
<button class="btn btn-primary user_modal_main_btn" ng-click="goToHistory()" my-i18n="user_modal_send_message"></button>
<div class="dropdown user_modal_other_btn">
<button class="btn btn-link dropdown-toggle">More<i class="icon icon-caret"></i></button>
<button class="btn btn-link dropdown-toggle">
<my-i18n msgid="user_modal_menu_more"></my-i18n>
<i class="icon icon-caret"></i>
</button>
<ul class="dropdown-menu">
<li ng-if="user._ == 'userContact'">
<a ng-click="importContact(true)">Edit contact</a>
<a ng-click="importContact(true)" my-i18n="user_modal_edit_contact"></a>
</li>
<li ng-if="user._ == 'userContact'">
<a ng-click="deleteContact()">Delete contact</a>
<a ng-click="deleteContact()" my-i18n="user_modal_delete_contact"></a>
</li>
<li ng-if="user.phone.length > 0 &amp;&amp; user._ != 'userContact'">
<a ng-click="importContact()">Add to contacts</a>
<a ng-click="importContact()" my-i18n="user_modal_add_contact"></a>
</li>
<li ng-if="user.phone.length > 0">
<a ng-click="shareContact()">Share contact</a>
<a ng-click="shareContact()" my-i18n="user_modal_share_contact"></a>
</li>
<li>
<a ng-click="flushHistory()">Delete chat</a>
<a ng-click="flushHistory()" my-i18n="user_modal_delete_chat"></a>
</li>
</ul>
</div>
@ -48,20 +51,20 @@ @@ -48,20 +51,20 @@
</div>
<div class="modal_section" ng-if="user.phone">
<h3 class="modal_section_header">Phone</h3>
<h3 class="modal_section_header" my-i18n="user_modal_phone"></h3>
<div class="modal_section_body">
<p><span ng-bind="user.phone | phoneNumber"></span></p>
</div>
</div>
<div class="modal_section">
<h3 class="modal_section_header">Settings</h3>
<h3 class="modal_section_header" my-i18n="user_modal_settings"></h3>
<div class="modal_section_body">
<div class="tg_form_group">
<a class="tg_checkbox" ng-click="settings.notifications = !settings.notifications" ng-class="settings.notifications ? 'tg_checkbox_on' : ''">
<span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>
<span class="tg_checkbox_label">Notifications</span>
<span class="tg_checkbox_label" my-i18n="user_modal_notifications"></span>
</a>
</div>
</div>
@ -69,4 +72,4 @@ @@ -69,4 +72,4 @@
</div>
</div>
</div>

8
app/partials/video_modal.html

@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
<div class="media_meta_wrap clearfix">
<div class="media_modal_actions pull-right">
<a href="" class="media_modal_action_link" ng-click="download()">Download</a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="forward()">Forward</a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="delete()">Delete</a>
<a href="" class="media_modal_action_link" ng-click="download()" my-i18n="media_modal_download"></a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="forward()" my-i18n="media_modal_forward"></a>
<a ng-if="messageID" href="" class="media_modal_action_link" ng-click="delete()" my-i18n="media_modal_delete"></a>
</div>
<p class="media_modal_info">
@ -18,4 +18,4 @@ @@ -18,4 +18,4 @@
</div>
</div>
</div>

Loading…
Cancel
Save