diff --git a/app/js/controllers.js b/app/js/controllers.js index fd6ee445..734a286a 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -2309,21 +2309,9 @@ angular.module('myApp.controllers', ['myApp.i18n']) AppUsersManager.saveApiUser(user); $modalInstance.close(); }, function (error) { - switch (error.type) { - case 'USERNAME_INVALID': - $scope.checked = {error: true}; - error.handled = true; - break; - - case 'USERNAME_OCCUPIED': - $scope.checked = {error: true}; - error.handled = true; - break; - - case 'USERNAME_NOT_MODIFIED': - error.handled = true; - $modalInstance.close(); - break; + if (error.type == 'USERNAME_NOT_MODIFIED') { + error.handled = true; + $modalInstance.close(); } })['finally'](function () { delete $scope.profile.updating; diff --git a/app/js/directives.js b/app/js/directives.js index c8f32770..a7738066 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -607,7 +607,7 @@ angular.module('myApp.directives', ['myApp.filters']) } } - var animated = transform ? true : false, + var animated = transform && false ? true : false, curAnimation = false; $scope.$on('ui_history_append_new', function (e, options) { diff --git a/app/js/locales/en-us.json b/app/js/locales/en-us.json index 8a10f988..25d311b8 100644 --- a/app/js/locales/en-us.json +++ b/app/js/locales/en-us.json @@ -59,7 +59,7 @@ "username_edit_modal_title": "Change username", "username_edit_placeholder": "Username", - "username_edit_description_md": "Choose a username so that other people can find you on **Telegram** and message you without knowing your phone number.\n\nYou can use a-z, 0-9 and underscores.", + "username_edit_description_md": "You can choose a username on **Telegram**. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use a-z, 0-9 and underscores. Minimum length is 5 characters.", "username_edit_submit": "Save", "username_edit_submit_active": "Saving...", @@ -214,7 +214,8 @@ "error_modal_photo_too_small_description": "The photo you provided is too small.", "error_modal_no_phone_user_description_md": "Sorry, there is no **Telegram** account with the phone number you provided.", "error_modal_no_phone_users_description_md": "Sorry, there are no **Telegram** accounts with the phone numbers you provided.", - "error_modal_phonebook_required_description": "Telegram needs access to phonebook to import contacts.", + "error_modal_username_invalid_description": "Sorry, this username is not allowed.", + "error_modal_username_occupied_description": "Sorry, this username is already taken.", "error_modal_bad_request_description": "One of the params is missing or invalid.", "error_modal_unauthorized_description": "This action requires authorization access. Please {login-link: log in}.", diff --git a/app/partials/desktop/changelog_modal.html b/app/partials/desktop/changelog_modal.html index d813d5af..26a87c3f 100644 --- a/app/partials/desktop/changelog_modal.html +++ b/app/partials/desktop/changelog_modal.html @@ -24,7 +24,7 @@