diff --git a/web/src/components/UsageHeatMap.tsx b/web/src/components/UsageHeatMap.tsx index ccf61225..4fd10c37 100644 --- a/web/src/components/UsageHeatMap.tsx +++ b/web/src/components/UsageHeatMap.tsx @@ -1,5 +1,6 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { useLocationStore, useMemoStore, useUserStore } from "../store/module"; +import { useTranslation } from "react-i18next"; import { getMemoStats } from "../helpers/api"; import { DAILY_TIMESTAMP } from "../helpers/consts"; import * as utils from "../helpers/utils"; @@ -27,6 +28,7 @@ interface DailyUsageStat { } const UsageHeatMap = () => { + const { t } = useTranslation(); const locationStore = useLocationStore(); const userStore = useUserStore(); const memoStore = useMemoStore(); @@ -97,13 +99,13 @@ const UsageHeatMap = () => { return (
- Sun + {t("days.sun")} - Tue + {t("days.tue")} - Thu + {t("days.thu")} - Sat + {t("days.sat")}
{allStat.map((v, i) => { diff --git a/web/src/locales/de.json b/web/src/locales/de.json index a326f817..0ab6e1af 100644 --- a/web/src/locales/de.json +++ b/web/src/locales/de.json @@ -232,5 +232,21 @@ "succeed-update-customized-profile": "Succeed to update customized profile", "succeed-update-additional-script": "Succeed to update additional script", "update-succeed": "Update succeed" + }, + "days": { + "monday": "Montag", + "mon": "Mo", + "tuesday": "Dienstag", + "tue": "Di", + "wednesday": "Mittwoch", + "wed": "Mi", + "thursday": "Donnerstag", + "thu": "Do", + "friday": "Freitag", + "fri": "Fr", + "saturday": "Samstag", + "sat": "Sa", + "sunday": "Sonntag", + "sun": "So" } } diff --git a/web/src/locales/en.json b/web/src/locales/en.json index 654306d6..7390742a 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -232,5 +232,21 @@ "succeed-update-customized-profile": "Succeed to update customized profile", "succeed-update-additional-script": "Succeed to update additional script", "update-succeed": "Update succeed" + }, + "days": { + "monday": "Monday", + "mon": "Mon", + "tuesday": "Tuesday", + "tue": "Tue", + "wednesday": "Wednesday", + "wed": "Wed", + "thursday": "Thursday", + "thu": "Thu", + "friday": "Friday", + "fri": "Fri", + "saturday": "Saturday", + "sat": "Sat", + "sunday": "Sunday", + "sun": "Sun" } } diff --git a/web/src/locales/es.json b/web/src/locales/es.json index f53d026e..1b1d01ca 100644 --- a/web/src/locales/es.json +++ b/web/src/locales/es.json @@ -232,5 +232,21 @@ "succeed-update-customized-profile": "Succeed to update customized profile", "succeed-update-additional-script": "Succeed to update additional script", "update-succeed": "Update succeed" + }, + "days": { + "monday": "Lunes", + "mon": "Lun", + "tuesday": "Martes", + "tue": "Mart", + "wednesday": "Miércoles", + "wed": "Miérc", + "thursday": "Jueves", + "thu": "Juev", + "friday": "Viernes", + "fri": "Vier", + "saturday": "Sábado", + "sat": "Sáb", + "sunday": "Domingo", + "sun": "Dom" } } \ No newline at end of file diff --git a/web/src/locales/fr.json b/web/src/locales/fr.json index ac5f8570..3bfb9bc7 100644 --- a/web/src/locales/fr.json +++ b/web/src/locales/fr.json @@ -227,5 +227,21 @@ "succeed-update-customized-profile": "Succeed to update customized profile", "succeed-update-additional-script": "Succeed to update additional script", "update-succeed": "Update succeed" + }, + "days": { + "monday": "Lundi", + "mon": "Lu", + "tuesday": "Mardi", + "tue": "Ma", + "wednesday": "Mercredi", + "wed": "Me", + "thursday": "Jeudi", + "thu": "Je", + "friday": "Vendredi", + "fri": "Ve", + "saturday": "Samedi", + "sat": "Sa", + "sunday": "Dimanche", + "sun": "Di" } } diff --git a/web/src/locales/nl.json b/web/src/locales/nl.json index 7bc79848..3bef67a5 100644 --- a/web/src/locales/nl.json +++ b/web/src/locales/nl.json @@ -219,5 +219,21 @@ "succeed-update-customized-profile": "Succeed to update customized profile", "succeed-update-additional-script": "Succeed to update additional script", "update-succeed": "Update succeed" + }, + "days": { + "monday": "Maandag", + "mon": "ma", + "tuesday": "Dinsdag", + "tue": "di", + "wednesday": "Woensdag", + "wed": "woe", + "thursday": "Donderdag", + "thu": "don", + "friday": "Vrijdag", + "fri": "vrij", + "saturday": "Zaterdag", + "sat": "zat", + "sunday": "Zondag", + "sun": "zon" } } diff --git a/web/src/locales/sv.json b/web/src/locales/sv.json index 5a868876..20bfee04 100644 --- a/web/src/locales/sv.json +++ b/web/src/locales/sv.json @@ -232,5 +232,21 @@ "succeed-update-customized-profile": "Succeed to update customized profile", "succeed-update-additional-script": "Succeed to update additional script", "update-succeed": "Update succeed" + }, + "days": { + "monday": "Måndag", + "mon": "Mån", + "tuesday": "Tisdag", + "tue": "Tis", + "wednesday": "Onsdag", + "wed": "Ons", + "thursday": "Torsdag", + "thu": "Tors", + "friday": "Fredag", + "fri": "Fre", + "saturday": "Lördag", + "sat": "Lör", + "sunday": "Söndag", + "sun": "Sön" } } diff --git a/web/src/locales/vi.json b/web/src/locales/vi.json index 0519b77c..bc53243f 100644 --- a/web/src/locales/vi.json +++ b/web/src/locales/vi.json @@ -226,5 +226,21 @@ "succeed-update-customized-profile": "Succeed to update customized profile", "succeed-update-additional-script": "Succeed to update additional script", "update-succeed": "Update succeed" + }, + "days": { + "monday": "thứ hai", + "mon": "T2", + "tuesday": "thứ ba", + "tue": "T3", + "wednesday": "thứ tư", + "wed": "T4", + "thursday": "thứ năm", + "thu": "T5", + "friday": "thứ sáu", + "fri": "T6", + "saturday": "thứ bảy", + "sat": "T7", + "sunday": "chủ nhật", + "sun": "CN" } } diff --git a/web/src/locales/zh.json b/web/src/locales/zh.json index 5d619645..aea0c468 100644 --- a/web/src/locales/zh.json +++ b/web/src/locales/zh.json @@ -232,5 +232,21 @@ "succeed-update-customized-profile": "更新自定义配置文件成功", "succeed-update-additional-script": "更新附加脚本成功", "update-succeed": "更新成功" + }, + "days": { + "monday": "星期一", + "mon": "一", + "tuesday": "星期二", + "tue": "二", + "wednesday": "星期三", + "wed": "三", + "thursday": "星期四", + "thu": "四", + "friday": "星期五", + "fri": "五", + "saturday": "星期六", + "sat": "六", + "sunday": "星期天", + "sun": "日" } }