feat(frontend): locale for dates and tooltip for copy link button (#492)

* Add tooltip for copy button

* Set locale globally for moment.js

* format

* remove debugging log

* refactor: rename translation key

---------

Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
Leo Li
2024-06-10 17:01:59 +08:00
committed by GitHub
parent 962ec27df4
commit 1c7832ad1f
26 changed files with 3954 additions and 2008 deletions

View File

@@ -29,6 +29,8 @@ import Config from "../types/config.type";
import { CurrentUser } from "../types/user.type";
import i18nUtil from "../utils/i18n.util";
import userPreferences from "../utils/userPreferences.util";
import "moment/min/locales";
import moment from "moment";
const excludeDefaultLayoutRoutes = ["/admin/config/[category]"];
@@ -84,6 +86,7 @@ function App({ Component, pageProps }: AppProps) {
};
const language = useRef(pageProps.language);
moment.locale(language.current);
return (
<>