Browse Source

integrated i18n into some partials

as in the previous commit every string to be displayed in the partials
should now be passed through `_` first
master
Roman Anasal 10 years ago
parent
commit
845d57a512
  1. 8
      app/partials/changelog_modal.html
  2. 72
      app/partials/head.html
  3. 114
      app/partials/im.html
  4. 56
      app/partials/login.html
  5. 2
      app/partials/message.html
  6. 10
      app/partials/message_attach_audio.html
  7. 8
      app/partials/message_attach_document.html
  8. 4
      app/partials/message_attach_pending.html
  9. 10
      app/partials/message_attach_video.html
  10. 39
      app/partials/message_service.html
  11. 20
      app/partials/welcome.html

8
app/partials/changelog_modal.html

@ -7,11 +7,11 @@ @@ -7,11 +7,11 @@
<div class="changelog_card_wrap" ng-switch="lastVersion === false">
<div ng-switch-when="true">
<div class="changelog_card"></div>
<h2 class="changelog_header">Recent updates in <strong>Telegram Web</strong></h2>
<h2 class="changelog_header" my-i18n="changelog_modal_header_recent_updates_md"></h2>
</div>
<div ng-switch-default>
<div class="changelog_card"></div>
<h2 class="changelog_header"><strong>Telegram Web</strong> has been updated!</h2>
<h2 class="changelog_header" my-i18n="changelog_modal_header_new_updates_md"></h2>
</div>
</div>
@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
<div class="modal_section changelog_version_wrap">
<h3 class="modal_section_header changelog_version_title">
<span class="pull-right">current version</span>
<span class="pull-right" my-i18n="changelog_modal_title_current_version"></span>
Version 0.3.0
</h3>
<div class="modal_section_body changelog_version_changes">
@ -197,4 +197,4 @@ @@ -197,4 +197,4 @@
</div>
</div>
</div>

72
app/partials/head.html

