Skip to content

Commit

Permalink
fix(PWA): Fix translation of durations
Browse files Browse the repository at this point in the history
  • Loading branch information
cogk committed Oct 17, 2024
1 parent 5dc263a commit d55b368
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/ExpenseClaimItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const status = computed(() => {
const claimTitle = computed(() => {
let title = __(props.doc.expense_type)
if (props.doc.total_expenses > 1) {
title = __("{0} & {1} more", null, [title, props.doc.total_expenses - 1])
title = __("{0} & {1} more", [title, props.doc.total_expenses - 1])
}
return title
})
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/components/LeaveRequestItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
<div class="text-xs font-normal text-gray-500">
<span>{{ props.doc.leave_dates || getLeaveDates(props.doc) }}</span>
<span class="whitespace-pre"> &middot; </span>
<span class="whitespace-nowrap">{{
`${props.doc.total_leave_days}${__("d", null, "Leave Days")}`
}}</span>
<span class="whitespace-nowrap">{{ __("{0}d", [props.doc.total_leave_days]) }}</span>
</div>
</div>
</template>
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/components/ShiftAssignmentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<div class="text-xs font-normal text-gray-500">
<span>{{ props.doc.shift_dates || getShiftDates(props.doc) }}</span>
<span v-if="props.doc.end_date" class="whitespace-pre"> &middot; </span>
<span v-if="props.doc.end_date" class="whitespace-nowrap">{{
`${props.doc.total_shift_days || getTotalShiftDays(props.doc)}d`
}}</span>
<span v-if="props.doc.end_date" class="whitespace-nowrap">{{ __("{0}d", [props.doc.total_shift_days || getTotalShiftDays(props.doc)]) }}</span>
</div>
</div>
</template>
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/components/ShiftRequestItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
<span>{{ props.doc.shift_dates || getDates(props.doc) }}</span>
<span v-if="props.doc.to_date">
<span class="whitespace-pre"> &middot; </span>
<span class="whitespace-nowrap">{{
`${props.doc.total_shift_days || getTotalDays(props.doc)}d`
}}</span>
<span class="whitespace-nowrap">{{ __("{0}d", [props.doc.total_shift_days || getTotalDays(props.doc)]) }}</span>
</span>
</div>
</div>
Expand Down

0 comments on commit d55b368

Please sign in to comment.