feat(dashboard,draft-order): Remove hardcoded strings and replace with translations in draft orders list page (#14400)

## Summary

**What** — What changes are introduced in this PR?

Add translations management to draft orders list page.

**Why** — Why are these changes relevant or necessary?  

We were using hardcoded English strings.

**How** — How have these changes been implemented?

Remove hardcoded strings and replace them with dynamic translations.

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

*Please provide answer here*

---

## Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.  
This helps with documentation and ensures maintainers can quickly understand and verify the change.

```ts
// Example usage
```

---

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [x] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.

closes #14377
This commit is contained in:
Nicolas Gorga
2026-01-02 07:44:42 -03:00
committed by GitHub
parent bf4cc12545
commit 242f1d7d7f
5 changed files with 56 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ import { useSalesChannels } from "../../hooks/api/sales-channels"
import { useDataTableDateFilters } from "../../hooks/common/use-data-table-date-filters"
import { useQueryParams } from "../../hooks/common/use-query-params"
import { getFullDate } from "../../lib/utils/date-utils"
import { useTranslation } from "react-i18next"
const PAGE_SIZE = 20
@@ -26,6 +27,7 @@ export const handle = {
}
const List = () => {
const { t } = useTranslation()
const queryParams = useDraftOrderTableQuery({
pageSize: PAGE_SIZE,
})
@@ -60,20 +62,20 @@ const List = () => {
isLoading={isPending}
pageSize={PAGE_SIZE}
rowCount={count}
heading="Draft Orders"
heading={t("draftOrders.domain")}
action={{
label: "Create",
label: t("actions.create"),
to: "create",
}}
rowHref={(row) => `${row.id}`}
emptyState={{
empty: {
heading: "No draft orders found",
description: "Create a new draft order to get started.",
heading: t("draftOrders.list.noRecordsMessage"),
description: t("draftOrders.list.description"),
},
filtered: {
heading: "No results found",
description: "No draft orders match your filter criteria.",
heading: t("draftOrders.list.filtered.heading"),
description: t("draftOrders.list.filtered.description"),
},
}}
/>