@ -17,22 +17,22 @@ @@ -17,22 +17,22 @@
<span class="icon-bar"></span>
</a>
<ul ng-if="!curDialog.peer &amp;&amp; isLoggedIn" class="dropdown-menu">
<li><a ng-click="openGroup()">New Group</a></li>
<li><a ng-click="importContact()">New Contact</a></li>
<li><a ng-click="openContacts()">Contacts</a></li>
<li><a ng-click="openSettings()">Settings</a></li>
<li><a ng-click="logOut()">Log Out</a></li>
<li><a ng-click="openGroup()" my-i18n="head_new_group"></a></li>
<li><a ng-click="importContact()" my-i18n="head_new_contact"></a></li>
<li><a ng-click="openContacts()" my-i18n="head_contacts"></a></li>
<li><a ng-click="openSettings()" my-i18n="head_settings"></a></li>
<li><a ng-click="logOut()" my-i18n="head_log_out"></a></li>
</ul>
<ul ng-if="curDialog.peer &amp;&amp; isLoggedIn" class="dropdown-menu">
<li><a ng-click="toggleEdit()">Edit messages</a></li>
<li><a ng-click="toggleEdit()" my-i18n="head_edit_messages"></a></li>
<li ng-if="!historyFilter.mediaType" class="divider"></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('photos')">Photos</a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('video')">Videos</a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('documents')">Documents</a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('audio')">Voice notes</a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('photos')" my-i18n="head_media_photos"></a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('video')" my-i18n="head_media_video"></a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('documents')" my-i18n="head_media_documents"></a></li>
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('audio')" my-i18n="head_media_audio"></a></li>
</ul>
<ul ng-if="!isLoggedIn" class="dropdown-menu">
<li><a href="https://github.com/zhukov/webogram" target="_blank">About</a></li>
<li><a href="https://github.com/zhukov/webogram" target="_blank" my-i18n="head_about"></a></li>
</ul>
</div>
@ -50,10 +50,10 @@ @@ -50,10 +50,10 @@
<a ng-click="toggleMedia()" class="navbar-quick-media-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title" ng-switch="historyFilter.mediaType">
<h4 ng-switch-when="photos">Photos</h4>
<h4 ng-switch-when="video">Videos</h4>
<h4 ng-switch-when="documents">Documents</h4>
<h4 ng-switch-when="audio">Voice messages</h4>
<h4 ng-switch-when="photos" my-i18n="head_media_photos"></h4>
<h4 ng-switch-when="video" my-i18n="head_media_video"></h4>
<h4 ng-switch-when="documents" my-i18n="head_media_documents"></h4>
<h4 ng-switch-when="audio" my-i18n="head_media_audio"></h4>
</div>
</a>
</li>
@ -61,12 +61,12 @@ @@ -61,12 +61,12 @@
<div ng-switch-default ng-switch="historyState.selectActions">
<ul ng-switch-when="true" class="nav navbar-navbar navbar-quick-nav navbar-history-edit">
<li class="navbar-quick-right">
<a ng-click="toggleEdit()">Cancel</a>
<a ng-click="toggleEdit()" my-i18n="modal_cancel"></a>
</li>
<li class="navbar-quick-left">
<a ng-click="selectedFlush()">Clear All</a>
<a ng-click="selectedFlush()" my-i18n="head_clear_all"></a>
</li>
<li class="navbar-quick-title">Edit</li>
<li class="navbar-quick-title" my-i18n="head_edit"></li>
</ul>
<ul ng-switch-default class="nav navbar-nav navbar-quick-nav" ng-switch="historyPeer.id > 0">
<li ng-switch-when="true">
@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
<h4 ng-bind-html="historyPeer.data.rFullName"></h4>
<small ng-switch="historyState.typing.length">
<span ng-switch-when="1" class="status_online">
typing<span my-loading-dots></span>
<my-i18n msgid="head_typing"></my-i18n><span my-loading-dots></span>
</span>
<span ng-switch-default my-user-status="historyPeer.id"></span>
</small>
@ -90,17 +90,17 @@ @@ -90,17 +90,17 @@
<h4 ng-bind-html="historyPeer.data.rTitle"></h4>
<small ng-switch="historyState.typing.length">
<ng-pluralize ng-switch-when="0" count="historyPeer.data.participants_count"
when="{'0': 'No members', 'one': '1 member', 'other': '{} members'}">
when="head_pluralize_participants">
</ng-pluralize>
<span ng-switch-when="1" class="status_online">
<span my-user-link="historyState.typing[0]" short="true"></span> is typing<span my-loading-dots></span>
</span>
<span ng-switch-when="2" class="status_online">
<span my-user-link="historyState.typing[0]" short="true"></span>, <span my-user-link="historyState.typing[1]" short="true"></span><span my-loading-dots></span>
</span>
<span ng-switch-default class="status_online">
<span my-user-link="historyState.typing[0]" short="true"></span>+{{historyState.typing.length - 1}}<span my-loading-dots></span>
</span>
<my-i18n>
<span ng-switch-when="1" class="status_online" my-i18n-format="head_one_typing"></span>
<span ng-switch-when="2" class="status_online" my-i18n-format="head_two_typing"></span>
<span ng-switch-default class="status_online" my-i18n-format="head_many_typing"></span>
<my-i18n-param name="name1"><span my-user-link="historyState.typing[0]" short="true"></span></my-i18n-param>
<my-i18n-param name="name2"><span my-user-link="historyState.typing[1]" short="true"></span></my-i18n-param>
<my-i18n-param name="names">{{historyState.typing.length - 1}}</my-i18n-param>
<my-i18n-param name="dots"><span my-loading-dots></span></my-i18n-param>
</my-i18n>
</small>
</div>
</a>
@ -113,16 +113,16 @@ @@ -113,16 +113,16 @@
<div class="navbar-menu" ng-switch="offline">
<ul ng-switch-when="true" class="nav navbar-nav navbar-offline">
<li ng-show="!offlineConnecting"><span class="navbar-offline-text">Waiting for network<span my-loading-dots></span></span></li>
<li ng-show="!offlineConnecting" class="hidden-xs"><a href="" ng-click="retryOnline()">Retry</a></li>
<li ng-show="offlineConnecting"><span class="navbar-offline-text">Connecting<span my-loading-dots></span></span></li>
<li ng-show="!offlineConnecting"><span class="navbar-offline-text"><my-i18n msgid="head_waiting_for_network"></my-i18n><span my-loading-dots></span></span></li>
<li ng-show="!offlineConnecting" class="hidden-xs"><a href="" ng-click="retryOnline()" my-i18n="head_retry"></a></li>
<li ng-show="offlineConnecting"><span class="navbar-offline-text"><my-i18n msgid="head_connecting"></my-i18n><span my-loading-dots></span></span></li>
</ul>
<ul ng-switch-default class="nav navbar-nav navbar-right">
<li ng-if="isLoggedIn &amp;&amp; !isEmpty.contacts"><a href="" ng-click="openContacts()">Contacts</a></li>
<li ng-if="isLoggedIn"><a href="" ng-click="openSettings()">Settings</a></li>
<li ng-if="isLoggedIn"><a href="" ng-click="logOut()">Log Out</a></li>
<li ng-if="!isLoggedIn"><a href="https://github.com/zhukov/webogram" target="_blank">About</a></li>
<li ng-if="isLoggedIn &amp;&amp; !isEmpty.contacts"><a href="" ng-click="openContacts()" my-i18n="head_contacts"></a></li>
<li ng-if="isLoggedIn"><a href="" ng-click="openSettings()" my-i18n="head_settings"></a></li>
<li ng-if="isLoggedIn"><a href="" ng-click="logOut()" my-i18n="head_log_out"></a></li>
<li ng-if="!isLoggedIn"><a href="https://github.com/zhukov/webogram" target="_blank" my-i18n="head_about"></a></li>
</ul>
</div>

114
app/partials/im.html

