From d70ff4e5a388f1c1736fc11a0a2ecb1720a038fe Mon Sep 17 00:00:00 2001 From: Alys Date: Tue, 26 Sep 2017 22:44:49 +1000 Subject: [PATCH] new client various fixes: all users now see challenge progress, changes to `create` strings, etc (#9078) * adjust how User > Profile is referred to * change "Create" to "Add Task" in a Challenge's page * remove commented-out code for making a Group Plan cost Gems (there should be no Gem cost) * split 'create' locales string into multiple strings for different purposes - Allows text to be changed individually for each purpose. - Assists translators in determining the best translation. - Makes it easier to find locations in code for each string. * remove "public" option for Group Plan creation modal * allow all users to see challenge participant progress --- .../components/challenges/challengeDetail.vue | 6 +++--- .../components/group-plans/taskInformation.vue | 2 +- website/client/components/groups/discovery.vue | 2 +- website/client/components/groups/groupPlan.vue | 15 ++------------- website/client/components/groups/myGuilds.vue | 2 +- website/client/components/tasks/user.vue | 2 +- website/common/locales/en/challenge.json | 3 +++ website/common/locales/en/groups.json | 3 +++ website/common/locales/en/settings.json | 2 +- website/common/locales/en/tasks.json | 1 + 10 files changed, 17 insertions(+), 21 deletions(-) diff --git a/website/client/components/challenges/challengeDetail.vue b/website/client/components/challenges/challengeDetail.vue index c2fed0ffd9..446b24f0c6 100644 --- a/website/client/components/challenges/challengeDetail.vue +++ b/website/client/components/challenges/challengeDetail.vue @@ -28,7 +28,7 @@ .svg-icon.gem-icon(v-html="icons.gemIcon") | {{challenge.prize}} .details(v-once) {{$t('prize')}} - .row.leader-actions(v-if='isLeader') + .row.challenge-actions .col-7.offset-5 span.view-progress strong {{ $t('viewProgressOf') }} @@ -36,7 +36,7 @@ b-dropdown-item(v-for="member in members", :key="member._id", @click="openMemberProgressModal(member._id)") | {{ member.profile.name }} span(v-if='isLeader') - b-dropdown.create-dropdown(:text="$t('create')", :variant="'success'") + b-dropdown.create-dropdown(:text="$t('addTaskToChallenge')", :variant="'success'") b-dropdown-item(v-for="type in columns", :key="type", @click="createTask(type)") | {{$t(type)}} task-modal( @@ -156,7 +156,7 @@ margin-top: 2em; } - .leader-actions { + .challenge-actions { margin-top: 1em; .view-progress { diff --git a/website/client/components/group-plans/taskInformation.vue b/website/client/components/group-plans/taskInformation.vue index 1e1a35f995..1a85eb3d7c 100644 --- a/website/client/components/group-plans/taskInformation.vue +++ b/website/client/components/group-plans/taskInformation.vue @@ -57,7 +57,7 @@ b-dropdown(:right="true", :variant="'success'") div(slot="button-content") .svg-icon.positive(v-html="icons.positive") - | {{ $t('create') }} + | {{ $t('addTaskToGroupPlan') }} b-dropdown-item(v-for="type in columns", :key="type", @click="createTask(type)") span.dropdown-icon-item(v-once) span.svg-icon.inline(v-html="icons[type]") diff --git a/website/client/components/groups/discovery.vue b/website/client/components/groups/discovery.vue index f548dcee4a..aef8152984 100644 --- a/website/client/components/groups/discovery.vue +++ b/website/client/components/groups/discovery.vue @@ -13,7 +13,7 @@ b-dropdown-item(v-for='sortOption in sortOptions', :key="sortOption.value", @click='sort(sortOption.value)') {{sortOption.text}} button.btn.btn-secondary.create-group-button.float-right(@click='createGroup()') .svg-icon.positive-icon(v-html="icons.positiveIcon") - span(v-once) {{$t('create')}} + span(v-once) {{$t('createGuild2')}} .row .col-md-12 public-guild-item(v-for="guild in filteredGuilds", :key='guild._id', :guild="guild", :display-leave='true') diff --git a/website/client/components/groups/groupPlan.vue b/website/client/components/groups/groupPlan.vue index 3811832388..c0a0756669 100644 --- a/website/client/components/groups/groupPlan.vue +++ b/website/client/components/groups/groupPlan.vue @@ -86,31 +86,20 @@ div label(for='new-group-description') {{ $t('description') }} textarea.form-control#new-group-description.option-content(cols='3', :placeholder="$t('description')", v-model='newGroup.description') .form-group(v-if='type === "guild"') - .radio - label - input(type='radio', name='new-group-privacy', value='public', v-model='newGroup.privacy') - | {{ $t('public') }} .radio label input(type='radio', name='new-group-privacy', value='private', v-model='newGroup.privacy') | {{ $t('inviteOnly') }} - // @TODO Does it cost gems for a group plan? - .form-group - input.btn.btn-default(type='submit', :disabled='!newGroup.privacy && !newGroup.name', :value="$t('create')") - span.gem-cost {{ '4 ' + $t('gems') }} - p - small {{ $t('gemCost') }} - .form-group .checkbox label input(type='checkbox', v-model='newGroup.leaderOnly.challenges') | {{ $t('leaderOnlyChallenges') }} .form-group(v-if='type === "party"') - button.btn.btn-default.form-control(@click='createGroup()', :value="$t('create')") + button.btn.btn-default.form-control(@click='createGroup()', :value="$t('createGroupPlan')") .form-group - button.btn.btn-primary.btn-lg.btn-block(@click="createGroup()", :disabled="!newGroupIsReady") {{ $t('create') }} + button.btn.btn-primary.btn-lg.btn-block(@click="createGroup()", :disabled="!newGroupIsReady") {{ $t('createGroupPlan') }} .col-12(v-if='activePage === PAGES.PAY') .payment-providers h3 Choose your payment method diff --git a/website/client/components/groups/myGuilds.vue b/website/client/components/groups/myGuilds.vue index b1834ca398..6ad253820d 100644 --- a/website/client/components/groups/myGuilds.vue +++ b/website/client/components/groups/myGuilds.vue @@ -17,7 +17,7 @@ .col-4 button.btn.btn-secondary.create-group-button.float-right(@click='createGroup()') .svg-icon.positive-icon(v-html="icons.positiveIcon") - span(v-once) {{$t('create')}} + span(v-once) {{$t('createGuild2')}} // @TODO: Add when we implement recent activity .float-right span.dropdown-label {{ $t('sortBy') }} b-dropdown(:text="$t('sort')", right=true) diff --git a/website/client/components/tasks/user.vue b/website/client/components/tasks/user.vue index 6882a409f3..0055793129 100644 --- a/website/client/components/tasks/user.vue +++ b/website/client/components/tasks/user.vue @@ -65,7 +65,7 @@ b-dropdown(:right="true", :variant="'success'") div(slot="button-content") .svg-icon.positive(v-html="icons.positive") - | {{ $t('create') }} + | {{ $t('addTaskToUser') }} b-dropdown-item(v-for="type in columns", :key="type", @click="createTask(type)") span.dropdown-icon-item(v-once) span.svg-icon.inline(v-html="icons[type]", :class='`icon_${type}`') diff --git a/website/common/locales/en/challenge.json b/website/common/locales/en/challenge.json index c9a3856408..243dbef1ea 100644 --- a/website/common/locales/en/challenge.json +++ b/website/common/locales/en/challenge.json @@ -13,8 +13,10 @@ "challengeWinner": "Was the winner in the following challenges", "challenges": "Challenges", "challengesLink": "Challenges", + "noChallenges": "No challenges yet, visit", "toCreate": "to create one.", + "selectWinner": "Select a winner and close the challenge:", "deleteOrSelect": "Delete or select winner", "endChallenge": "End Challenge", @@ -29,6 +31,7 @@ "either": "Either", "createChallenge": "Create Challenge", "createChallengeAddTasks": "Add Challenge Tasks", + "addTaskToChallenge": "Add Task", "discard": "Discard", "challengeTitle": "Challenge Title", "challengeTag": "Tag Name", diff --git a/website/common/locales/en/groups.json b/website/common/locales/en/groups.json index b6099ab6c1..949f10c1ca 100644 --- a/website/common/locales/en/groups.json +++ b/website/common/locales/en/groups.json @@ -43,6 +43,7 @@ "wantExistingParty": "Want to join an existing party? Go to the <%= linkStart %>Party Wanted Guild<%= linkEnd %> and post this User ID:", "joinExistingParty": "Join Someone Else's Party", "needPartyToStartQuest": "Whoops! You need to create or join a party before you can start a quest!", + "createGroupPlan": "Create", "create": "Create", "userId": "User ID", "invite": "Invite", @@ -92,6 +93,7 @@ "search": "Search", "publicGuilds": "Public Guilds", "createGuild": "Create Guild", + "createGuild2": "Create", "guild": "Guild", "guilds": "Guilds", "guildsLink": "Guilds", @@ -315,6 +317,7 @@ "userMustBeMember": "User must be a member", "userIsNotManager": "User is not manager", "canOnlyApproveTaskOnce": "This task has already been approved.", + "addTaskToGroupPlan": "Create", "leaderMarker": " - Leader", "managerMarker": " - Manager", "joinedGuild": "Joined a Guild", diff --git a/website/common/locales/en/settings.json b/website/common/locales/en/settings.json index 33a3e9b260..04735c4671 100644 --- a/website/common/locales/en/settings.json +++ b/website/common/locales/en/settings.json @@ -106,7 +106,7 @@ "email": "Email", "registerWithSocial": "Register with <%= network %>", "registeredWithSocial": "Registered with <%= network %>", - "loginNameDescription": "This is what you use to login to Habitica. To change it, use the form below. If instead you want to change the Display Name that appears on your avatar and in chat messages, go to User->Profile and click the Edit button.", + "loginNameDescription": "This is what you use to log in to Habitica. To change it, use the form below. If instead you want to change the Display Name that appears on your avatar and in chat messages, go to the User Icon > Profile and click the Edit button.", "emailNotifications": "Email Notifications", "wonChallenge": "You won a Challenge!", "newPM": "Received Private Message", diff --git a/website/common/locales/en/tasks.json b/website/common/locales/en/tasks.json index 53587bc1b6..5fd1788135 100644 --- a/website/common/locales/en/tasks.json +++ b/website/common/locales/en/tasks.json @@ -6,6 +6,7 @@ "addsingle": "Add Single", "editATask": "Edit a <%= type %>", "createTask": "Create <%= type %>", + "addTaskToUser": "Create", "scheduled": "Scheduled", "theseAreYourTasks": "These are your <%= taskType %>", "habit": "Habit",