From 787cb6cabb59d03442b0ab59adde6bbe23ad6415 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Wed, 5 Aug 2015 18:27:08 -0500 Subject: [PATCH] Final adjustments to PR - Rename strings to make them easier to expand upon in the future - adjust line break formatting - remove terniary operator --- common/locales/en/tasks.json | 6 +++--- .../views/shared/tasks/edit/dailies/repeat_options.jade | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/common/locales/en/tasks.json b/common/locales/en/tasks.json index f08aa399a4..42c1a82508 100644 --- a/common/locales/en/tasks.json +++ b/common/locales/en/tasks.json @@ -38,9 +38,9 @@ "streakCounter": "Streak Counter", "repeat": "Repeat", "repeatEvery": "Repeat Every", - "repeatEveryHelpTitle": "How often should this task be repeated?", - "repeatDailyHelpContent": "This task will be due every X days. You can set that value below.", - "repeatWeeklyHelpContent": "This task will be due on the highlighted days below. Click on a day to activate/deactivate it.", + "repeatHelpTitle": "How often should this task be repeated?", + "dailyRepeatHelpContent": "This task will be due every X days. You can set that value below.", + "weeklyRepeatHelpContent": "This task will be due on the highlighted days below. Click on a day to activate/deactivate it.", "repeatDays": "Every X Days", "repeatWeek": "On Certain Days of the Week", "day": "Day", diff --git a/website/views/shared/tasks/edit/dailies/repeat_options.jade b/website/views/shared/tasks/edit/dailies/repeat_options.jade index 85832a9351..7f2127af71 100644 --- a/website/views/shared/tasks/edit/dailies/repeat_options.jade +++ b/website/views/shared/tasks/edit/dailies/repeat_options.jade @@ -1,5 +1,6 @@ legend.option-title - span.hint(popover-trigger='mouseenter', popover-title=env.t('repeatEveryHelpTitle'), popover='{{env.t((task.frequency==="daily") ? "repeatDailyHelpContent" : "repeatWeeklyHelpContent")}}')=env.t('repeatEvery') + span.hint(popover-trigger='mouseenter', popover-title=env.t('repeatHelpTitle'), + popover='{{env.t(task.frequency + "RepeatHelpContent")}}')=env.t('repeatEvery') // If frequency is daily ng-form.form-group(name='everyX' ng-if='task.frequency=="daily"') @@ -13,8 +14,9 @@ ng-form.form-group(name='everyX' ng-if='task.frequency=="daily"') // note, does not use data-toggle="buttons-checkbox" - it would interfere with our own click binding mixin dayOfWeek(day, num) li - button(type='button', ng-class='{active: task.repeat.#{day}}', - ng-disabled='task.challenge.id', ng-click='task.repeat.#{day} = !task.repeat.#{day}', tooltip='{{env.t((task.repeat.#{day}) ? "due" : "notDue")}}') + button(type='button', ng-class='{active: task.repeat.#{day}}', + ng-disabled='task.challenge.id', ng-click='task.repeat.#{day} = !task.repeat.#{day}', + tooltip='{{env.t((task.repeat.#{day}) ? "due" : "notDue")}}') | {{::moment.weekdaysMin(#{num})}} +dayOfWeek('su', 0)