@ -13,21 +13,21 @@ @@ -13,21 +13,21 @@
<span class="icon-bar"></span>
</a>
<ul class="dropdown-menu">
<li><a ng-click="openGroup()">New Group</a></li>
<li><a ng-click="importContact()">New Contact</a></li>
<li><a ng-click="openContacts()">Contacts</a></li>
<li><a ng-click="openSettings()">Settings</a></li>
<li><a ng-click="openGroup()" my-i18n="im_new_group"></a></li>
<li><a ng-click="importContact()" my-i18n="im_new_contact"></a></li>
<li><a ng-click="openContacts()" my-i18n="im_contacts"></a></li>
<li><a ng-click="openSettings()" my-i18n="im_settings"></a></li>
</ul>
</div>
<div class="im_dialogs_search">
<input class="form-control im_dialogs_search_field no_outline" type="search" placeholder="Search" ng-model="search.query"/>
<input 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="searchClear()" ng-show="search.query.length"></a>
</div>
<div class="im_dialogs_tabs_wrap">
<div class="im_dialogs_tabs clearfix">
<a href="" class="im_dialogs_tab" ng-class="{active: !search.messages}" ng-click="search.messages = false">Conversations</a>
<a href="" class="im_dialogs_tab" ng-class="{active: search.messages}" ng-click="search.messages = true">Messages</a>
<a href="" class="im_dialogs_tab" ng-class="{active: !search.messages}" ng-click="search.messages = false" my-i18n="im_conversations"></a>
<a href="" class="im_dialogs_tab" ng-class="{active: search.messages}" ng-click="search.messages = true" my-i18n="im_messages"></a>
</div>
</div>
</div>
@ -37,10 +37,10 @@ @@ -37,10 +37,10 @@
<div class="im_dialogs_scrollable_wrap nano-content">
<div class="im_dialogs_empty_wrap" ng-if="isEmpty.contacts">
<h3 class="im_dialogs_empty_header">No contacts yet</h3>
<p class="im_dialogs_empty_lead">Get started by adding a contact to chat with</p>
<button type="button" class="btn btn-primary btn-sm" ng-click="importContact()">Add contact</button>
<button ng-if="phonebookAvailable" type="button" class="btn btn-primary btn-sm im_dialogs_import_phonebook" ng-click="importPhonebook()">Import phonebook</button>
<h3 class="im_dialogs_empty_header" my-i18n="im_no_contacts"></h3>
<p class="im_dialogs_empty_lead" my-i18n="im_get_started_long"></p>
<button type="button" class="btn btn-primary btn-sm" ng-click="importContact()" my-i18n="im_add_contact"></button>
<button ng-if="phonebookAvailable" type="button" class="btn btn-primary btn-sm im_dialogs_import_phonebook" ng-click="importPhonebook()" my-i18n="im_import_phonebook"></button>
</div>
<div ng-switch="search.messages">
@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
</div>
<div class="im_dialogs_contacts_wrap" ng-show="!search.messages &amp;&amp; contacts.length > 0">
<h5>Contacts</h5>
<h5 my-i18n="im_contacts_title"></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-mousedown="dialogSelect(contact.peerString)">
@ -85,16 +85,14 @@ @@ -85,16 +85,14 @@
<div class="im_history_col_wrap" ng-controller="AppImHistoryController">
<div ng-show="state.notSelected" ng-switch="isEmpty.contacts &amp;&amp; isEmpty.dialogs">
<div ng-switch-when="true" class="im_history_no_dialogs_wrap">
<h3 class="im_dialogs_empty_header">Get started</h3>
<p class="im_dialogs_empty_lead">Welcome to Telegram Web. You can always set your profile photo and change your name in Settings.</p>
<button type="button" class="btn btn-primary btn-sm" ng-click="openSettings()">Open Settings</button>
</div>
<div ng-switch-default class="im_history_not_selected" my-vertical-position="0.35" padding="true">
Please select a chat to start messaging
<h3 class="im_dialogs_empty_header" my-i18n="im_get_started"></h3>
<p class="im_dialogs_empty_lead" my-i18n="im_welcome_text"></p>
<button type="button" class="btn btn-primary btn-sm" ng-click="openSettings()" my-i18n="im_open_settings"></button>
</div>
<div ng-switch-default class="im_history_not_selected" my-vertical-position="0.35" padding="true" my-i18n="im_select_a_chat"></div>
</div>
<div ng-show="!state.notSelected &amp;&amp; !state.loaded" class="im_history_not_selected" my-vertical-position="0.35" padding="true">
Loading history<span my-loading-dots></span>
<my-i18n msgid="im_loading_history"></my-i18n><span my-loading-dots></span>
</div>
<div ng-show="state.loaded">
@ -105,29 +103,29 @@ @@ -105,29 +103,29 @@
<div class="im_history_panel clearfix" ng-controller="AppImPanelController">
<div class="im_history_panel_title">
<a class="im_history_panel_info_link pull-right" ng-click="showPeerInfo()">Info</a>
<a class="im_history_panel_edit_link pull-right" ng-click="toggleEdit()">Edit</a>
<a class="im_history_panel_info_link pull-right" ng-click="showPeerInfo()" my-i18n="im_info"></a>
<a class="im_history_panel_edit_link pull-right" ng-click="toggleEdit()" my-i18n="im_edit"></a>
<div class="dropdown im_history_panel_media_dropdown pull-right">
<a class="dropdown-toggle">Media<i class="icon icon-caret"></i></a>
<a class="dropdown-toggle"><my-i18n msgid="im_media"></my-i18n><i class="icon icon-caret"></i></a>
<ul class="dropdown-menu">
<li><a ng-click="toggleMedia('photos')">Photos</a></li>
<li><a ng-click="toggleMedia('video')">Videos</a></li>
<li><a ng-click="toggleMedia('documents')">Documents</a></li>
<li><a ng-click="toggleMedia('audio')">Voice messages</a></li>
<li><a ng-click="toggleMedia('photos')" my-i18n="im_media_photos"></a></li>
<li><a ng-click="toggleMedia('video')" my-i18n="im_media_video"></a></li>
<li><a ng-click="toggleMedia('documents')" my-i18n="im_media_documents"></a></li>
<li><a ng-click="toggleMedia('audio')" my-i18n="im_media_audio"></a></li>
</ul>
</div>
<a ng-show="historyFilter.mediaType.length || skippedHistory" class="im_history_panel_return_link pull-right" ng-click="returnToRecent()" ng-switch="skippedHistory">
<span ng-switch-when="true">Show recent messages</span>
<span ng-switch-default>Show all messages</span>
<span ng-switch-when="true" my-i18n="im_show_recent_messages"></span>
<span ng-switch-default my-i18n="im_show_all_messages"></span>
<strong class="im_history_panel_return_count" ng-show="missedCount > 0" ng-bind="'+' + missedCount"></strong>
</a>
<div ng-switch="historyFilter.mediaType">
<h4 ng-switch-when="photos">Photos</h4>
<h4 ng-switch-when="video">Videos</h4>
<h4 ng-switch-when="documents">Documents</h4>
<h4 ng-switch-when="audio">Voice messages</h4>
<h4 ng-switch-when="photos" my-i18n="im_media_photos"></h4>
<h4 ng-switch-when="video" my-i18n="im_media_video"></h4>
<h4 ng-switch-when="documents" my-i18n="im_media_documents"></h4>
<h4 ng-switch-when="audio" my-i18n="im_media_audio"></h4>
<h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()">
<div ng-switch-when="true">
@ -138,7 +136,7 @@ @@ -138,7 +136,7 @@
<span ng-bind-html="historyPeer.data.rTitle"></span>
<small class="im_chat_users">
<ng-pluralize count="historyPeer.data.participants_count"
when="{'0': 'No members', 'one': '1 member', 'other': '{} members'}">
when="im_pluralize_participants">
</ng-pluralize>
</small>
</div>
@ -158,8 +156,8 @@ @@ -158,8 +156,8 @@
<div class="im_history_scrollable">
<div class="im_history" ng-class="{im_history_selectable: historyState.selectActions}">
<div ng-if="state.empty" class="im_history_empty" ng-switch="state.mayBeHasMore" my-vertical-position="0.25" padding="true">
<span ng-switch-when="true">Loading history<span my-loading-dots></span></span>
<span ng-switch-default>No messages here yet...</span>
<span ng-switch-when="true"><my-i18n msgid="im_loading_history"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-default my-i18n="im_no_messages"></span>
</div>
<div class="im_history_messages" ng-class="{im_history_messages_group: historyPeer.id < 0}">
@ -172,16 +170,14 @@ @@ -172,16 +170,14 @@
<div class="im_history_typing_wrap">
<div class="im_history_typing" ng-show="historyState.typing.length > 0 &amp;&amp; !historyFilter.mediaType" ng-switch="historyState.typing.length">
<span ng-switch-when="1">
<a class="im_history_typing_author" my-user-link="historyState.typing[0]"></a> is typing<span my-loading-dots></span>
</span>
<span ng-switch-when="2">
<a class="im_history_typing_author" my-user-link="historyState.typing[0]"></a> and <a class="im_history_typing_author" my-user-link="historyState.typing[1]"></a> are typing<span my-loading-dots></span>
</span>
<span ng-switch-default>
<a class="im_history_typing_author" my-user-link="historyState.typing[0]"></a>, <a class="im_history_typing_author" my-user-link="historyState.typing[1]"></a> and {{historyState.typing.length - 2}} more are typing<span my-loading-dots></span>
</span>
<div class="im_history_typing" ng-show="historyState.typing.length > 0 &amp;&amp; !historyFilter.mediaType" ng-switch="historyState.typing.length" my-i18n>
<span ng-switch-when="1" my-i18n-format="im_one_typing"></span>
<span ng-switch-when="2" my-i18n-format="im_two_typing"></span>
<span ng-switch-default my-i18n-format="im_many_typing"></span>
<my-i18n-param name="name1"><a class="im_history_typing_author" my-user-link="historyState.typing[0]"></a></my-i18n-param>
<my-i18n-param name="name2"><a class="im_history_typing_author" my-user-link="historyState.typing[1]"></a></my-i18n-param>
<my-i18n-param name="count">{{historyState.typing.length - 2}}</my-i18n-param>
<my-i18n-param name="dots"><span my-loading-dots></span></my-i18n-param>
</div>
</div>
@ -196,16 +192,14 @@ @@ -196,16 +192,14 @@
<div class="im_edit_panel_wrap clearfix" ng-show="historyState.selectActions">
<div class="im_edit_panel_border"></div>
<a class="im_edit_flush_link" ng-click="selectedFlush()" ng-switch="historyPeer.id > 0">
<span ng-switch-when="true">Delete Chat</span>
<span ng-switch-default>Clear History</span>
<span ng-switch-when="true" my-i18n="im_delete_chat"></span>
<span ng-switch-default my-i18n="im_clear_history"></span>
</a>
<a class="im_edit_cancel_link" ng-click="selectedCancel()">Cancel</a>
<div class="im_edit_selected_actions">
<a class="btn btn-primary im_edit_forward_btn" ng-click="selectedForward()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount">
Forward <strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong>
</a><a class="btn btn-danger im_edit_delete_btn" ng-click="selectedDelete()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount">
Delete <strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong>
</a>
<a class="im_edit_cancel_link" ng-click="selectedCancel()" my-i18n="modal_cancel">Cancel</a>
<div class="im_edit_selected_actions" my-i18n>
<a class="btn btn-primary im_edit_forward_btn" ng-click="selectedForward()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" my-i18n-format="im_forward"></a>
<a class="btn btn-danger im_edit_delete_btn" ng-click="selectedDelete()" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" my-i18n-format="im_delete"></a>
<my-i18n-param name="count"><strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong></my-i18n-param>
</div>
</div>
@ -234,26 +228,26 @@ @@ -234,26 +228,26 @@
<form my-send-form draft-message="draftMessage" class="im_send_form" ng-class="{im_send_form_empty: !draftMessage.text.length}" ng-submit="sendMessage($event)">
<div class="im_send_field_wrap">
<div class="im_send_dropbox_wrap"> Drop photos here to send </div>
<textarea ng-model="draftMessage.text" placeholder="Write a message..." class="form-control im_message_field no_outline"></textarea>
<div class="im_send_dropbox_wrap" my-i18n="im_photos_drop_text"></div>
<textarea ng-model="draftMessage.text" placeholder="{{'im_message_field_placeholder' | i18n}}" class="form-control im_message_field no_outline"></textarea>
</div>
<div class="im_media_attach pull-right">
<input type="file" class="im_media_attach_input" size="28" multiple="true" accept="image/*, video/*, audio/*" title="Send media"/>
<input type="file" class="im_media_attach_input" size="28" multiple="true" accept="image/*, video/*, audio/*" title="{{'im_media_attach_title' | i18n}}"/>
<i class="icon icon-camera"></i>
</div>
<div class="im_attach pull-right">
<input type="file" class="im_attach_input" size="28" multiple="true" title="Send file" />
<input type="file" class="im_attach_input" size="28" multiple="true" title="{{'im_attach_file_title' | i18n}}" />
<i class="icon icon-paperclip"></i>
</div>
<div class="im_emoji_btn pull-right" title="Insert emoticon">
<div class="im_emoji_btn pull-right" title="{{'im_emoji_btn_title' | i18n}}">
<i class="icon icon-emoji"></i>
</div>
<button type="submit" class="btn btn-success im_submit">
<span class="im_submit_text">Send</span>
<span class="im_submit_text" my-i18n="im_submit_message"></span>
</button>
</form>
</div>

