Skip to content

Commit

Permalink
feat: add translations and minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlundberg committed Nov 29, 2023
1 parent 1c40ae6 commit ccc1cf0
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 31 deletions.
12 changes: 1 addition & 11 deletions src/components/stats/ActivityList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import translation from "@/translations/global.json";
import { useSettingsModalStore } from "@/store/SettingsModalStore";
import formatTime from "@/lib/formatTime";
import { useTimerStore } from "@/store/timerStore";
import NoActivity from "./NoActivity";

export function ActivityList() {
const { lang } = useSettingsModalStore();
Expand Down Expand Up @@ -38,14 +39,3 @@ export function ActivityList() {
);
});
}

function NoActivity() {
return (
<>
<div className="flex flex-col items-center justify-center w-full text-sm h-28">
<div>No activity found</div>
<div>There is no activity to display</div>
</div>
</>
);
}
21 changes: 21 additions & 0 deletions src/components/stats/NoActivity.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import InformationBell from "@/icons/InformationBell";
import { useSettingsModalStore } from "@/store/SettingsModalStore";
import translation from "@/translations/global.json";

export default function NoActivity() {
const { lang } = useSettingsModalStore();

return (
<>
<div className="flex flex-col items-center justify-center w-full text-sm text-white h-28">
<InformationBell />
<div className="font-thin">
{translation.metrics["no-activity-found"][lang]}
</div>
<div className="italic font-light">
{translation.metrics["no-activity-to-display"][lang]}
</div>
</div>
</>
);
}
20 changes: 0 additions & 20 deletions src/icons/ChatBubble.tsx

This file was deleted.

20 changes: 20 additions & 0 deletions src/icons/InformationBell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default function InformationBell() {
return (
<>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.2}
stroke="currentColor"
className="w-8 h-8"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"
/>
</svg>
</>
);
}
68 changes: 68 additions & 0 deletions src/translations/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,74 @@
"et": "Viimane tegevus"
},

"no-activity-found": {
"en": "No activity found",
"es": "Ninguna actividad encontrada",
"fr": "Aucune activité trouvée",
"de": "Keine Aktivität gefunden",
"ja": "アクティビティが見つかりません",
"zh": "未找到任何活动",
"ru": "Активность не найдена",
"hi": "कोई गतिविधि नहीं मिली",
"pt": "Nenhuma atividade encontrada",
"it": "Nessuna attività trovata",
"ko": "활동이 없습니다",
"nl": "Geen activiteit gevonden",
"sv": "Ingen aktivitet hittades",
"tr": "Hiçbir etkinlik bulunamadı",
"pl": "Nie znaleziono żadnej aktywności",
"vi": "Không tìm thấy hoạt động nào",
"th": "ไม่พบกิจกรรม",
"el": "Δεν βρέθηκε καμία δραστηριότητα",
"fi": "Ei löydetty toimintaa",
"uk": "Жодної активності не знайдено",
"cs": "Žádná aktivita nenalezena",
"ro": "Nicio activitate găsită",
"no": "Ingen aktivitet funnet",
"da": "Ingen aktivitet fundet",
"ms": "Tiada aktiviti ditemui",
"hu": "Nincs tevékenység",
"id": "Tidak ada aktivitas ditemukan",
"bn": "কোনও কার্যকলাপ খুঁজে পাওয়া যায়নি",
"sk": "Žiadna aktivita nenájdená",
"fil": "Walang natagpuang aktibidad",
"et": "Tegevust ei leitud"
},

"no-activity-to-display": {
"en": "There is no activity to display",
"es": "No hay actividad para mostrar",
"fr": "Aucune activité à afficher",
"de": "Es gibt keine Aktivität zum Anzeigen",
"ja": "表示するアクティビティはありません",
"zh": "没有要显示的活动",
"ru": "Нет активности для отображения",
"hi": "प्रदर्शित करने के लिए कोई गतिविधि नहीं है",
"pt": "Não há atividade para exibir",
"it": "Non ci sono attività da mostrare",
"ko": "표시할 활동이 없습니다",
"nl": "Er is geen activiteit om weer te geven",
"sv": "Det finns ingen aktivitet att visa",
"tr": "Gösterilecek etkinlik yok",
"pl": "Brak aktywności do wyświetlenia",
"vi": "Không có hoạt động để hiển thị",
"th": "ไม่มีกิจกรรมที่จะแสดง",
"el": "Δεν υπάρχει δραστηριότητα για εμφάνιση",
"fi": "Näytettävää toimintaa ei ole",
"uk": "Немає активності для відображення",
"cs": "Žádná aktivita k zobrazení",
"ro": "Nu există nicio activitate de afișat",
"no": "Ingen aktivitet å vise",
"da": "Ingen aktivitet at vise",
"ms": "Tiada aktiviti untuk dipaparkan",
"hu": "Nincs megjeleníthető tevékenység",
"id": "Tidak ada aktivitas yang dapat ditampilkan",
"bn": "প্রদর্শন করার জন্য কোনও কার্যকলাপ নেই",
"sk": "Žiadna aktivita na zobrazenie",
"fil": "Walang aktibidad na maipapakita",
"et": "Näitamiseks pole tegevust"
},

"select-cube-metrics-default": {
"en": "All",
"es": "Todo",
Expand Down

0 comments on commit ccc1cf0

Please sign in to comment.