From aa8ed5bb3aed7bd1bea53b6ec6c8d683891b617c Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Fri, 8 Feb 2019 14:27:28 +1300 Subject: [PATCH] Fix up translation on badges --- app/views/plantings/_badges.html.haml | 8 +++----- config/locales/en.yml | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/views/plantings/_badges.html.haml b/app/views/plantings/_badges.html.haml index 8bd65b106..1b531dd8b 100644 --- a/app/views/plantings/_badges.html.haml +++ b/app/views/plantings/_badges.html.haml @@ -10,17 +10,15 @@ - else .badge{'data-toggle': "tooltip", 'data-placement': "top", title: 'Days until planting is finished'} = finished_icon - = days_from_now_to_finished(planting) - =t 'label.days' + = t('label.days_until_finished', number: days_from_now_to_finished(planting)) // Harvest times - unless planting.super_late? - if planting.harvest_time? .badge.badge-harvest{'data-toggle': "tooltip", 'data-placement': "top", title: 'Planting is ready for harvesting now'} = harvest_icon - harvesting now + = t('label.harvesting_now') - elsif planting.before_harvest_time? .badge{'data-toggle': "tooltip", 'data-placement': "top", title: 'Predicted days until harvest'} = harvest_icon - = days_from_now_to_first_harvest(planting) - = t 'label.days' + = t('label.days_until_harvest', number: days_from_now_to_first_harvest(planting)) diff --git a/config/locales/en.yml b/config/locales/en.yml index 12942554f..52eca5f35 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -190,6 +190,10 @@ en: number_crops_linktext: "%{count} crops" number_gardens_linktext: "%{count} gardens" number_plantings_linktext: "%{count} times" + label: + days_until_harvest: "%{number} days until harvest" + days_until_finished: "%{number} days until finished" + harvesting_now: harvesting now layouts: header: account: Account