56
app/partials/login.html

@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
<div class="error" ng-if="error.message" ng-bind="error.message"></div>
<form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()">
<h3 class="login_form_head">Sign in</h3>
<p class="login_form_lead">Please choose your country and enter your full phone number.</p>
<h3 class="login_form_head" my-i18n="login_sign_in"></h3>
<p class="login_form_lead" my-i18n="login_enter_number_description"></p>
<div class="login_country_selector" ng-click="chooseCountry()">
<span ng-bind="credentials.phone_country_name"></span>
@ -14,70 +14,70 @@ @@ -14,70 +14,70 @@
</div>
<div class="form-group" ng-class="{'has-error': error.field == 'phone'}">
<label class="control-label" ng-if="error.field == 'phone'">Incorrect phone number</label>
<label class="control-label" ng-if="error.field == 'phone'" my-i18n="login_incorrect_number"></label>
<div class="clearfix">
<input type="tel" autocomplete="off" class="form-control pull-left login_phone_country" my-focused name="phone_country" ng-model="credentials.phone_country">
<input type="tel" autocomplete="off" class="form-control pull-left login_phone_number" my-focus-on="country_selected" name="phone_number" ng-model="credentials.phone_number" placeholder="Enter your phone" required>
<input type="tel" autocomplete="off" class="form-control pull-left login_phone_number" my-focus-on="country_selected" name="phone_number" ng-model="credentials.phone_number" placeholder="{{'login_tel_input_placeholder' | i18n}}" required>
</div>
</div>
<button class="btn btn-primary btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit" ng-switch="progress.enabled">
<span ng-switch-when="true">Generating keys<span my-loading-dots></span></span>
<span ng-switch-default>Next</span>
<span ng-switch-when="true"><my-i18n msgid="login_generating_key"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-default my-i18n="modal_next"></span>
</button>
<div class="login_form_messaging" ng-show="progress.enabled">Keys are only generated once. This can take a few minutes on slower devices, please be patient.</div>
<div class="login_form_messaging" ng-show="progress.enabled" my-i18n="login_generating_keys_info"></div>
</form>
<form name="myLoginForm" ng-if="credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" ng-submit="logIn()">
<h3 class="login_form_head"><span ng-bind="credentials.phone_country"></span> <span ng-bind="credentials.phone_number"></span></h3>
<div class="login_edit_phone"><a ng-click="editPhone()">Edit phone number</a></div>
<div class="login_edit_phone"><a ng-click="editPhone()" my-i18n="login_edit_number"></a></div>
<div ng-switch="credentials.viaApp">
<div ng-switch-when="true">
<p class="login_form_lead" my-i18n="login_enter_code_label_md"></p>
<p class="login_form_lead">
Please enter the code you've just received in your other <strong>Telegram</strong> app
</p>
<p class="login_form_lead">
<a ng-click="sendSms()">Haven't received the code?</a>
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
</p>
</div>
<div ng-switch-default>
<p class="login_form_lead">We have sent you a code via SMS.<br/>Please enter it below.</p>
<p class="login_form_lead" my-i18n="login_enter_sms_code_label"></p>
<p class="login_form_lead">
<span ng-show="callPending.remaining > 0">Telegram will call you in {{callPending.remaining | duration}}</span>
<span ng-show="!callPending.remaining &amp;&amp; !callPending.success">Telegram is calling you</span>
<span ng-show="!callPending.remaining &amp;&amp; callPending.success">Telegram dialed your number</span>
<span ng-show="callPending.remaining > 0" my-i18n="login_call_remaining">
<my-i18n-param name="remaining">{{callPending.remaining | duration}}</my-i18n-param>
</span>
<span ng-show="!callPending.remaining &amp;&amp; !callPending.success" my-i18n="login_calling"></span>
<span ng-show="!callPending.remaining &amp;&amp; callPending.success" my-i18n="login_number_dialed"></span>
</p>
</div>
</div>
<div class="form-group" ng-class="{'has-error': error.field == 'phone_code'}">
<label class="control-label" for="phone_code" ng-if="error.field == 'phone_code'">Incorrect SMS code</label>
<input type="number" my-focused class="form-control" name="phone_code" ng-model="credentials.phone_code" placeholder="Enter your code" autocomplete="off" required>
<label class="control-label" for="phone_code" ng-if="error.field == 'phone_code'" my-i18n="login_incorrect_sms_code"></label>
<input type="number" my-focused class="form-control" name="phone_code" ng-model="credentials.phone_code" placeholder="{{'login_number_input_placeholder' | i18n}}" autocomplete="off" required>
</div>
<button class="btn btn-primary btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" ng-switch="progress.enabled">
<span ng-switch-when="true">Checking code<span my-loading-dots></span></span>
<span ng-switch-default>Next</span>
<span ng-switch-when="true"><my-i18n msgid="login_checking_code"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-default my-i18n="modal_next"></span>
</button>
</form>
<form name="myFullNameForm" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-submit="logIn(true)">
<h3 class="login_form_head">Your info</h3>
<p class="login_form_lead">Please enter your full name to set up a Telegram account.</p>
<h3 class="login_form_head" my-i18n="login_your_info"></h3>
<p class="login_form_lead" my-i18n="login_fulll_name_label"></p>
<div class="form-group login_first_name_wrap" ng-class="{'has-error': error.field == 'first_name'}">
<label class="control-label" for="first_name" ng-if="error.field == 'first_name'">Incorrect first name</label>
<input my-focused class="form-control" name="first_name" ng-model="credentials.first_name" placeholder="First name" autocomplete="off" required>
<label class="control-label" for="first_name" ng-if="error.field == 'first_name'" my-i18n="login_incorrect_first_name"></label>
<input my-focused class="form-control" name="first_name" ng-model="credentials.first_name" placeholder="{{'login_first_name' | i18n}}" autocomplete="off" required>
</div>
<div class="form-group" ng-class="{'has-error': error.field == 'last_name'}">
<label class="control-label" for="last_name" ng-if="error.field == 'last_name'">Incorrect last name</label>
<input class="form-control" name="last_name" ng-model="credentials.last_name" placeholder="Last name" autocomplete="off">
<label class="control-label" for="last_name" ng-if="error.field == 'last_name'" my-i18n="login_incorrect_last_name"></label>
<input class="form-control" name="last_name" ng-model="credentials.last_name" placeholder="{{'login_last_name' | i18n}}" autocomplete="off">
</div>
<button class="btn btn-primary btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit" ng-switch="progress.enabled">
<span ng-switch-when="true">Signing up<span my-loading-dots></span></span>
<span ng-switch-default>Sign up</span>
<span ng-switch-when="true"><my-i18n msgid="login_signing_up"></my-i18n><span my-loading-dots></span></span>
<span ng-switch-default my-i18n="login_sign_up"></span>
</button>
</form>

