Browse Source

feat(locales): add Portuguese language support and donation banner in release notes for multiple languages
fix(release-notes): update release notes dialog to render HTML content safely for new notes

Mathias 1 month ago
parent
commit
688e497fa2

+ 7 - 1
locales/en.ts

@@ -60,6 +60,11 @@ export default {
     title: "What's New",
     release_notes: "Release Notes",
     notes: {
+      note_2025_06_23: {
+        title: "🇵🇹 Portuguese Support & Donation Banner",
+        content:
+          "The app now supports <strong>Portuguese</strong>! We've also added a <em>donation banner</em> to help support the ongoing costs of the project via <a href='https://github.com/sponsors/snouzy' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>GitHub Sponsors</a> or <a href='https://ko-fi.com/workoutcool' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Ko-fi</a>. 🙏",
+      },
       note_2025_06_22: {
         title: "🌍 New Languages & Performance Boost!",
         content:
@@ -71,7 +76,8 @@ export default {
           "Workout.cool v1.2 is now a Progressive Web App! Install it on your phone for a native app experience with offline access. 🚀",
       },
       note_2025_06_18: {
-        title: "🚀 Featured #1 on Hacker News!",
+        title:
+          "🚀 Featured #1 on <a href='https://news.ycombinator.com/item?id=44309320' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Hacker News</a>!",
         content:
           "Workout.cool reached the top spot on Hacker News! Thanks to everyone for the amazing support and welcome to all the new users! 💪",
       },

+ 7 - 1
locales/es.ts

@@ -60,6 +60,11 @@ export default {
     title: "Novedades",
     release_notes: "Notas",
     notes: {
+      note_2025_06_23: {
+        title: "🇵🇹 Soporte de Portugués y Banner de Donación",
+        content:
+          "¡La app ahora soporta <strong>portugués</strong>! También hemos añadido un <em>banner de donación</em> para ayudar a cubrir los costos del proyecto via <a href='https://github.com/sponsors/snouzy' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>GitHub Sponsors</a> o <a href='https://ko-fi.com/workoutcool' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Ko-fi</a>. 🙏",
+      },
       note_2025_06_22: {
         title: "🌍 ¡Nuevos idiomas y mejora de rendimiento!",
         content:
@@ -71,7 +76,8 @@ export default {
           "¡Workout.cool v1.2 ahora es una Progressive Web App! Instálala en tu teléfono para una experiencia de aplicación nativa con acceso sin conexión. 🚀",
       },
       note_2025_06_18: {
-        title: "🚀 ¡Destacado #1 en Hacker News!",
+        title:
+          "🚀 ¡Destacado #1 en <a href='https://news.ycombinator.com/item?id=44309320' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Hacker News</a>!",
         content:
           "¡Workout.cool alcanzó el primer lugar en Hacker News! ¡Gracias a todos por el increíble apoyo y bienvenidos a todos los nuevos usuarios! 💪",
       },

+ 9 - 3
locales/fr.ts

@@ -60,6 +60,11 @@ export default {
     title: "Nouveautés",
     release_notes: "Notes",
     notes: {
+      note_2025_06_23: {
+        title: "🇵🇹 Support Portugais & Bannière de Don",
+        content:
+          "L'app supporte maintenant le <strong>portugais</strong> ! Nous avons aussi ajouté une <em>bannière de don</em> pour aider à supporter les coûts du projet via <a href='https://github.com/sponsors/snouzy' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>GitHub Sponsors</a> ou <a href='https://ko-fi.com/workoutcool' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Ko-fi</a>.",
+      },
       note_2025_06_22: {
         title: "🌍 Nouvelles langues & amélioration des performances !",
         content:
@@ -68,12 +73,13 @@ export default {
       note_2025_06_19: {
         title: "📱 Maintenant disponible en PWA !",
         content:
-          "Workout.cool v1.2 est maintenant une Progressive Web App ! Installez-la sur votre téléphone pour une expérience d'application native avec accès hors ligne. 🚀",
+          "Workout.cool v1.2 est maintenant une Progressive Web App ! Installez-la sur votre téléphone pour une expérience d'application native avec accès hors ligne.",
       },
       note_2025_06_18: {
-        title: "🚀 Mis en avant #1 sur Hacker News !",
+        title:
+          "🚀 Numéro #1 sur <a href='https://news.ycombinator.com/item?id=44309320' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Hacker News</a> !",
         content:
-          "Workout.cool a atteint le top spot sur Hacker News ! Merci à tous pour le support incroyable — bienvenue à tous les nouveaux utilisateurs ! 💪",
+          "Workout.cool a atteint le <strong>top spot</strong> sur Hacker News ! Merci à tous pour le support incroyable — bienvenue à tous les nouveaux utilisateurs ! 💪",
       },
       note_2025_06_01: {
         title: "🎉 Nouveau : Dialogue des notes de version",

+ 7 - 1
locales/pt.ts

@@ -60,6 +60,11 @@ export default {
     title: "Novidades",
     release_notes: "Notas de Lançamento",
     notes: {
+      note_2025_06_23: {
+        title: "🇵🇹 Suporte Português & Banner de Doação",
+        content:
+          "A app agora suporta <strong>português</strong>! Também adicionámos um <em>banner de doação</em> para ajudar a suportar os custos do projeto via <a href='https://github.com/sponsors/snouzy' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>GitHub Sponsors</a> ou <a href='https://ko-fi.com/workoutcool' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Ko-fi</a>. 🙏",
+      },
       note_2025_06_22: {
         title: "🌍 Novos idiomas e melhorias de desempenho!",
         content:
@@ -71,7 +76,8 @@ export default {
           "O Workout.cool v1.2 já é uma Progressive Web App! Instale-a no seu telemóvel para uma experiência de aplicação nativa com acesso offline. 🚀",
       },
       note_2025_06_18: {
-        title: "🚀 Nº 1 em destaque no Hacker News!",
+        title:
+          "🚀 Nº 1 em destaque no <a href='https://news.ycombinator.com/item?id=44309320' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Hacker News</a>!",
         content:
           "O Workout.cool chegou ao primeiro lugar no Hacker News! Obrigado a todos pelo apoio incrível e bem-vindos todos os novos utilizadores! 💪",
       },

+ 7 - 1
locales/ru.ts

@@ -60,6 +60,11 @@ export default {
     title: "Что нового",
     release_notes: "Заметки о выпуске",
     notes: {
+      note_2025_06_23: {
+        title: "🇵🇹 Поддержка Португальского & Баннер Пожертвований",
+        content:
+          "Приложение теперь поддерживает <strong>португальский язык</strong>! Мы также добавили <em>баннер пожертвований</em>, чтобы помочь покрыть расходы проекта через <a href='https://github.com/sponsors/snouzy' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>GitHub Sponsors</a> или <a href='https://ko-fi.com/workoutcool' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Ko-fi</a>. 🙏",
+      },
       note_2025_06_22: {
         title: "🌍 Новые языки и улучшение производительности!",
         content:
@@ -71,7 +76,8 @@ export default {
           "Workout.cool v1.2 теперь является прогрессивным веб-приложением! Установите его на ваш телефон для получения нативного опыта приложения с офлайн доступом. 🚀",
       },
       note_2025_06_18: {
-        title: "🚀 #1 на Hacker News!",
+        title:
+          "🚀 #1 на <a href='https://news.ycombinator.com/item?id=44309320' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Hacker News</a>!",
         content:
           "Workout.cool достиг первого места на Hacker News! Спасибо всем за потрясающую поддержку и добро пожаловать всем новым пользователям! 💪",
       },

+ 7 - 1
locales/zh-CN.ts

@@ -60,6 +60,11 @@ export default {
     title: "新功能",
     release_notes: "更新日志",
     notes: {
+      note_2025_06_23: {
+        title: "🇵🇹 葡萄牙语支持和捐赠横幅",
+        content:
+          "应用现已支持<strong>葡萄牙语</strong>!我们还添加了<em>捐赠横幅</em>以帮助通过<a href='https://github.com/sponsors/snouzy' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>GitHub Sponsors</a>或<a href='https://ko-fi.com/workoutcool' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Ko-fi</a>支持项目的持续成本。🙏",
+      },
       note_2025_06_22: {
         title: "🌍 新语言支持和性能提升!",
         content: "应用现已支持中文和俄语!我们还改进了拖放功能的性能,提供更流畅的体验。⚡",
@@ -69,7 +74,8 @@ export default {
         content: "Workout.cool v1.2 现在是一个渐进式网络应用!将其安装在您的手机上,即可享受原生应用体验和离线访问。🚀",
       },
       note_2025_06_18: {
-        title: "🚀 在 Hacker News 上排名第一!",
+        title:
+          "🚀 在 <a href='https://news.ycombinator.com/item?id=44309320' target='_blank' rel='noopener' class='text-blue-500 hover:underline'>Hacker News</a> 上排名第一!",
         content: "Workout.cool 在 Hacker News 上登顶!感谢大家的大力支持,欢迎所有新用户!💪",
       },
       note_2025_06_01: {

+ 5 - 0
src/features/release-notes/model/notes.ts

@@ -5,6 +5,11 @@ export interface ReleaseNote {
 }
 
 export const releaseNotes: ReleaseNote[] = [
+  {
+    date: "2025-06-23",
+    titleKey: "release_notes.notes.note_2025_06_23.title",
+    contentKey: "release_notes.notes.note_2025_06_23.content",
+  },
   {
     date: "2025-06-22",
     titleKey: "release_notes.notes.note_2025_06_22.title",

+ 3 - 3
src/features/release-notes/ui/release-notes-dialog.tsx

@@ -23,7 +23,7 @@ export function ReleaseNotesDialog() {
           </Button>
         </div>
       </DialogTrigger>
-      <DialogContent className="max-w-md">
+      <DialogContent className="max-w-md max-h-[60vh] overflow-y-auto">
         <DialogHeader>
           <DialogTitle>{t("release_notes.title")}</DialogTitle>
         </DialogHeader>
@@ -31,8 +31,8 @@ export function ReleaseNotesDialog() {
           {releaseNotes.map((note) => (
             <div className="border-b pb-2 last:border-b-0 last:pb-0 py-2" key={note.date}>
               <div className="text-xs text-muted-foreground">{formatDate(note.date, locale)}</div>
-              <div className="font-semibold mb-1">{t(note.titleKey as keyof typeof t)}</div>
-              <div className="text-sm mb-4">{t(note.contentKey as keyof typeof t)}</div>
+              <div className="font-semibold mb-1" dangerouslySetInnerHTML={{ __html: t(note.titleKey as keyof typeof t) }} />
+              <div className="text-sm mb-4" dangerouslySetInnerHTML={{ __html: t(note.contentKey as keyof typeof t) }} />
             </div>
           ))}
         </div>