feat(i18n): localize core dashboard flows

This commit is contained in:
poyrazavsever
2026-07-21 12:48:59 +03:00
parent 206484f0eb
commit 8b3de350c7
15 changed files with 395 additions and 351 deletions
+9 -1
View File
@@ -3,6 +3,8 @@ import { getSqliteConnection } from "@/server/db/client";
import { ContentTranslationService, type ContentTranslationRow } from "@/server/i18n/content";
import { resolveFreelancerLocale } from "@/server/i18n/resolver";
import { requireFreelancerBackend } from "@/server/web/freelancer";
import { getClientI18nPayload } from "@/server/i18n/translator";
import { I18nProvider } from "@/components/i18n/i18n-provider";
export default async function TasksPage() {
const locale = await resolveFreelancerLocale();
@@ -55,7 +57,13 @@ export default async function TasksPage() {
.filter((project) => project.status !== "cancelled")
.map(({ id, name, clientId }) => ({ id, name, client_id: clientId }));
return <TasksClient tasks={tasks} clients={clients} projects={projects} localization={localization} />;
const i18nPayload = await getClientI18nPayload(locale.locale, ["tasks", "projects", "common"]);
return (
<I18nProvider {...i18nPayload}>
<TasksClient tasks={tasks} clients={clients} projects={projects} localization={localization} />
</I18nProvider>
);
}
function toLocalizedValues(rows: ContentTranslationRow[]) {