From 1f1929a793737ce5197202e0af93f170b4d31627 Mon Sep 17 00:00:00 2001 From: Markusplay Date: Sat, 15 Feb 2025 16:18:37 +0200 Subject: [PATCH 1/2] add translation for social network and support cards --- .../(private)/cards/social-networks-card.tsx | 9 ++++----- .../[locale]/(private)/cards/support-card.tsx | 10 ++++++---- src/messages/en.json | 18 ++++++++++++++++++ src/messages/uk.json | 18 ++++++++++++++++++ 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/src/app/[locale]/(private)/cards/social-networks-card.tsx b/src/app/[locale]/(private)/cards/social-networks-card.tsx index 0b5bce19..37161d79 100644 --- a/src/app/[locale]/(private)/cards/social-networks-card.tsx +++ b/src/app/[locale]/(private)/cards/social-networks-card.tsx @@ -4,22 +4,21 @@ import { Paragraph } from '@/components/typography/paragraph'; import { Card, CardContent, CardHeader } from '@/components/ui/card'; import { TextButton } from '@/components/ui/text-button'; import { cn } from '@/lib/utils'; +import { useTranslations } from 'next-intl'; interface SocialNetworksCardProps { className?: string; } export const SocialNetworksCard = ({ className }: SocialNetworksCardProps) => { + const t = useTranslations('private.main.cards.social-networks'); return ( - Соціальні мережі + {t('title')} - - Ви завжди можете знайти найактуальнішу інформацію щодо роботи системи "Електронний кампус КПІ", а - також інших сервісів на нашій сторінці в Facebook, та також у нашому Телеграм-каналі: - + {t('description')} { + const t = useTranslations('private.main.cards.support'); return ( - Служба пiдтримки + {t('title')} - Ви завжди можете звернутися в службу підтримки: + {t('description')} }> - Форма скарг i пропозицiй + {t('button.feedback-form')} }> - Email + {t('button.email')} diff --git a/src/messages/en.json b/src/messages/en.json index 150332f1..f7fc798d 100644 --- a/src/messages/en.json +++ b/src/messages/en.json @@ -154,6 +154,24 @@ "link-title": "Go to the old version of Campus" } }, + "social-networks": { + "title": "Social Networks", + "description": "You can always find the latest information about the operation of the 'Electronic Campus KPI' system and other services on our Facebook page and our Telegram channel:", + "button": { + "facebook": "Facebook", + "twitter": "Twitter", + "instagram": "Instagram", + "github": "Github" + } + }, + "support": { + "title": "Support", + "description": "You can always contact the support service:", + "button": { + "feedback-form": "Feedback form", + "email": "Email" + } + }, "carousel": { "default-link-title": "Go to schedule", "default-slide": { diff --git a/src/messages/uk.json b/src/messages/uk.json index cdc57a85..348f277f 100644 --- a/src/messages/uk.json +++ b/src/messages/uk.json @@ -154,6 +154,24 @@ "link-title": "Перейти на стару версію Кампусу" } }, + "social-networks": { + "title": "Соціальні мережі", + "description": "Ви завжди можете знайти найактуальнішу інформацію щодо роботи системи 'Електронний кампус КПІ', а також інших сервісів на нашій сторінці в Facebook та у нашому Telegram-каналі:", + "button": { + "facebook": "Facebook", + "twitter": "Twitter", + "instagram": "Instagram", + "github": "Github" + } + }, + "support": { + "title": "Служба підтримки", + "description": "Ви завжди можете звернутися в службу підтримки:", + "button": { + "feedback-form": "Форма скарг і пропозицій", + "email": "Пошта" + } + }, "carousel": { "default-link-title": "Перейти до розкладу", "default-slide": { From 634b70c932afd68850f1aab4931943a16ee40187 Mon Sep 17 00:00:00 2001 From: Markusplay Date: Sat, 15 Feb 2025 16:22:49 +0200 Subject: [PATCH 2/2] clean translations --- src/messages/en.json | 8 +------- src/messages/uk.json | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/messages/en.json b/src/messages/en.json index f7fc798d..c8951828 100644 --- a/src/messages/en.json +++ b/src/messages/en.json @@ -156,13 +156,7 @@ }, "social-networks": { "title": "Social Networks", - "description": "You can always find the latest information about the operation of the 'Electronic Campus KPI' system and other services on our Facebook page and our Telegram channel:", - "button": { - "facebook": "Facebook", - "twitter": "Twitter", - "instagram": "Instagram", - "github": "Github" - } + "description": "You can always find the latest information about the operation of the 'Electronic Campus KPI' system and other services on our Facebook page and our Telegram channel:" }, "support": { "title": "Support", diff --git a/src/messages/uk.json b/src/messages/uk.json index 348f277f..4d915629 100644 --- a/src/messages/uk.json +++ b/src/messages/uk.json @@ -156,13 +156,7 @@ }, "social-networks": { "title": "Соціальні мережі", - "description": "Ви завжди можете знайти найактуальнішу інформацію щодо роботи системи 'Електронний кампус КПІ', а також інших сервісів на нашій сторінці в Facebook та у нашому Telegram-каналі:", - "button": { - "facebook": "Facebook", - "twitter": "Twitter", - "instagram": "Instagram", - "github": "Github" - } + "description": "Ви завжди можете знайти найактуальнішу інформацію щодо роботи системи 'Електронний кампус КПІ', а також інших сервісів на нашій сторінці в Facebook та у нашому Telegram-каналі:" }, "support": { "title": "Служба підтримки",