feat: translate app to english#340
Merged
Merged
Conversation
… error handling in forms
Contributor
There was a problem hiding this comment.
Pull request overview
Implements broad i18n migration toward an English-capable UI by replacing many hardcoded Polish strings with next-intl translation keys across authentication, dashboard, event/forms/blocks/emails flows, and the public homepage.
Changes:
- Replaced many UI strings (labels, toasts, aria-labels, metadata titles) with
next-intltranslation lookups across app routes and shared components. - Introduced translation-key-based validation/error handling (Zod messages as keys) plus a
translateOrFallbackhelper to display translated errors where available. - Refactored email “message tags” into a dedicated
src/lib/message-tags/module (categories/builders/suggestions) to support translated tag names/descriptions.
Reviewed changes
Copilot reviewed 130 out of 130 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/schemas.ts | Switched Zod auth schema messages to translation keys and added key unions. |
| src/types/auth.ts | Added typed error-key unions for auth flows. |
| src/lib/utils.ts | Reworked dynamic form validation to emit i18n-friendly error keys. |
| src/lib/message-tags/tag-suggestions.tsx | Refactored tag suggestions to consume new message-tags module and added cleanup logic. |
| src/lib/message-tags/tag-builders.ts | Added builders for attribute/form tags (currently hardcodes PL labels). |
| src/lib/message-tags/index.ts | Centralized tag types + base tag list generation via translations. |
| src/lib/message-tags/categories.tsx | Added translated categories + icons for message tags. |
| src/lib/emails.ts | Converted email trigger names/descriptions to translation keys and introduced typed trigger interface. |
| src/lib/editor.ts | Adjusted editor root defaults (name default changed). |
| src/i18n/translate-or-fallback.tsx | Added helper to translate known keys or fall back to raw message. |
| src/components/unsaved-changes-alert.tsx | Switched dialog strings to translations. |
| src/components/ui/multi-select.tsx | Translated placeholders/labels/aria-labels for multi-select UI. |
| src/components/ui/form.tsx | Adjusted FormMessage rendering behavior to support translated children. |
| src/components/trigger-type-explanation.tsx | Added translated trigger explanation component for email trigger selection. |
| src/components/tags-list.tsx | Updated tags list UI; includes a Tailwind class regression (z-9999). |
| src/components/participant-form.tsx | Translated participant form strings and added translated validation messages. |
| src/components/navbar.tsx | Translated dashboard nav labels and added language switch. |
| src/components/forms/event/coorganizers/types.ts | Converted permission labels to translation keys with typed key extraction. |
| src/components/forms/event/coorganizers/coorganizer-item.tsx | Translated co-organizer item UI and permission labels. |
| src/components/forms/event/coorganizers/add-coorganizer-input.tsx | Translated add-co-organizer UI and permission labels. |
| src/components/forms/event/coorganizers-form.tsx | Translated co-organizers section labels and helper text. |
| src/components/forms/event/attributes/schema.ts | Converted attribute form validation messages to translation keys. |
| src/components/forms/event/attributes/attribute-types.tsx | Converted attribute type titles/descriptions to translation keys. |
| src/components/forms/event/attributes/attribute-type-options.tsx | Rendered translated attribute type labels/tooltips. |
| src/components/forms/event/attributes-form.tsx | Translated attributes section labels/placeholders/buttons. |
| src/components/forms/event-form/general-info-form.tsx | Converted general info schema errors to keys and translated UI strings. |
| src/components/event-card.tsx | Added new event card components using translations for labels/alt text. |
| src/components/editor/overrides.tsx | Made Puck overrides translation-aware via a factory. |
| src/components/editor/number-button-input.tsx | Translated aria-labels for editor number input controls. |
| src/components/editor/index.tsx | Wired editor config to translation functions and forced rerender on locale via key={locale}. |
| src/components/editor/composition.tsx | Translated editor composition UI and toasts; updated server action calls. |
| src/components/editor/color-picker.tsx | Translated color picker UI text/tooltip. |
| src/components/editor.tsx | Added configurable editor placeholder (default still Polish). |
| src/components/delete-resource-popup.tsx | Translated delete confirmation UI/toasts and used rich translations. |
| src/components/dashboard-sidebar.tsx | Translated sidebar section/link titles and adjusted layout width. |
| src/components/auth-button.tsx | Translated auth button labels using server translations. |
| src/components/attributes-manager.tsx | Translated attribute manager labels and improved checkbox labeling. |
| src/components/attribute-input.tsx | Translated select placeholders/none option and error text. |
| src/components/attribute-input-file.tsx | Added translation-aware, structured file validation errors. |
| src/components/attribute-input-drawing.tsx | Translated drawing UI labels and messages. |
| src/components/alerts.tsx | Translated alert link/dismiss aria-labels. |
| src/app/layout.tsx | Converted static metadata to generateMetadata() using translations. |
| src/app/dashboard/settings/page.tsx | Translated dashboard settings page title. |
| src/app/dashboard/page.tsx | Translated dashboard homepage title. |
| src/app/dashboard/fetch-error-alert.tsx | Added reusable translated fetch error alert component. |
| src/app/dashboard/events/[id]/settings/page.tsx | Translated metadata/title for event settings page. |
| src/app/dashboard/events/[id]/settings/actions.ts | Added translated error messages to server action (now takes t as argument). |
| src/app/dashboard/events/[id]/participants/table/components/table-ui/table-toolbar.tsx | UI tweak introduced invalid Tailwind width class (md:w-66). |
| src/app/dashboard/events/[id]/participants/table/components/table-ui/editable-cell.tsx | Translated “uploaded” status label. |
| src/app/dashboard/events/[id]/participants/table/components/inputs/attribute-value-input.tsx | Translated “none” option labels. |
| src/app/dashboard/events/[id]/participants/table/components/buttons/filter-button.tsx | Translated filter UI labels/aria-labels. |
| src/app/dashboard/events/[id]/participants/table/components/buttons/edit-button.tsx | Translated aria-labels for edit/save/cancel. |
| src/app/dashboard/events/[id]/participants/table/components/buttons/drawing-preview-button.tsx | Translated download/preview UI and toasts. |
| src/app/dashboard/events/[id]/participants/table/components/buttons/download-file-attribute-button.tsx | Translated download UI and toasts. |
| src/app/dashboard/events/[id]/participants/table/tests/edit-participant.test.tsx | Updated tests to match translated aria-labels (PL test locale). |
| src/app/dashboard/events/[id]/participants/page.tsx | Translated metadata title. |
| src/app/dashboard/events/[id]/page.tsx | Translated event page UI and share button labels. |
| src/app/dashboard/events/[id]/forms/sortable-form-grid.tsx | Passed translations into reorder action (server action arg issue). |
| src/app/dashboard/events/[id]/forms/page.tsx | Translated metadata/title and empty state text. |
| src/app/dashboard/events/[id]/forms/form-entry.tsx | Translated sr-only label for edit form button. |
| src/app/dashboard/events/[id]/forms/delete-form-popup.tsx | Translated resource type label and passed translations into delete action. |
| src/app/dashboard/events/[id]/forms/create-event-form-form.tsx | Translated multi-step create-form flow and toasts. |
| src/app/dashboard/events/[id]/forms/actions.ts | Added translated error strings to server actions (now takes t as argument). |
| src/app/dashboard/events/[id]/forms/[formId]/page.tsx | Translated metadata/title and page labels. |
| src/app/dashboard/events/[id]/forms/[formId]/edit-form.tsx | Translated toasts and passed translations into update action. |
| src/app/dashboard/events/[id]/emails/template-entry.tsx | Translated trigger label and template edit UI. |
| src/app/dashboard/events/[id]/emails/sortable-email-grid.tsx | Passed translations into reorder action (server action arg issue). |
| src/app/dashboard/events/[id]/emails/page.tsx | Translated metadata/title and empty/error states. |
| src/app/dashboard/events/[id]/emails/mail-history-popup.tsx | Translated email history popup UI strings. |
| src/app/dashboard/events/[id]/emails/editor/page.tsx | Switched to translated metadata and new message-tag builders. |
| src/app/dashboard/events/[id]/emails/editor/[emailId]/page.tsx | Switched to translated metadata and new message-tag builders. |
| src/app/dashboard/events/[id]/emails/delete-email-popup.tsx | Translated resource type label and passed translations into delete action. |
| src/app/dashboard/events/[id]/emails/create-email-template-form.tsx | Translated create-template button/title. |
| src/app/dashboard/events/[id]/emails/actions.ts | Added translated error strings to server actions (now takes t as argument). |
| src/app/dashboard/events/[id]/emails/[emailId]/page.tsx | Translated metadata/title and breadcrumbs. |
| src/app/dashboard/events/[id]/emails/(table)/use-email-history-table.ts | Made columns translation-aware via getColumns(t). |
| src/app/dashboard/events/[id]/emails/(table)/table.tsx | Fixed colSpan derivation and translated empty state. |
| src/app/dashboard/events/[id]/emails/(table)/columns.tsx | Translated headers/status values and refactored columns into factory. |
| src/app/dashboard/events/[id]/emails/(steps)/trigger-type.tsx | Translated trigger step UI and moved explanation to shared component. |
| src/app/dashboard/events/[id]/blocks/sortable-block-attribute-grid.tsx | Translated block open button label. |
| src/app/dashboard/events/[id]/blocks/page.tsx | Translated metadata/title and empty state. |
| src/app/dashboard/events/[id]/blocks/[blockId]/toggle-participants-visibility-button.tsx | Translated toggle button label. |
| src/app/dashboard/events/[id]/blocks/[blockId]/page.tsx | Translated block page labels/empty state and participant count text. |
| src/app/dashboard/events/[id]/blocks/[blockId]/edit-block-entry.tsx | Translated block edit flow and extracted reusable block form. |
| src/app/dashboard/events/[id]/blocks/[blockId]/delete-block-popup.tsx | Translated resource type label. |
| src/app/dashboard/events/[id]/blocks/[blockId]/create-block-form.tsx | Translated create-block flow and extracted reusable block form. |
| src/app/dashboard/events/[id]/blocks/[blockId]/block-form.tsx | New reusable translated block form with translated validation messages. |
| src/app/dashboard/events/[id]/blocks/[blockId]/block-entry.tsx | Translated “unlimited” label. |
| src/app/dashboard/admin/activate-event.tsx | Translated activation/deactivation toasts and labels; adjusted exports. |
| src/app/dashboard/admin/actions.ts | Exported admin action and added checkIfSuperAdmin. |
| src/app/dashboard/(create-event)/create-event-form.tsx | Translated multi-step create-event flow and toasts; passed translations into action. |
| src/app/dashboard/(create-event)/actions.ts | Added translated error strings to server action (now takes t as argument). |
| src/app/auth/register/page.tsx | Translated registration flow, error rendering, and terms text. |
| src/app/auth/login/page.tsx | Translated login flow/toasts and error rendering. |
| src/app/auth/layout.tsx | Translated auth metadata and adjusted layout padding. |
| src/app/auth/forgot-password/page.tsx | Translated forgot-password flow and error rendering. |
| src/app/auth/actions.ts | Returned error keys for translation instead of Polish strings. |
| src/app/[eventSlug]/register/page.tsx | Translated consent text and link labels. |
| src/app/[eventSlug]/privacy/page.tsx | Translated metadata for privacy policy page. |
| src/app/[eventSlug]/event-not-found.tsx | Translated not-found messages and CTA. |
| src/app/[eventSlug]/[formSlug]/[userSlug]/page.tsx | Translated fallback metadata title for missing form. |
| src/app/(homepage)/sections/to-pwr.tsx | Translated ToPWr promo copy and image alt text. |
| src/app/(homepage)/sections/team/index.tsx | Translated team section copy via rich translations. |
| src/app/(homepage)/sections/partners.tsx | Translated partners section labels and alt text. |
| src/app/(homepage)/sections/navbar/mobile-navbar.tsx | Translated mobile navbar labels and added language switch. |
| src/app/(homepage)/sections/navbar/index.tsx | Translated navbar links and added language switch. |
| src/app/(homepage)/sections/navbar/auth-button.tsx | Translated homepage auth button labels (server translations). |
| src/app/(homepage)/sections/highlighted-events.tsx | Translated highlighted events content (but introduced invalid Tailwind tokens). |
| src/app/(homepage)/sections/hero.tsx | Translated hero copy and CTA labels. |
| src/app/(homepage)/sections/footer.tsx | Translated footer copy/labels and fixed buttonVariants import path. |
| src/app/(homepage)/sections/events/timeline.tsx | Switched month formatting locale from hardcoded PL to current locale. |
| src/app/(homepage)/sections/events/index.tsx | Translated loading/error text for events fetch. |
| src/app/(homepage)/sections/events/event-list.tsx | Translated event list strings (status labels, “from/to”, empty state). |
maciejkrol18
requested changes
Jul 10, 2026
Member
There was a problem hiding this comment.
Dobrze
- Fajnie poorganizowane tłumaczenia po tych keyach
- Plus też za tłumaczenie title strony w funkcjach
generateMetadata - Ogólnie bardzo fajnie zredukowane powtarzanie się kodu w kilku miejscach np. z tą kartą eventu czy alertem przy nieudanym fetchu
Do poprawienia
- Wypisane komentarze przeze mnie + to co wypisał Copilot z wyjątkiem tego z klasami tailwindowymi bo najwyraźniej dalej nie jest świadom nowego zapisu
- Po próbie fixa szerokości autha strona logowania rozszerza się gdy pokazuje sie napis "weryfikacja captcha" po czym wraca do pierwotnego rozmiaru - layout shift
- Średnio mi siedzi aktualne rozwiązanie z tłumaczeniami edytora maili - dzięki nav guardowi przynajmniej blokuje odświeżenie edytora gdy są zmiany przy zmianie języka, jest to trochę dziwne ale imo może przejść, jednak słabe jest te niezmienianie się labelów tagów w zawartości maila. Ciężko do tego podejść bo tagi te polegają na rozszerzeniu Mention do tiptapa, które wstawia
span-y bezpośrednio do html'a maila, więc jedyna możliwość jaką widzę to zparsowanie zawartości maila przy ładowaniu edytora, gdzie "labele znaczników" (wynikowo to co jest wpisane w spanie) zawierają jakiś sformatowany key do tłumaczenia (np. byłoby<span [...] >%eventName%</span>i później podmieniamy w html'u każde wystąpienie danego keya na wartość z jsona tłumaczeń. Końcowo na backendzie każdy z tych spanów jest podmieniany na daną wartość patrząc się na atrybutdata-iddanego spana więc ten label jest stricte kosmetyczny i jest wykorzystywany tylko w interfejsie edytora
…lvro/web-eventownik-v2 into feat/translate-app-to-english
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #337