Skip to content

Commit 031178c

Browse files
committed
update translations
1 parent ab964e2 commit 031178c

File tree

3 files changed

+52
-32
lines changed

3 files changed

+52
-32
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
2-
"button.new-outbound-shipment": "New Outbound Shipment",
3-
"button.order-more": "Order more",
4-
"heading.expiring-stock": "Expiring stock",
5-
"heading.shipments-to-be-picked": "Shipments to be picked",
6-
"heading-stock": "Stock",
7-
"heading.stock-levels": "Stock levels",
8-
"label.expired": "Expired batch(es)",
9-
"label.expiring-soon": "batches close to expiry",
10-
"label.low-stock-items": "Item with less than 3 months of stock",
11-
"label.items-no-stock": "Items with no stock",
12-
"label.this-week": "This week",
13-
"label.today": "Today",
14-
"label.total-items": "Total items"
2+
"button.new-outbound-shipment": "New Outbound Shipment",
3+
"button.order-more": "Order more",
4+
"heading.expiring-stock": "Expiring stock",
5+
"heading.shipments-to-be-picked": "Shipments to be picked",
6+
"heading-stock": "Stock",
7+
"heading.stock-levels": "Stock levels",
8+
"label.expired_one": "Expired batch",
9+
"label.expired_other": "Expired batches",
10+
"label.expiring-soon_one": "Batch close to expiry",
11+
"label.expiring-soon_other": "Batches close to expiry",
12+
"label.low-stock-items_one": "Item with less than 3 months of stock",
13+
"label.low-stock-items_other": "Items with less than 3 months of stock",
14+
"label.items-no-stock_one": "Item with no stock",
15+
"label.items-no-stock_other": "Items with no stock",
16+
"label.this-week": "This week",
17+
"label.today": "Today",
18+
"label.total-items_one": "Total item",
19+
"label.total-items_other": "Total items"
1520
}
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
2-
"button.new-outbound-shipment": "Nouvelle Livraison sortante",
3-
"button.order-more": "Nouvelle commande",
4-
"heading-stock": "Stock",
5-
"heading.expiring-stock": "Lots sur le point d'expirer",
6-
"heading.shipments-to-be-picked": "Livraisons sortantes à prélever",
7-
"heading.stock-levels": "États des Stocks",
8-
"label.expired": "Lots expiré(s)",
9-
"label.expiring-soon": "lots sur le points d'expirer",
10-
"label.items-no-stock": "Articles en rupture de stock",
11-
"label.low-stock-items": "Article(s) avec moins de 3 mois de stock",
12-
"label.this-week": "Cette Semaine",
13-
"label.today": "Aujourd'hui",
14-
"label.total-items": "articles"
2+
"button.new-outbound-shipment": "Nouvelle Livraison sortante",
3+
"button.order-more": "Nouvelle commande",
4+
"heading.expiring-stock": "Lots sur le point d'expirer",
5+
"heading.shipments-to-be-picked": "Livraisons sortantes à prélever",
6+
"heading-stock": "Stock",
7+
"heading.stock-levels": "États des Stocks",
8+
"label.expired_one": "Lots expiré",
9+
"label.expired_other": "Lots expirés",
10+
"label.expiring-soon_one": "Lot sur le points d'expirer",
11+
"label.expiring-soon_other": "Lots sur le points d'expirer",
12+
"label.items-no-stock_one": "Article en rupture de stock",
13+
"label.items-no-stock_other": "Articles en rupture de stock",
14+
"label.low-stock-items_one": "Article avec moins de 3 mois de stock",
15+
"label.low-stock-items_other": "Articles avec moins de 3 mois de stock",
16+
"label.this-week": "Cette Semaine",
17+
"label.today": "Aujourd'hui",
18+
"label.total-items_one": "Article",
19+
"label.total-items_other": "Articles"
1520
}

client/packages/dashboard/src/widgets/StockWidget.tsx

+16-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const LOW_MOS_THRESHOLD = 3;
2020
export const StockWidget: React.FC = () => {
2121
const modalControl = useToggle(false);
2222
const { error } = useNotification();
23-
const t = useTranslation(['dashboard']);
23+
const t = useTranslation('dashboard');
2424
const formatNumber = useFormatNumber();
2525
const { data: expiryData, isLoading: isExpiryLoading } =
2626
useDashboard.statistics.stock();
@@ -79,11 +79,15 @@ export const StockWidget: React.FC = () => {
7979
title={t('heading.expiring-stock')}
8080
stats={[
8181
{
82-
label: t('label.expired', { ns: 'dashboard' }),
82+
label: t('label.expired', {
83+
count: Math.round(expiryData?.expired || 0),
84+
}),
8385
value: formatNumber.round(expiryData?.expired),
8486
},
8587
{
86-
label: t('label.expiring-soon'),
88+
label: t('label.expiring-soon', {
89+
count: Math.round(expiryData?.expiringSoon || 0),
90+
}),
8791
value: formatNumber.round(expiryData?.expiringSoon),
8892
},
8993
]}
@@ -95,15 +99,21 @@ export const StockWidget: React.FC = () => {
9599
title={t('heading.stock-levels')}
96100
stats={[
97101
{
98-
label: t('label.total-items', { ns: 'dashboard' }),
102+
label: t('label.total-items', {
103+
count: Math.round(itemCountsData?.total || 0),
104+
}),
99105
value: formatNumber.round(itemCountsData?.total || 0),
100106
},
101107
{
102-
label: t('label.items-no-stock'),
108+
label: t('label.items-no-stock', {
109+
count: Math.round(itemCountsData?.noStock || 0),
110+
}),
103111
value: formatNumber.round(itemCountsData?.noStock || 0),
104112
},
105113
{
106-
label: t('label.low-stock-items'),
114+
label: t('label.low-stock-items', {
115+
count: Math.round(itemCountsData?.lowStock || 0),
116+
}),
107117
value: formatNumber.round(itemCountsData?.lowStock || 0),
108118
},
109119
]}

0 commit comments

Comments
 (0)