2
app/partials/message.html

@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
<a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0"></a>
<div ng-if="::historyMessage._ == 'messageForwarded' || false" class="im_message_fwd_from">
<div class="im_message_fwd_title" ng-if="::historyMessage.grouped == 'im_grouped_fwd_start'">Forwarded message</div>
<div class="im_message_fwd_title" ng-if="::historyMessage.grouped == 'im_grouped_fwd_start'" my-i18n="message_forwarded_message"></div>
<a class="im_message_fwd_photo pull-left" my-user-photolink="historyMessage.fwd_from_id" img-class="im_message_fwd_photo"></a>
<div class="im_message_fwd_author_wrap">
<a class="im_message_fwd_author" my-user-link="historyMessage.fwd_from_id" short="true"></a><span class="im_message_fwd_date" ng-bind="historyMessage.fwd_date | dateOrTime"></span>

10
app/partials/message_attach_audio.html

@ -6,17 +6,15 @@ @@ -6,17 +6,15 @@
<div class="im_message_audio_info">
<div class="im_message_audio_name_wrap" ng-if="!historyMessage.media.audio.url">
<span class="im_message_audio_name">
Voice message
</span>
<span class="im_message_audio_name" my-i18n="message_attach_audio_message"></span>
<span class="im_message_audio_duration" ng-if="!historyMessage.media.audio.progress.enabled" ng-bind="::historyMessage.media.audio.duration | duration"></span>
<span class="im_message_audio_size" ng-if="historyMessage.media.audio.progress.enabled" ng-bind="historyMessage.media.audio.progress | formatSizeProgress"></span>
</div>
<div class="im_message_audio_actions" ng-if="!historyMessage.media.audio.progress.enabled &amp;&amp; !historyMessage.media.audio.url">
<a href="" ng-click="openAudio(historyMessage.media.audio.id)">Play</a>
<a href="" ng-click="openAudio(historyMessage.media.audio.id)" my-i18n="message_attach_audio_play"></a>
</div>
<div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.audio.progress.enabled">
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.audio.progress.cancel()">Cancel</a>
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.audio.progress.cancel()" my-i18n="modal_cancel"></a>
<div class="im_message_download_progress_wrap">
<div class="progress tg_down_progress">
<div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.audio.progress.percent + '%'}"></div>
@ -30,4 +28,4 @@ @@ -30,4 +28,4 @@
</audio>
</div>
</div>
</div>
</div>

