Skip to content

Commit

Permalink
I18n planned tabs (#2882)
Browse files Browse the repository at this point in the history
* ff

* Intertionalization | Planned Tabs

* Intertionalization | Planned Tabs

* i18n planned tabs

* fix i18n
  • Loading branch information
samuelmbabhazi authored Aug 11, 2024
1 parent 2b47ec0 commit 6501ae1
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 17 deletions.
6 changes: 3 additions & 3 deletions apps/web/lib/features/task/task-filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import intersection from 'lodash/intersection';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { TaskUnOrAssignPopover } from './task-assign-popover';
import { TaskLabelsDropdown, TaskPropertiesDropdown, TaskSizesDropdown, TaskStatusDropdown } from './task-status';
import { useTranslations } from 'next-intl';
import { DottedLanguageObjectStringPaths, useTranslations } from 'next-intl';
import { SettingFilterIcon } from 'assets/svg';
import { DailyPlanFilter } from './daily-plan/daily-plan-filter';
import { Divider } from 'lib/components';
Expand Down Expand Up @@ -121,8 +121,8 @@ export function useTaskFilter(profile: I_UserProfilePage) {
if (activeTeam?.shareProfileView || canSeeActivity) {
tabs.push({
tab: 'dailyplan',
name: t('common.DAILYPLAN'),
description: t('task.tabFilter.DAILYPLAN_DESCRIPTION'),
name: t('common.DAILYPLAN'as DottedLanguageObjectStringPaths) ,
description: t('task.tabFilter.DAILYPLAN_DESCRIPTION' as DottedLanguageObjectStringPaths),
count: profile.tasksGrouped.planned
});
tabs.push({
Expand Down
6 changes: 5 additions & 1 deletion apps/web/lib/features/user-profile-plans.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ import { handleDragAndDrop } from '@app/helpers/drag-and-drop';
import { DragDropContext, Droppable, Draggable, DroppableProvided, DroppableStateSnapshot } from 'react-beautiful-dnd';
import { useDateRange } from '@app/hooks/useDateRange';
import { checkPastDate } from 'lib/utils';

import { DottedLanguageObjectStringPaths, useTranslations } from 'next-intl';
import { useLocalStorageState } from '@app/hooks/useLocalStorageState';


export type FilterTabs = 'Today Tasks' | 'Future Tasks' | 'Past Tasks' | 'All Tasks' | 'Outstanding';
type FilterOutstanding = 'ALL' | 'DATE';

export function UserProfilePlans() {
const t = useTranslations();
const defaultTab =
typeof window !== 'undefined'
? (window.localStorage.getItem('daily-plan-tab') as FilterTabs) || null
Expand Down Expand Up @@ -115,7 +119,7 @@ export function UserProfilePlans() {
setCurrentTab(filter as FilterTabs);
}}
>
{filter}
{t(`task.tabFilter.${filter.toUpperCase().replace(' ', '_')}` as DottedLanguageObjectStringPaths)}
<span
className={clsxm(
'text-xs bg-gray-200 dark:bg-dark--theme-light text-dark--theme-light dark:text-gray-200 p-2 rounded py-1',
Expand Down
1 change: 1 addition & 0 deletions apps/web/lib/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const en = {
SELECT_STATUS: 'Select status',
SELECT_ISSUE: 'Select Issue',
UNASSIGNED: 'Unassigned',
DAILY_PLAN: 'Daily plan',
TASK_DETAILS: 'Task Details',
TYPE_SOMETHING: 'Type something',
FILTER: 'Filter',
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "يعرض هذا التبويب جميع المهام المعينة لك",
"UNASSIGNED_DESCRIPTION": "يعرض هذا التبويب جميع المهام غير المعينة لك",
"NO_TASK_USER_ASSIGNED": "لم يتم تعيين أحد لهذه المهمة",
"DAILYPLAN_DESCRIPTION": "تعرض علامة التبويب هذه جميع مهامك المخطط لها"
"DAILYPLAN_DESCRIPTION": "تعرض علامة التبويب هذه جميع مهامك المخطط لها",
"TODAY_TASKS": "مهام اليوم",
"FUTURE_TASKS": "المهام المستقبلية",
"PAST_TASKS": "المهام السابقة",
"ALL_TASKS": "كل المهام",
"OUTSTANDING": "معلقة"
},
"taskTableHead": {
"TASK_NAME": "الاسم",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Тази раздел показва всички задачи, които са възложени на вас",
"UNASSIGNED_DESCRIPTION": "Тази раздел показва всички задачи, които не са възложени на вас",
"NO_TASK_USER_ASSIGNED": "Никой не е възложен на тази задача",
"DAILYPLAN_DESCRIPTION": "Този раздел показва всички планирани задачи."
"DAILYPLAN_DESCRIPTION": "Този раздел показва всички планирани задачи.",
"TODAY_TASKS": "Днешни задачи",
"FUTURE_TASKS": "Бъдещи задачи",
"PAST_TASKS": "Минали задачи",
"ALL_TASKS": "Всички задачи",
"OUTSTANDING": "Изключителни"
},
"taskTableHead": {
"TASK_NAME": "Име",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Dieser Tab zeigt alle Aufgaben, die Ihnen zugewiesen sind",
"UNASSIGNED_DESCRIPTION": "Dieser Tab zeigt alle Aufgaben, die Ihnen nicht zugewiesen sind",
"NO_TASK_USER_ASSIGNED": "Niemandem dieser Aufgabe zugewiesen",
"DAILYPLAN_DESCRIPTION": "Diese Registerkarte zeigt alle Ihre geplanten Aufgaben"
"DAILYPLAN_DESCRIPTION": "Diese Registerkarte zeigt alle Ihre geplanten Aufgaben",
"TODAY_TASKS": "Heutige Aufgaben",
"FUTURE_TASKS": "Zukünftige Aufgaben",
"PAST_TASKS": "Vergangene Aufgaben",
"ALL_TASKS": "Alle Aufgaben",
"OUTSTANDING": "Ausstehend"
},
"taskTableHead": {
"TASK_NAME": "Name",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "This tab shows all tasks that are assigned to you",
"UNASSIGNED_DESCRIPTION": "This tab shows all tasks that are not assigned to you",
"NO_TASK_USER_ASSIGNED": "No one assigned to this Task",
"DAILYPLAN_DESCRIPTION": "This tab shows all your planned tasks"
"DAILYPLAN_DESCRIPTION": "This tab shows all your planned tasks",
"TODAY_TASKS": "Today Tasks",
"FUTURE_TASKS": "Future Tasks",
"PAST_TASKS": "Past Tasks",
"ALL_TASKS": "All Tasks",
"OUTSTANDING": "Outstanding"
},
"taskTableHead": {
"TASK_NAME": "Name",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Esta pestaña muestra todas las tareas que te han sido asignadas",
"UNASSIGNED_DESCRIPTION": "Esta pestaña muestra todas las tareas que no te han sido asignadas",
"NO_TASK_USER_ASSIGNED": "Nadie asignado a esta tarea",
"DAILYPLAN_DESCRIPTION": "Esta pestaña muestra todas sus tareas planificadas"
"DAILYPLAN_DESCRIPTION": "Esta pestaña muestra todas sus tareas planificadas",
"TODAY_TASKS": "Tareas de hoy",
"FUTURE_TASKS": "Tareas futuras",
"PAST_TASKS": "Tareas pasadas",
"ALL_TASKS": "Todas las tareas",
"OUTSTANDING": "Pendientes"
},
"taskTableHead": {
"TASK_NAME": "Nombre",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Cet onglet affiche toutes les tâches qui vous sont assignées",
"UNASSIGNED_DESCRIPTION": "Cet onglet affiche toutes les tâches qui ne vous sont pas assignées",
"NO_TASK_USER_ASSIGNED": "Personne n'est assigné à cette tâche",
"DAILYPLAN_DESCRIPTION": "Cet onglet présente toutes vos tâches planifiées"
"DAILYPLAN_DESCRIPTION": "Cet onglet présente toutes vos tâches planifiées",
"TODAY_TASKS": "Tâches d'aujourd'hui",
"FUTURE_TASKS": "Tâches futures",
"PAST_TASKS": "Tâches passées",
"ALL_TASKS": "Toutes les tâches",
"OUTSTANDING": "En suspens"
},
"taskTableHead": {
"TASK_NAME": "Nom",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "לשונית זו מציגה את כל המשימות שהוקצו לך",
"UNASSIGNED_DESCRIPTION": "לשונית זו מציגה את כל המשימות שלא הוקצו לך",
"NO_TASK_USER_ASSIGNED": "אף אחד לא הוקצה למשימה הזאת",
"DAILYPLAN_DESCRIPTION": "כרטיסייה זו מציגה את כל המשימות המתוכננות שלך"
"DAILYPLAN_DESCRIPTION": "כרטיסייה זו מציגה את כל המשימות המתוכננות שלך",
"TODAY_TASKS": "משימות היום",
"FUTURE_TASKS": "משימות עתידיות",
"PAST_TASKS": "משימות קודמות",
"ALL_TASKS": "כל המשימות",
"OUTSTANDING": "ממתין"
},
"taskTableHead": {
"TASK_NAME": "שם",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Questa scheda mostra tutti i compiti assegnati a te",
"UNASSIGNED_DESCRIPTION": "Questa scheda mostra tutti i compiti che non sono assegnati a te",
"NO_TASK_USER_ASSIGNED": "Nessuno assegnato a questo compito",
"DAILYPLAN_DESCRIPTION": "Questa scheda mostra tutte le attività pianificate"
"DAILYPLAN_DESCRIPTION": "Questa scheda mostra tutte le attività pianificate",
"TODAY_TASKS": "Compiti di oggi",
"FUTURE_TASKS": "Compiti futuri",
"PAST_TASKS": "Compiti passati",
"ALL_TASKS": "Tutti i compiti",
"OUTSTANDING": "Eccezionale"
},
"taskTableHead": {
"TASK_NAME": "Nome",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Dit tabblad toont alle taken die aan u zijn toegewezen",
"UNASSIGNED_DESCRIPTION": "Dit tabblad toont alle taken die niet aan u zijn toegewezen",
"NO_TASK_USER_ASSIGNED": "Niemand toegewezen aan deze taak",
"DAILYPLAN_DESCRIPTION": "Dit tabblad toont alle door jou geplande taken"
"DAILYPLAN_DESCRIPTION": "Dit tabblad toont alle door jou geplande taken",
"TODAY_TASKS": "Taken van vandaag",
"FUTURE_TASKS": "Toekomstige taken",
"PAST_TASKS": "Verleden taken",
"ALL_TASKS": "Alle taken",
"OUTSTANDING": "Uitstekend"
},
"taskTableHead": {
"TASK_NAME": "Naam",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Ta karta pokazuje wszystkie zadania przypisane do ciebie",
"UNASSIGNED_DESCRIPTION": "Ta karta pokazuje wszystkie zadania, które nie są przypisane do ciebie",
"NO_TASK_USER_ASSIGNED": "Nikt nie jest przypisany do tego zadania",
"DAILYPLAN_DESCRIPTION": "Na tej karcie wyświetlane są wszystkie zaplanowane zadania"
"DAILYPLAN_DESCRIPTION": "Na tej karcie wyświetlane są wszystkie zaplanowane zadania",
"TODAY_TASKS": "Dzisiejsze zadania",
"FUTURE_TASKS": "Przyszłe zadania",
"PAST_TASKS": "Zadania z przeszłości",
"ALL_TASKS": "Wszystkie zadania",
"OUTSTANDING": "Niezakończone"
},
"taskTableHead": {
"TASK_NAME": "Nazwa",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Esta aba mostra todas as tarefas atribuídas a você",
"UNASSIGNED_DESCRIPTION": "Esta aba mostra todas as tarefas que não estão atribuídas a você",
"NO_TASK_USER_ASSIGNED": "Ninguém atribuído a esta tarefa",
"DAILYPLAN_DESCRIPTION": "Este separador mostra todas as suas tarefas planeadas"
"DAILYPLAN_DESCRIPTION": "Este separador mostra todas as suas tarefas planeadas",
"TODAY_TASKS": "Tarefas de hoje",
"FUTURE_TASKS": "Tarefas futuras",
"PAST_TASKS": "Tarefas passadas",
"ALL_TASKS": "Todas as tarefas",
"OUTSTANDING": "Pendente"
},
"taskTableHead": {
"TASK_NAME": "Nome",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "Этот раздел показывает все задачи, которые назначены вам",
"UNASSIGNED_DESCRIPTION": "Этот раздел показывает все задачи, которые не назначены вам",
"NO_TASK_USER_ASSIGNED": "Никто не назначен на эту задачу",
"DAILYPLAN_DESCRIPTION": "На этой вкладке отображаются все запланированные вами задачи"
"DAILYPLAN_DESCRIPTION": "На этой вкладке отображаются все запланированные вами задачи",
"TODAY_TASKS": "Задачи на сегодня",
"FUTURE_TASKS": "Будущие задачи",
"PAST_TASKS": "Прошлые задачи",
"ALL_TASKS": "Все задачи",
"OUTSTANDING": "Выдающиеся"
},
"taskTableHead": {
"TASK_NAME": "Название",
Expand Down
7 changes: 6 additions & 1 deletion apps/web/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@
"ASSIGNED_DESCRIPTION": "此标签显示分配给您的所有任务",
"UNASSIGNED_DESCRIPTION": "此标签显示未分配给您的任务",
"NO_TASK_USER_ASSIGNED": "此任务未分配",
"DAILYPLAN_DESCRIPTION": "此標籤顯示您已規劃的所有任務"
"DAILYPLAN_DESCRIPTION": "此標籤顯示您已規劃的所有任務",
"TODAY_TASKS": "今天的任务",
"FUTURE_TASKS": "未来任务",
"PAST_TASKS": "过去任务",
"ALL_TASKS": "所有任务",
"OUTSTANDING": "突出"
},
"taskTableHead": {
"TASK_NAME": "名称",
Expand Down

0 comments on commit 6501ae1

Please sign in to comment.