diff --git a/common/locales/en/groups.json b/common/locales/en/groups.json index 9e2eca1615..00c1b86d1d 100644 --- a/common/locales/en/groups.json +++ b/common/locales/en/groups.json @@ -37,7 +37,10 @@ "invitedToNewParty": "You were invited to join a party! Do you want to leave this party and join <%= partyName %>?", "joinNewParty": "Join New Party", "declineInvitation": "Decline Invitation", - "loadingNewParty": "Your party is loading. Please wait...", + "partyLoading1": "Your party is being summoned. Please wait...", + "partyLoading2": "Your party is coming in from battle. Please wait...", + "partyLoading3": "Your party is gathering. Please wait...", + "partyLoading4": "Your party is materializing. Please wait...", "systemMessage": "System Message", "newMsg": "New message in \"<%= name %>\"", "chat": "Chat", diff --git a/website/client/js/controllers/partyCtrl.js b/website/client/js/controllers/partyCtrl.js index 32d0d1226a..c4cd345358 100644 --- a/website/client/js/controllers/partyCtrl.js +++ b/website/client/js/controllers/partyCtrl.js @@ -3,15 +3,21 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','Challenges','$state','$compile','Analytics','Quests','Social', 'Pusher', function($rootScope, $scope, Groups, Chat, User, Challenges, $state, $compile, Analytics, Quests, Social, Pusher) { + var PARTY_LOADING_MESSAGES = 4; + var user = User.user; $scope.type = 'party'; $scope.text = window.env.t('party'); - $scope.group = {loadingParty: true} + $scope.group = {loadingParty: true}; $scope.inviteOrStartParty = Groups.inviteOrStartParty; $scope.loadWidgets = Social.loadWidgets; + // Random message between 1 and PARTY_LOADING_MESSAGES + var partyMessageNumber = Math.floor(Math.random() * PARTY_LOADING_MESSAGES) + 1; + $scope.partyLoadingMessage = window.env.t('partyLoading' + partyMessageNumber); + function handlePartyResponse (group) { $rootScope.party = $scope.group = group; checkForNotifications(); diff --git a/website/views/options/social/party/loading-new-party.jade b/website/views/options/social/party/loading-new-party.jade index 7ca0554566..101fcf42eb 100644 --- a/website/views/options/social/party/loading-new-party.jade +++ b/website/views/options/social/party/loading-new-party.jade @@ -1,5 +1,5 @@ .container-fluid .row.text-center: .col-xs-12 - h2=env.t('loadingNewParty') + h2 {{::partyLoadingMessage}} img(src='/page-loader.gif')