summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-05-10 14:30:59 -0700
committerFrédéric Guillot <fred@kanboard.net>2018-05-10 14:30:59 -0700
commiteafaa4b03770a73080520952112905eb8135a62f (patch)
treeb3c721ca2f3800c8f0694137762fd46ffd16b3de /app/Template
parentecc9d80671fdfd4434ac7ecf3113507e6a06da64 (diff)
Make hardcoded hours string translatable
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/notification/subtask_update.php5
-rw-r--r--app/Template/subtask/timer.php6
-rw-r--r--app/Template/task_internal_link/table.php6
3 files changed, 10 insertions, 7 deletions
diff --git a/app/Template/notification/subtask_update.php b/app/Template/notification/subtask_update.php
index a6c4e9cc..a6956792 100644
--- a/app/Template/notification/subtask_update.php
+++ b/app/Template/notification/subtask_update.php
@@ -10,10 +10,11 @@
<li>
<?= t('Time tracking:') ?>
<?php if (! empty($subtask['time_spent'])): ?>
- <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <?= t('%sh spent', n($subtask['time_spent'])) ?>
<?php endif ?>
+ <?php if (! empty($subtask['time_spent']) && ! empty($subtask['time_estimated'])): ?>/<?php endif ?>
<?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?= t('%sh estimated', n($subtask['time_estimated'])) ?>
<?php endif ?>
</li>
<?php endif ?>
diff --git a/app/Template/subtask/timer.php b/app/Template/subtask/timer.php
index 2102e6cc..0f17fc73 100644
--- a/app/Template/subtask/timer.php
+++ b/app/Template/subtask/timer.php
@@ -1,10 +1,12 @@
<span class="subtask-time-tracking">
<?php if (! empty($subtask['time_spent'])): ?>
- <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <?= t('%sh spent', n($subtask['time_spent'])) ?>
<?php endif ?>
+ <?php if (! empty($subtask['time_spent']) && ! empty($subtask['time_estimated'])): ?>/<?php endif ?>
+
<?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?= t('%sh estimated', n($subtask['time_estimated'])) ?>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('SubtaskController', 'edit', $task['project_id']) && $subtask['user_id'] == $this->user->getId()): ?>
diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php
index 9ef20645..6a11be60 100644
--- a/app/Template/task_internal_link/table.php
+++ b/app/Template/task_internal_link/table.php
@@ -64,11 +64,11 @@
</td>
<td>
<?php if (! empty($link['task_time_spent'])): ?>
- <strong><?= $this->text->e($link['task_time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <?= t('%sh spent', n($subtask['time_spent'])) ?>
<?php endif ?>
-
+ <?php if (! empty($subtask['time_spent']) && ! empty($subtask['time_estimated'])): ?>/<?php endif ?>
<?php if (! empty($link['task_time_estimated'])): ?>
- <strong><?= $this->text->e($link['task_time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?= t('%sh estimated', n($subtask['time_estimated'])) ?>
<?php endif ?>
</td>
</tr>