Skip to content

Commit

Permalink
[Improve] Add translations to the team block headers (#2495)
Browse files Browse the repository at this point in the history
* [Improve] Add translations to the team block headers

* [Improve] Add translations for header tabs
  • Loading branch information
GedeonTS authored May 6, 2024
1 parent 379021c commit e1a4d1b
Show file tree
Hide file tree
Showing 28 changed files with 170 additions and 38 deletions.
12 changes: 7 additions & 5 deletions apps/web/components/pages/main/header-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ import KanbanIcon from '@components/ui/svgs/kanban';
import { IssuesView } from '@app/constants';
import { useRecoilState } from 'recoil';
import { headerTabs } from '@app/stores/header-tabs';
import { DottedLanguageObjectStringPaths, useTranslations } from 'next-intl';

const HeaderTabs = ({ linkAll, kanban = false }: { linkAll: boolean; kanban?: boolean }) => {
const t = useTranslations();
const options = [
{ label: 'Cards', icon: QueueListIcon, view: IssuesView.CARDS },
{ label: 'Table', icon: TableCellsIcon, view: IssuesView.TABLE },
{ label: 'Blocks', icon: Squares2X2Icon, view: IssuesView.BLOCKS },
{ label: 'Kanban', icon: KanbanIcon, view: IssuesView.KANBAN }
{ label: 'CARDS', icon: QueueListIcon, view: IssuesView.CARDS },
{ label: 'TABLE', icon: TableCellsIcon, view: IssuesView.TABLE },
{ label: 'BLOCKS', icon: Squares2X2Icon, view: IssuesView.BLOCKS },
{ label: 'KANBAN', icon: KanbanIcon, view: IssuesView.KANBAN }
];
const links = linkAll ? ['/', '/', '/', '/kanban'] : [undefined, undefined, undefined, '/kanban'];
const [view, setView] = useRecoilState(headerTabs);
const activeView = kanban ? IssuesView.KANBAN : view;
return (
<>
{options.map(({ label, icon: Icon, view: optionView }, index) => (
<Tooltip key={label} label={label} placement="top-start">
<Tooltip key={label} label={t(`common.${label}` as DottedLanguageObjectStringPaths)} placement="top-start">
<LinkWrapper isRoute={!!links[index]} href={links[index]}>
<button
className={clsxm(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { CheckCircleTickIcon, CrossCircleIcon, StopCircleIcon, PauseIcon } from
import { Button, VerticalSeparator } from 'lib/components';
import { useTaskFilter, TaskNameFilter } from 'lib/features';
import { useRecoilState } from 'recoil';
import { useTranslations } from 'next-intl';

interface IFilter {
running: number;
Expand All @@ -18,7 +19,7 @@ interface IFilter {
}

export function UserTeamBlockHeader() {
// const t = useTranslations();
const t = useTranslations();
const { activeTeam } = useOrganizationTeams();
const { user } = useAuthenticateUser();
const { openModal, isOpen, closeModal } = useModal();
Expand Down Expand Up @@ -61,7 +62,7 @@ export function UserTeamBlockHeader() {
activeFilter == 'all' && 'text-primary dark:text-white'
)}
/>
<p>All members </p>
<p>{t('common.ALL_MEMBERS')}</p>
<span
className={clsxm(
' bg-gray-500/40 p-1 px-2 text-xs rounded-md',
Expand All @@ -84,7 +85,7 @@ export function UserTeamBlockHeader() {
activeFilter == 'idle' && '!text-primary !fill-white dark:!text-white dark:!fill-white'
)}
/>
<p>Not working </p>
<p>{t('common.NOT_WORKING')}</p>
<span
className={clsxm(
' bg-gray-500/40 p-1 px-2 text-xs rounded-md',
Expand All @@ -109,7 +110,7 @@ export function UserTeamBlockHeader() {
'!text-primary !fill-primary dark:!text-white dark:!fill-white'
)}
/>
<p>Working </p>
<p>{t('common.WORKING')}</p>
<span
className={clsxm(
' bg-gray-500/40 p-1 px-2 text-xs rounded-md',
Expand All @@ -132,7 +133,7 @@ export function UserTeamBlockHeader() {
activeFilter == 'pause' && 'text-primary dark:text-white'
)}
/>
<p>Paused </p>
<p>{t('common.PAUSED')}</p>
<span
className={clsxm(
' bg-gray-500/40 p-1 px-2 text-xs rounded-md',
Expand All @@ -156,7 +157,7 @@ export function UserTeamBlockHeader() {
'!text-primary !fill-white dark:!text-primary dark:!fill-white'
)}
/>
<p>Online</p>
<p>{t('common.ONLINE')}</p>
<span
className={clsxm(
' bg-gray-500/40 p-1 px-2 text-xs rounded-md',
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "غير معثور عليه",
"NO_USERS_WORKING": "لا يوجد مستخدمين يعملون حاليا",
"NO_USERS_PAUSED_WORK": "لم يتم إيقاف أي مستخدم مؤقتًا عن العمل في الوقت الحالي",
"NO_USERS_IDLE": "لا يوجد مستخدمين خاملين في الوقت الحالي"
"NO_USERS_IDLE": "لا يوجد مستخدمين خاملين في الوقت الحالي",
"ALL_MEMBERS": "جميع الأعضاء",
"NOT_WORKING": "غير عامل",
"WORKING": "يعمل",
"PAUSED": "متوقف",
"ONLINE": "متصل"
},
"hotkeys":{
"HELP": "مساعدة",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Страницата не е намерена",
"NO_USERS_WORKING":"В момента няма активни потребители",
"NO_USERS_PAUSED_WORK":"В момента няма потребители, които да са спрели работата си",
"NO_USERS_IDLE":"В момента няма неактивни потребители"
"NO_USERS_IDLE":"В момента няма неактивни потребители",
"ALL_MEMBERS": "Всички членове",
"NOT_WORKING": "Не работи",
"WORKING": "Работи",
"PAUSED": "Пауза",
"ONLINE": "Онлайн"
},
"hotkeys":{
"HELP": "Помощ",
Expand Down
8 changes: 6 additions & 2 deletions apps/web/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,12 @@
"PAGE_NOT_FOUND": "Seite nicht gefunden",
"NO_USERS_WORKING": "Derzeit gibt es keine aktiven Benutzer",
"NO_USERS_PAUSED_WORK": "Derzeit gibt es keine Benutzer, die ihre Arbeit eingestellt haben",
"NO_USERS_IDLE": "Derzeit gibt es keine inaktiven Benutzer."

"NO_USERS_IDLE": "Derzeit gibt es keine inaktiven Benutzer.",
"ALL_MEMBERS": "Alle Mitglieder",
"NOT_WORKING": "Nicht arbeiten",
"WORKING": "Arbeiten",
"PAUSED": "Pausiert",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Hilfe",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Page not found",
"NO_USERS_WORKING": "There are currently no active users",
"NO_USERS_PAUSED_WORK": "There are currently no users who have paused their work",
"NO_USERS_IDLE": "There are currently no inactive users"
"NO_USERS_IDLE": "There are currently no inactive users",
"ALL_MEMBERS": "All Members",
"NOT_WORKING": "Not Working",
"WORKING": "Working",
"PAUSED": "Paused",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Help",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Página no encontrada",
"NO_USERS_WORKING": "Actualmente no hay usuarios activos",
"NO_USERS_PAUSED_WORK": "Actualmente no hay usuarios que hayan dejado de trabajar",
"NO_USERS_IDLE": "Actualmente no hay usuarios inactivos"
"NO_USERS_IDLE": "Actualmente no hay usuarios inactivos",
"ALL_MEMBERS": "Todos los miembros",
"NOT_WORKING": "No trabajando",
"WORKING": "Trabajando",
"PAUSED": "Pausado",
"ONLINE": "En línea"
},
"hotkeys":{
"HELP": "Ayuda",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Page non trouvée",
"NO_USERS_WORKING": "Il n'y a actuellement aucun utilisateur actif",
"NO_USERS_PAUSED_WORK": "Il n'y a actuellement aucun utilisateur qui a mis en pause son travail",
"NO_USERS_IDLE": "Il n'y a actuellement aucun utilisateur inactif"
"NO_USERS_IDLE": "Il n'y a actuellement aucun utilisateur inactif",
"ALL_MEMBERS": "Tous les membres",
"NOT_WORKING": "Non actif",
"WORKING": "Actif",
"PAUSED": "En pause",
"ONLINE": "En ligne"
},
"hotkeys":{
"HELP": "Aide",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "הדף לא נמצא",
"NO_USERS_WORKING": "כרגע אין משתמשים פעילים",
"NO_USERS_PAUSED_WORK": "כרגע אין משתמשים שהפסיקו את עבודתם",
"NO_USERS_IDLE": "כרגע אין משתמשים לא פעילים"
"NO_USERS_IDLE": "כרגע אין משתמשים לא פעילים",
"ALL_MEMBERS": "כל החברים",
"NOT_WORKING": "לא עובד",
"WORKING": "עובד",
"PAUSED": "מושהה",
"ONLINE": "מחובר"
},
"hotkeys":{
"HELP": "עזרה",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Pagina non trovata",
"NO_USERS_WORKING": "Al momento non ci sono utenti attivi",
"NO_USERS_PAUSED_WORK": "Al momento non ci sono utenti che hanno interrotto il proprio lavoro",
"NO_USERS_IDLE": "Al momento non ci sono utenti inattivi"
"NO_USERS_IDLE": "Al momento non ci sono utenti inattivi",
"ALL_MEMBERS": "Tutti i membri",
"NOT_WORKING": "Non Lavora",
"WORKING": "Lavora",
"PAUSED": "In Pausa",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Aiuto",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Pagina niet gevonden",
"NO_USERS_WORKING": "Er zijn momenteel geen actieve gebruikers",
"NO_USERS_PAUSED_WORK": "Er zijn momenteel geen gebruikers die hun werk hebben stopgezet",
"NO_USERS_IDLE": "Er zijn momenteel geen inactieve gebruikers"
"NO_USERS_IDLE": "Er zijn momenteel geen inactieve gebruikers",
"ALL_MEMBERS": "Alle leden",
"NOT_WORKING": "Niet aan het werk",
"WORKING": "Aan het werk",
"PAUSED": "Gepauzeerd",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Help",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Strona nie znaleziona",
"NO_USERS_WORKING": "Obecnie nie ma aktywnych użytkowników",
"NO_USERS_PAUSED_WORK": "Obecnie nie ma użytkowników, którzy przerwali pracę",
"NO_USERS_IDLE": "Obecnie nie ma nieaktywnych użytkowników"
"NO_USERS_IDLE": "Obecnie nie ma nieaktywnych użytkowników",
"ALL_MEMBERS": "Wszyscy członkowie",
"NOT_WORKING": "Niepracujący",
"WORKING": "Pracujący",
"PAUSED": "Wstrzymany",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Pomoc",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"NO_USERS_PAUSED_WORK": "Atualmente não há usuários que interromperam seu trabalho",
"NO_USERS_IDLE": "Atualmente não há usuários inativos",
"NOT_FOUND": "Não encontrado",
"PAGE_NOT_FOUND": "Página não encontrada"
"PAGE_NOT_FOUND": "Página não encontrada",
"ALL_MEMBERS": "Todos os Membros",
"NOT_WORKING": "Não Trabalhando",
"WORKING": "Trabalhando",
"PAUSED": "Pausado",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Ajuda",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "Страница не найдена",
"NO_USERS_WORKING": "На данный момент нет активных пользователей",
"NO_USERS_PAUSED_WORK": "На данный момент нет пользователей, прекративших свою работу",
"NO_USERS_IDLE": "На данный момент неактивных пользователей нет"
"NO_USERS_IDLE": "На данный момент неактивных пользователей нет",
"ALL_MEMBERS": "Все участники",
"NOT_WORKING": "Не работает",
"WORKING": "Работает",
"PAUSED": "Приостановлено",
"ONLINE": "Онлайн"
},
"hotkeys":{
"HELP": "Помощь",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@
"PAGE_NOT_FOUND": "页面未找到",
"NO_USERS_WORKING": "目前没有活跃用户",
"NO_USERS_PAUSED_WORK": "目前还没有用户停止工作",
"NO_USERS_IDLE": "目前没有不活跃用户"
"NO_USERS_IDLE": "目前没有不活跃用户",
"ALL_MEMBERS": "所有成员",
"NOT_WORKING": "不工作",
"WORKING": "工作",
"PAUSED": "暂停",
"ONLINE": "在线"
},
"hotkeys":{
"HELP": "帮助",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/ar/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@
"PAGE_NOT_FOUND": "الصفحة غير موجودة",
"NO_USERS_WORKING": "لا يوجد مستخدمين يعملون حاليا",
"NO_USERS_PAUSED_WORK": "لم يتم إيقاف أي مستخدم مؤقتًا عن العمل في الوقت الحالي",
"NO_USERS_IDLE": "لا يوجد مستخدمين خاملين في الوقت الحالي"
"NO_USERS_IDLE": "لا يوجد مستخدمين خاملين في الوقت الحالي",
"ALL_MEMBERS": "جميع الأعضاء",
"NOT_WORKING": "غير عامل",
"WORKING": "يعمل",
"PAUSED": "متوقف مؤقتًا",
"ONLINE": "متصل"
},
"hotkeys":{
"HELP": "مساعدة",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/bg/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@
"PAGE_NOT_FOUND": "Страницата не е намерена",
"NO_USERS_WORKING":"В момента няма активни потребители",
"NO_USERS_PAUSED_WORK":"В момента няма потребители, които да са спрели работата си",
"NO_USERS_IDLE":"В момента няма неактивни потребители"
"NO_USERS_IDLE":"В момента няма неактивни потребители",
"ALL_MEMBERS": "Всички членове",
"NOT_WORKING": "Не работи",
"WORKING": "Работи",
"PAUSED": "Пауза",
"ONLINE": "Онлайн"
},
"hotkeys":{
"HELP": "Помощ",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@
"PAGE_NOT_FOUND": "Seite nicht gefunden",
"NO_USERS_WORKING": "Derzeit gibt es keine aktiven Benutzer",
"NO_USERS_PAUSED_WORK": "Derzeit gibt es keine Benutzer, die ihre Arbeit eingestellt haben",
"NO_USERS_IDLE": "Derzeit gibt es keine inaktiven Benutzer"
"NO_USERS_IDLE": "Derzeit gibt es keine inaktiven Benutzer",
"ALL_MEMBERS": "Alle Mitglieder",
"NOT_WORKING": "Nicht arbeiten",
"WORKING": "Arbeiten",
"PAUSED": "Pausiert",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Hilfe",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@
"PAGE_NOT_FOUND": "Page Not Found",
"NO_USERS_WORKING": "There are currently no active users",
"NO_USERS_PAUSED_WORK": "There are currently no users who have paused their work",
"NO_USERS_IDLE": "There are currently no inactive users"
"NO_USERS_IDLE": "There are currently no inactive users",
"ALL_MEMBERS": "All Members",
"NOT_WORKING": "Not Working",
"WORKING": "Working",
"PAUSED": "Paused",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Help",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@
"PAGE_NOT_FOUND": "Página no encontrada",
"NO_USERS_WORKING": "Actualmente no hay usuarios activos",
"NO_USERS_PAUSED_WORK": "Actualmente no hay usuarios que hayan dejado de trabajar",
"NO_USERS_IDLE": "Actualmente no hay usuarios inactivos"
"NO_USERS_IDLE": "Actualmente no hay usuarios inactivos",
"ALL_MEMBERS": "Todos los miembros",
"NOT_WORKING": "No trabajando",
"WORKING": "Trabajando",
"PAUSED": "Pausado",
"ONLINE": "En línea"
},
"hotkeys":{
"HELP": "Ayuda",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@
"PAGE_NOT_FOUND": "Page non trouvée",
"NO_USERS_WORKING": "Il n'y a actuellement aucun utilisateur actif",
"NO_USERS_PAUSED_WORK": "Il n'y a actuellement aucun utilisateur qui a mis en pause son travail",
"NO_USERS_IDLE": "Il n'y a actuellement aucun utilisateur inactif"
"NO_USERS_IDLE": "Il n'y a actuellement aucun utilisateur inactif",
"ALL_MEMBERS": "Tous les membres",
"NOT_WORKING": "Non actif",
"WORKING": "Actif",
"PAUSED": "En pause",
"ONLINE": "En ligne"
},
"hotkeys":{
"HELP": "Aide",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/he/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@
"PAGE_NOT_FOUND": "הדף לא נמצא",
"NO_USERS_WORKING": "כרגע אין משתמשים פעילים",
"NO_USERS_PAUSED_WORK": "כרגע אין משתמשים שהפסיקו את עבודתם",
"NO_USERS_IDLE": "כרגע אין משתמשים לא פעילים"
"NO_USERS_IDLE": "כרגע אין משתמשים לא פעילים",
"ALL_MEMBERS": "כל החברים",
"NOT_WORKING": "לא עובד",
"WORKING": "עובד",
"PAUSED": "מושהה",
"ONLINE": "מחובר"
},
"hotkeys":{
"HELP": "עזרה",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/it/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@
"PAGE_NOT_FOUND": "Pagina non trovata",
"NO_USERS_WORKING": "Al momento non ci sono utenti attivi",
"NO_USERS_PAUSED_WORK": "Al momento non ci sono utenti che hanno interrotto il proprio lavoro",
"NO_USERS_IDLE": "Al momento non ci sono utenti inattivi"
"NO_USERS_IDLE": "Al momento non ci sono utenti inattivi",
"ALL_MEMBERS": "Tutti i membri",
"NOT_WORKING": "Non lavorare",
"WORKING": "Lavoro",
"PAUSED": "In pausa",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Aiuto",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/public/locales/nl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@
"PAGE_NOT_FOUND": "Pagina niet gevonden",
"NO_USERS_WORKING": "Er zijn momenteel geen actieve gebruikers",
"NO_USERS_PAUSED_WORK": "Er zijn momenteel geen gebruikers die hun werk hebben stopgezet",
"NO_USERS_IDLE": "Er zijn momenteel geen inactieve gebruikers"
"NO_USERS_IDLE": "Er zijn momenteel geen inactieve gebruikers",
"ALL_MEMBERS": "Alle leden",
"NOT_WORKING": "Niet aan het werk",
"WORKING": "Aan het werk",
"PAUSED": "Gepauzeerd",
"ONLINE": "Online"
},
"hotkeys":{
"HELP": "Help",
Expand Down
Loading

0 comments on commit e1a4d1b

Please sign in to comment.