mirror of
https://github.com/usememos/memos.git
synced 2025-02-21 05:40:57 +01:00
feat: implement translation for days (#784)
implement trranslation for weekdays Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
parent
b6fe4d914e
commit
6596e6893e
@ -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 (
|
||||
<div className="usage-heat-map-wrapper" ref={containerElRef}>
|
||||
<div className="day-tip-text-container">
|
||||
<span className="tip-text">Sun</span>
|
||||
<span className="tip-text">{t("days.sun")}</span>
|
||||
<span className="tip-text"></span>
|
||||
<span className="tip-text">Tue</span>
|
||||
<span className="tip-text">{t("days.tue")}</span>
|
||||
<span className="tip-text"></span>
|
||||
<span className="tip-text">Thu</span>
|
||||
<span className="tip-text">{t("days.thu")}</span>
|
||||
<span className="tip-text"></span>
|
||||
<span className="tip-text">Sat</span>
|
||||
<span className="tip-text">{t("days.sat")}</span>
|
||||
</div>
|
||||
<div className="usage-heat-map">
|
||||
{allStat.map((v, i) => {
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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": "日"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user