Skip to content

Commit

Permalink
fix(web): Missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Nov 5, 2023
1 parent 22efb9c commit 976ee5d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
18 changes: 14 additions & 4 deletions frontend/web/app/dashboard/activity/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,30 @@ const ActivityPage = () => {
})();
}, [page]);

const getFormattedDate = (date: string) => {
const d = new Date(date);

return `${`0${d.getDate()}`.slice(-2)}-${`0${d.getMonth() + 1}`.slice(
-2,
)}-${d.getFullYear()} ${`0${d.getHours()}`.slice(-2)}:${`0${d.getMinutes()}`.slice(
-2,
)}:${`0${d.getSeconds()}`.slice(-2)}`;
};

return (
<DashboardPageWrapper title={t("activity.title")}>
<table className="table">
<thead className="text-neutral-content">
<tr>
<th>Time</th>
<th>Workflow</th>
<th>Activity</th>
<th>{t("activity.time")}</th>
<th>{t("activity.workflow")}</th>
<th>{t("activity.title")}</th>
</tr>
</thead>
<tbody>
{activities.map((activity) => (
<tr key={activity.id}>
<td>{activity.createdAt}</td>
<td>{getFormattedDate(activity.createdAt)}</td>
<td>{activity.workflow.name}</td>
<td>{activity.type}</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions frontend/web/layouts/library/LibraryWorkflowTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ const LibraryWorkflowTable = () => {
)}
</div>
</th>
<th>Name</th>
<th>Running</th>
<th>{t("library.name")}</th>
<th>{t("library.running")}</th>
<th></th>
</tr>
</thead>
Expand Down
4 changes: 4 additions & 0 deletions frontend/web/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ const translations = {
successMessage: "Workflow successfully renamed!",
},
},
name: "Name",
running: "Running",
},
user: {
settings: {
Expand All @@ -84,6 +86,8 @@ const translations = {
},
activity: {
title: "Activity",
time: "Time",
workflow: "Workflow",
},
landing: {
actions: {
Expand Down
4 changes: 4 additions & 0 deletions frontend/web/locales/fr-FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const translations = {
successMessage: "Workflow renommé avec succès !",
},
},
name: "Nom",
running: "Status",
},
user: {
settings: {
Expand All @@ -85,6 +87,8 @@ const translations = {
},
activity: {
title: "Activité",
time: "Date",
workflow: "Workflow",
},
landing: {
actions: {
Expand Down
4 changes: 4 additions & 0 deletions frontend/web/locales/is-IS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ const translations = {
successMessage: "Verkflæði breytt nafni!",
},
},
name: "Nafn",
running: "Staða",
},
user: {
settings: {
Expand All @@ -84,6 +86,8 @@ const translations = {
},
activity: {
title: "Virkni",
time: "Dagsetning",
workflow: "Verkflæði",
},
landing: {
actions: {
Expand Down

0 comments on commit 976ee5d

Please sign in to comment.