diff --git a/docs/changelogs.md b/docs/changelogs.md index 159492d9..77d47b80 100644 --- a/docs/changelogs.md +++ b/docs/changelogs.md @@ -5,6 +5,20 @@ description: Changelogs for Kener # Changelogs +## v3.0.1 + + + + + + +Here are the changes in this release + +### Features + +- Support for i18n in dates. +- Support of i18n in monitor embeds. Read more [here](/docs/embed#javascript-parameters) + ## v3.0.0 diff --git a/docs/embed.md b/docs/embed.md index 5f811f07..81f4e4ed 100644 --- a/docs/embed.md +++ b/docs/embed.md @@ -34,6 +34,7 @@ You can pass the following parameters to the embed code - `theme`: You can pass `light` or `dark` theme - `monitor`: The monitor url - `bgc`: Background color of the monitor. Only supports hex color codes. DO NOT include the `#` symbol +- `locale`: The locale of the monitor. You can pass the code of the locale you have enabled in your kener settings Replace `[hostname]` with your kener hostname and `[tag]` with your monitor tag. @@ -79,6 +80,7 @@ You can pass the following parameters to the embed code - `theme`: You can pass `light` or `dark` theme - `bgc`: Background color of the monitor. Only supports hex color codes. DO NOT include the `#` symbol +- `locale`: The locale of the monitor. You can pass the code of the locale you have enabled in your kener settings ### Demo diff --git a/docs/i18n.md b/docs/i18n.md index d5e49cf4..6d390641 100644 --- a/docs/i18n.md +++ b/docs/i18n.md @@ -123,6 +123,22 @@ Open `src/lib/locales/locales.json` and add the locale code and the name of the ### Step 3 +Open `src/lib/i18n/client.js` and add the locale code to the `locales` array. + +```js +import { ru, enUS, hi, de, zhCN, vi, ja, nl, da, fr, ko } from "date-fns/locale"; +``` + +This should be valid for the date-fns library. + +Next add a mapping in the `locales` object. + +```js +const locales = { ru, en: enUS, hi, dk: de, "zh-CN": zhCN, vi, ja, nl, dk: da, fr, ko }; +``` + +### Step 4 + Restart the server and you will see a dropdown in the navbar to select the language. diff --git a/docs/roadmap.md b/docs/roadmap.md index 34a095c3..b466bbfa 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -28,10 +28,16 @@ description: Roadmap for Kener ☐ Introduce sitemap.xml -☐ Migrate from moment to date-fns +☑ ~~Migrate from moment to date-fns for status page~~ (moment remains in dashboard. Will remove later) ☑ ~~Create Admin UI~~ Released in (3.0.0) +☐ Webhook customization + +☐ Monitor Update Screen + +☐ i18n for admin dashboard + --- Request a feature or start a discussion [here](https://github.com/rajnandan1/kener/discussions/119) diff --git a/embed.html b/embed.html index 9a2a57fe..434fe164 100644 --- a/embed.html +++ b/embed.html @@ -14,7 +14,7 @@ Hello world