8
app/partials/message_attach_document.html

@ -22,11 +22,11 @@ @@ -22,11 +22,11 @@
<span class="im_message_document_size" ng-if="historyMessage.media.document.progress.enabled" ng-bind="historyMessage.media.document.progress | formatSizeProgress"></span>
</div>
<div class="im_message_document_actions" ng-if="!historyMessage.media.document.progress.enabled">
<a href="" ng-click="downloadDoc(historyMessage.media.document.id)">Download</a>
<a href="" ng-click="downloadDoc(historyMessage.media.document.id, 1)" ng-if="::historyMessage.media.document.withPreview">Open</a>
<a href="" ng-click="downloadDoc(historyMessage.media.document.id)" my-i18n="message_attach_document_download"></a>
<a href="" ng-click="downloadDoc(historyMessage.media.document.id, 1)" ng-if="::historyMessage.media.document.withPreview" my-i18n="message_attach_document_open"></a>
</div>
<div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.document.progress.enabled">
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.document.progress.cancel()">Cancel</a>
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.document.progress.cancel()" my-i18n="modal_cancel"></a>
<div class="im_message_download_progress_wrap">
<div class="progress tg_down_progress">
<div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.document.progress.percent + '%'}"></div>
@ -36,4 +36,4 @@ @@ -36,4 +36,4 @@
</div>
</div>
</div>
</div>

