From dc06315566fc1f940397645b519a4af85c0827b6 Mon Sep 17 00:00:00 2001 From: rvveber Date: Tue, 8 Apr 2025 16:42:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D(documentation)=20adds=20customizat?= =?UTF-8?q?ion=20for=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of customization PoC Signed-off-by: Robin Weber --- CHANGELOG.md | 4 ++++ docs/theming.md | 14 ++++++++++++++ src/helm/env.d/dev/configuration/theme/demo.json | 8 ++++++++ 3 files changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c831e4ee..7d2ce075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to ## [Unreleased] +### Added + +- ✨(frontend) add customization for translations #857 + ## [3.3.0] - 2025-05-06 ### Added diff --git a/docs/theming.md b/docs/theming.md index 2c511d71..ab30bb50 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -53,4 +53,18 @@ Below is a visual example of a configured footer ⬇️: ![Footer Configuration Example](./assets/footer-configurable.png) +---- +# **Custom Translations** 📝 + +The translations can be partially overridden from the theme customization file. + +### Settings 🔧 + +```shellscript +THEME_CUSTOMIZATION_FILE_PATH= +``` + +### Example of JSON + +The json must follow some rules: https://github.com/suitenumerique/docs/blob/main/src/helm/env.d/dev/configuration/theme/demo.json \ No newline at end of file diff --git a/src/helm/env.d/dev/configuration/theme/demo.json b/src/helm/env.d/dev/configuration/theme/demo.json index 29200ada..1013e122 100644 --- a/src/helm/env.d/dev/configuration/theme/demo.json +++ b/src/helm/env.d/dev/configuration/theme/demo.json @@ -1,4 +1,12 @@ { + "translations": { + "en": { + "translation": { + "Docs": "MyDocs", + "New doc": "+" + } + } + }, "footer": { "default": { "logo": {