Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
feat: implement translation for days (#784)
Jasper Platenburg6596e6893e76
diff --git a/web/src/components/UsageHeatMap.tsx b/web/src/components/UsageHeatMap.tsxindex ccf612259..4fd10c371 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 (<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) => {diff --git a/web/src/locales/de.json b/web/src/locales/de.jsonindex a326f817e..0ab6e1af8 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.jsonindex 654306d60..7390742a1 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.jsonindex f53d026e2..1b1d01caf 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 filediff --git a/web/src/locales/fr.json b/web/src/locales/fr.jsonindex ac5f8570e..3bfb9bc75 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.jsonindex 7bc798486..3bef67a5a 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.jsonindex 5a868876c..20bfee047 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.jsonindex 0519b77c4..bc53243f4 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.jsonindex 5d6196453..aea0c4688 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": "日"}}