4
app/partials/message_attach_pending.html

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<span class="im_message_document_size" ng-if="historyMessage.media.progress" ng-bind="historyMessage.media.progress | formatSizeProgress"></span>
</div>
<div class="clearfix cancelable_progress_wrap">
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.progress.cancel()">Cancel</a>
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.progress.cancel()" my-i18n="modal_cancel"></a>
<div class="im_message_download_progress_wrap">
<div class="progress tg_down_progress">
<div class="progress-bar progress-bar-success" role="progressbar" ng-style="{width: historyMessage.media.progress.percent + '%'}"></div>
@ -14,4 +14,4 @@ @@ -14,4 +14,4 @@
</div>
</div>
</div>
</div>
</div>

10
app/partials/message_attach_video.html

@ -11,16 +11,16 @@ @@ -11,16 +11,16 @@
<div class="im_message_document_info">
<div class="im_message_document_name_wrap">
<span class="im_message_document_name">Video</span>
<span class="im_message_document_name" my-i18n="message_attach_video_video"></span>
<span class="im_message_document_size" ng-if="!historyMessage.media.video.progress.enabled" ng-bind="::historyMessage.media.video.size | formatSize"></span>
<span class="im_message_document_size" ng-if="historyMessage.media.video.progress.enabled" ng-bind="historyMessage.media.video.progress | formatSizeProgress"></span>
</div>
<div class="im_message_document_actions" ng-if="!historyMessage.media.video.progress.enabled">
<a href="" ng-click="downloadVideo(historyMessage.media.video.id)">Download</a>
<a href="" ng-click="openVideo(historyMessage.media.video.id, historyMessage.id)">Play video</a>
<a href="" ng-click="downloadVideo(historyMessage.media.video.id)" my-i18n="message_attach_video_download"></a>
<a href="" ng-click="openVideo(historyMessage.media.video.id, historyMessage.id)" my-i18n="message_attach_video_play"></a>
</div>
<div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.video.progress.enabled">
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.video.progress.cancel()">Cancel</a>
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.video.progress.cancel()" my-i18n="modal_cancel"></a>
<div class="im_message_download_progress_wrap">
<div class="progress tg_down_progress">
<div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.video.progress.percent + '%'}"></div>
@ -28,4 +28,4 @@ @@ -28,4 +28,4 @@
</div>
</div>
</div>
</div>
</div>

