Skip to content

Commit

Permalink
Add translations for statuses and pagination table
Browse files Browse the repository at this point in the history
  • Loading branch information
danloa committed Nov 5, 2024
1 parent 31090b4 commit 41ae0d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
13 changes: 9 additions & 4 deletions resources/js/components/shared/PaginationTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
>

<span class="pagination-total">
of {{ totalPageCount }}
{{ totalPageCountLabel }}
</span>

<b-button
Expand Down Expand Up @@ -125,14 +125,19 @@ export default {
totalPageCount() {
return this.meta.total_pages;
},
totalPageCountLabel() {
return `${this.$t("of")} ${this.meta.total_pages}`;
},
totalItems() {
if (this.meta.total === 1) {
return `${this.meta.total} item`;
//return `${this.meta.total} ${this.$t("item")}`;
return this.$t('{{count}} Item', { count: this.meta.total });
}
return `${this.meta.total} items`;
return this.$t('{{count}} Items', { count: this.meta.total });
//return `${this.meta.total} ${this.$t("items")}`;
},
perPageButton() {
return `${this.meta.per_page} per Page`;
return `${this.meta.per_page} ${this.$t("Per page")}`;
},
pageInputPlaceholder() {
return `${this.currentPage}`;
Expand Down
8 changes: 4 additions & 4 deletions resources/js/tasks/components/TasksList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -684,19 +684,19 @@ export default {
},
formatStatus(props) {
let color = "success";
let label = "In Progress";
let label = this.$t("In Progress");
if (props.status === "ACTIVE") {
if (props.is_self_service) {
color = "danger";
label = "Self Service";
label = this.$t("Self Service");
} else if (props.advanceStatus === "overdue") {
color = "danger";
label = "Overdue";
label = this.$t("Overdue");
}
} else if (props.status === "CLOSED") {
color = "primary";
label = "Completed";
label = this.$t("Completed");
}
return `
Expand Down

0 comments on commit 41ae0d0

Please sign in to comment.