39
app/partials/message_service.html

@ -1,32 +1,23 @@ @@ -1,32 +1,23 @@
<span ng-switch="::historyMessage.action._">
<span ng-switch-when="messageActionChatCreate">
created the group &laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;
</span>
<span ng-switch-when="messageActionChatEditTitle">
changed group name to &laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;
</span>
<span ng-switch-when="messageActionChatEditPhoto">
changed group photo
</span>
<span ng-switch-when="messageActionChatDeletePhoto">
removed group photo
</span>
<my-i18n>
<span ng-switch-when="messageActionChatCreate" my-i18n-format="message_service_created_group"></span>
<span ng-switch-when="messageActionChatEditTitle" my-i18n-format="message_service_changed_group_name"></span>
<my-i18n-param name="group_name">&laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;</my-i18n-param>
</my-i18n>
<span ng-switch-when="messageActionChatEditPhoto" my-i18n="message_service_changed_group_photo"></span>
<span ng-switch-when="messageActionChatDeletePhoto" my-i18n="message_service_removed_group_photo"></span>
<span ng-switch-when="messageActionChatAddUser" ng-switch="::historyMessage.from_id != historyMessage.action.user_id">
<span ng-switch-when="true">
invited <a my-user-link="historyMessage.action.user_id" color="true"></a>
</span>
<span ng-switch-default>
returned to group
<span ng-switch-when="true" my-i18n="message_service_invited_user">
<my-i18n-param name="user"><a my-user-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
</span>
<span ng-switch-default my-i18n="message_service_returned_to_group"></span>
</span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="::historyMessage.from_id != historyMessage.action.user_id">
<span ng-switch-when="true">
kicked <a my-user-link="historyMessage.action.user_id" color="true"></a>
</span>
<span ng-switch-default>
left group
<span ng-switch-when="true" my-i18n="message_service_kicked_user">
<my-i18n-param name="user"><a my-user-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
</span>
<span ng-switch-default my-i18n="message_service_left_group"></span>
</span>
<span ng-switch-default ng-bind="'Unsupported action ' + historyMessage.action._"></span>
</span>
<span ng-switch-default ng-bind="'message_service_unsupported_action' | i18n:historyMessage.action._"></span>
</span>

20
app/partials/welcome.html

@ -5,14 +5,14 @@ @@ -5,14 +5,14 @@
<div class="welcome_form">
<div class="welcome_logo"></div>
<h3 class="welcome_header"><strong>Telegram</strong> Web</h3>
<h3 class="welcome_header" my-i18n="welcome_header_md"></h3>
<div class="welcome_text">
<p>This is an unofficial web-client for the <strong>Telegram Messenger</strong>.</p>
<p>It's still an <strong>alpha-version</strong> and may not be 200% reliable</p>
<p my-i18n="welcome_text_1_md"></p>
<p my-i18n="welcome_text_2_md"></p>
</div>
<div class="welcome_btn_wrap">
<a href="#/login" class="btn btn-primary btn-block">Start Messaging</a>
<a href="#/login" class="btn btn-primary btn-block" my-i18n="welcome_start_messaging"></a>
</div>
</div>
@ -24,24 +24,24 @@ @@ -24,24 +24,24 @@
<div class="col-md-4 col-sm-4">
<div class="welcome_footer_card_wrap row">
<div class="welcome_footer_card welcome_footer_card_messaging"></div>
<h4>Fast messaging</h4>
<div class="welcome_footer_card_lead">Send messages with rich emoji support right from your desktop or laptop computer</div>
<h4 my-i18n="welcome_fast_messaging_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_fast_messaging_text"></div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="welcome_footer_card_wrap">
<div class="welcome_footer_card welcome_footer_card_filesharing"></div>
<h4>Easy file sharing</h4>
<div class="welcome_footer_card_lead">Share files of any type using drag-and-drop or the attachment icon</div>
<h4 my-i18n="welcome_easy_sharing_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_easy_sharing_text"></div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="welcome_footer_card_wrap">
<div class="welcome_footer_card welcome_footer_card_powerful"></div>
<h4>Powerful tools</h4>
<div class="welcome_footer_card_lead">Browse shared media and files by type <br/> and set custom notifications</div>
<h4 my-i18n="welcome_powerful_tools_header"></h4>
<div class="welcome_footer_card_lead" my-i18n="welcome_powerful_tools_text"></div>
</div>
</div>

Loading…
Cancel
Save