Skip to content

Commit

Permalink
Improve typing
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMalfait committed Feb 2, 2025
1 parent 36a94f1 commit ca1fad3
Show file tree
Hide file tree
Showing 26 changed files with 199 additions and 174 deletions.
3 changes: 2 additions & 1 deletion packages/twenty-emails/src/components/BaseEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import { PropsWithChildren } from 'react';

import { BaseHead } from 'src/components/BaseHead';
import { Logo } from 'src/components/Logo';
import { APP_LOCALES } from 'twenty-shared';

type BaseEmailProps = PropsWithChildren<{
width?: number;
locale: string;
locale: keyof typeof APP_LOCALES;
}>;

export const BaseEmail = ({ children, width, locale }: BaseEmailProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import { CallToAction } from 'src/components/CallToAction';
import { Link } from 'src/components/Link';
import { MainText } from 'src/components/MainText';
import { Title } from 'src/components/Title';
import { APP_LOCALES } from 'twenty-shared';

type PasswordResetLinkEmailProps = {
duration: string;
link: string;
locale: string;
locale: keyof typeof APP_LOCALES;
};

export const PasswordResetLinkEmail = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import { BaseEmail } from 'src/components/BaseEmail';
import { CallToAction } from 'src/components/CallToAction';
import { MainText } from 'src/components/MainText';
import { Title } from 'src/components/Title';
import { APP_LOCALES } from 'twenty-shared';

type PasswordUpdateNotifyEmailProps = {
userName: string;
email: string;
link: string;
locale: string;
locale: keyof typeof APP_LOCALES;
};

export const PasswordUpdateNotifyEmail = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { CallToAction } from 'src/components/CallToAction';
import { Footer } from 'src/components/Footer';
import { MainText } from 'src/components/MainText';
import { Title } from 'src/components/Title';
import { APP_LOCALES } from 'twenty-shared';

type SendEmailVerificationLinkEmailProps = {
link: string;
locale: string;
locale: keyof typeof APP_LOCALES;
};

export const SendEmailVerificationLinkEmail = ({
Expand Down
4 changes: 2 additions & 2 deletions packages/twenty-emails/src/emails/send-invite-link.email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { MainText } from 'src/components/MainText';
import { Title } from 'src/components/Title';
import { WhatIsTwenty } from 'src/components/WhatIsTwenty';
import { capitalize } from 'src/utils/capitalize';
import { getImageAbsoluteURI } from 'twenty-shared';
import { APP_LOCALES, getImageAbsoluteURI } from 'twenty-shared';

type SendInviteLinkEmailProps = {
link: string;
Expand All @@ -23,7 +23,7 @@ type SendInviteLinkEmailProps = {
lastName: string;
};
serverUrl: string;
locale: string;
locale: keyof typeof APP_LOCALES;
};

export const SendInviteLinkEmail = ({
Expand Down
26 changes: 13 additions & 13 deletions packages/twenty-emails/src/locales/de.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2025-02-02 12:09+0100\n"
"POT-Creation-Date: 2025-02-02 12:37+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -15,23 +15,23 @@ msgstr "Einladung annehmen"
msgid "All data in this workspace has been permanently deleted."
msgstr "Alle Daten in diesem Arbeitsbereich wurden endgültig gelöscht."

#: src/emails/send-email-verification-link.email.tsx:21
#: src/emails/send-email-verification-link.email.tsx:22
msgid "Confirm your email address"
msgstr "Bestätigen Sie Ihre E-Mail Adresse"

#: src/emails/password-update-notify.email.tsx:45
#: src/emails/password-update-notify.email.tsx:46
msgid "Connect to Twenty"
msgstr "Verbindung zu Twenty"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear"
msgstr "Liebe"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear {userName}"
msgstr "Sehr geehrter {userName}"

#: src/emails/password-update-notify.email.tsx:39
#: src/emails/password-update-notify.email.tsx:40
msgid "If you did not initiate this change, please contact your workspace owner immediately."
msgstr "Wenn Sie diese Änderung nicht veranlasst haben, wenden Sie sich bitte umgehend an den Eigentümer Ihres Arbeitsbereichs."

Expand All @@ -51,35 +51,35 @@ msgstr "Es scheint, dass Ihr Arbeitsbereich <0>{workspaceDisplayName}</0> für {
msgid "Join your team on Twenty"
msgstr "Verbinden Sie Ihr Team auf Twenty"

#: src/emails/password-update-notify.email.tsx:28
#: src/emails/password-update-notify.email.tsx:29
msgid "Password updated"
msgstr "Passwort aktualisiert"

#: src/emails/password-reset-link.email.tsx:23
#: src/emails/password-reset-link.email.tsx:24
msgid "Reset"
msgstr "Zurücksetzen"

#: src/emails/password-reset-link.email.tsx:22
#: src/emails/password-reset-link.email.tsx:23
msgid "Reset your password 🗝"
msgstr "Ihr Passwort zurücksetzen 🗝"

#: src/emails/send-email-verification-link.email.tsx:26
#: src/emails/send-email-verification-link.email.tsx:27
msgid "Thanks for registering for an account on Twenty! Before we get started, we just need to confirm that this is you. Click above to verify your email address."
msgstr "Vielen Dank, dass Sie sich für ein Konto bei Twenty registriert haben! Bevor wir loslegen, müssen wir nur bestätigen, dass Sie es sind. Klicken Sie oben, um Ihre E-Mail-Adresse zu bestätigen."

#: src/emails/warn-suspended-workspace.email.tsx:39
msgid "The workspace will be deactivated in {remainingDays} {dayOrDays}, and all its data will be deleted."
msgstr "Der Arbeitsbereich wird in {remainingDays} {dayOrDays} deaktiviert, und alle seine Daten werden gelöscht."

#: src/emails/password-update-notify.email.tsx:33
#: src/emails/password-update-notify.email.tsx:34
msgid "This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}."
msgstr "Dies ist eine Bestätigung, dass das Passwort für Ihr Konto ({email}) erfolgreich am {formattedDate} geändert wurde."

#: src/emails/password-reset-link.email.tsx:25
#: src/emails/password-reset-link.email.tsx:26
msgid "This link is only valid for the next {duration}. If the link does not work, you can use the login verification link directly:"
msgstr "Dieser Link ist nur für den nächsten {duration} gültig. Wenn der Link nicht funktioniert, können Sie direkt den Link zur Überprüfung der Anmeldung verwenden:"

#: src/emails/send-email-verification-link.email.tsx:22
#: src/emails/send-email-verification-link.email.tsx:23
msgid "Verify Email"
msgstr "E-Mail verifizieren"

Expand Down
24 changes: 12 additions & 12 deletions packages/twenty-emails/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ msgstr "Accept invite"
msgid "All data in this workspace has been permanently deleted."
msgstr "All data in this workspace has been permanently deleted."

#: src/emails/send-email-verification-link.email.tsx:21
#: src/emails/send-email-verification-link.email.tsx:22
msgid "Confirm your email address"
msgstr "Confirm your email address"

#: src/emails/password-update-notify.email.tsx:45
#: src/emails/password-update-notify.email.tsx:46
msgid "Connect to Twenty"
msgstr "Connect to Twenty"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear"
msgstr "Dear"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear {userName}"
msgstr "Dear {userName}"

#: src/emails/send-invite-link.email.tsx:50
msgid "has invited you to join a workspace called "
msgstr "has invited you to join a workspace called "

#: src/emails/password-update-notify.email.tsx:39
#: src/emails/password-update-notify.email.tsx:40
msgid "If you did not initiate this change, please contact your workspace owner immediately."
msgstr "If you did not initiate this change, please contact your workspace owner immediately."

Expand All @@ -61,43 +61,43 @@ msgstr "It appears that your workspace <0>{workspaceDisplayName}</0> has been su
msgid "Join your team on Twenty"
msgstr "Join your team on Twenty"

#: src/emails/password-update-notify.email.tsx:28
#: src/emails/password-update-notify.email.tsx:29
msgid "Password updated"
msgstr "Password updated"

#: src/emails/password-reset-link.email.tsx:23
#: src/emails/password-reset-link.email.tsx:24
msgid "Reset"
msgstr "Reset"

#: src/emails/password-reset-link.email.tsx:22
#: src/emails/password-reset-link.email.tsx:23
msgid "Reset your password 🗝"
msgstr "Reset your password 🗝"

#: src/emails/send-email-verification-link.email.tsx:26
#: src/emails/send-email-verification-link.email.tsx:27
msgid "Thanks for registering for an account on Twenty! Before we get started, we just need to confirm that this is you. Click above to verify your email address."
msgstr "Thanks for registering for an account on Twenty! Before we get started, we just need to confirm that this is you. Click above to verify your email address."

#: src/emails/warn-suspended-workspace.email.tsx:39
msgid "The workspace will be deactivated in {remainingDays} {dayOrDays}, and all its data will be deleted."
msgstr "The workspace will be deactivated in {remainingDays} {dayOrDays}, and all its data will be deleted."

#: src/emails/password-update-notify.email.tsx:33
#: src/emails/password-update-notify.email.tsx:34
msgid "This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}."
msgstr "This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}."

#: src/emails/password-update-notify.email.tsx:36
#~ msgid "This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}.<0/><1/>If you did not initiate this change, please contact your workspace owner immediately."
#~ msgstr "This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}.<0/><1/>If you did not initiate this change, please contact your workspace owner immediately."

#: src/emails/password-reset-link.email.tsx:25
#: src/emails/password-reset-link.email.tsx:26
msgid "This link is only valid for the next {duration}. If the link does not work, you can use the login verification link directly:"
msgstr "This link is only valid for the next {duration}. If the link does not work, you can use the login verification link directly:"

#: src/emails/password-reset-link.email.tsx:28
#~ msgid "This link is only valid for the next {duration}. If the link does not work, you can use the login verification link directly:<0/>"
#~ msgstr "This link is only valid for the next {duration}. If the link does not work, you can use the login verification link directly:<0/>"

#: src/emails/send-email-verification-link.email.tsx:22
#: src/emails/send-email-verification-link.email.tsx:23
msgid "Verify Email"
msgstr "Verify Email"

Expand Down
26 changes: 13 additions & 13 deletions packages/twenty-emails/src/locales/es.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2025-02-02 12:09+0100\n"
"POT-Creation-Date: 2025-02-02 12:37+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -15,23 +15,23 @@ msgstr "Aceptar invitación"
msgid "All data in this workspace has been permanently deleted."
msgstr "Todos los datos de este espacio de trabajo se han eliminado permanentemente."

#: src/emails/send-email-verification-link.email.tsx:21
#: src/emails/send-email-verification-link.email.tsx:22
msgid "Confirm your email address"
msgstr "Confirma tu dirección de correo electrónico"

#: src/emails/password-update-notify.email.tsx:45
#: src/emails/password-update-notify.email.tsx:46
msgid "Connect to Twenty"
msgstr "Conectarse a Twenty"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear"
msgstr "Estimado/a"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear {userName}"
msgstr "Estimado/a {userName}"

#: src/emails/password-update-notify.email.tsx:39
#: src/emails/password-update-notify.email.tsx:40
msgid "If you did not initiate this change, please contact your workspace owner immediately."
msgstr "Si usted no ha iniciado este cambio, póngase en contacto inmediatamente con el propietario de su espacio de trabajo."

Expand All @@ -51,35 +51,35 @@ msgstr "Parece que su espacio de trabajo <0>{workspaceDisplayName}</0> ha sido s
msgid "Join your team on Twenty"
msgstr "Únete a tu equipo en Twenty"

#: src/emails/password-update-notify.email.tsx:28
#: src/emails/password-update-notify.email.tsx:29
msgid "Password updated"
msgstr "Contraseña actualizada"

#: src/emails/password-reset-link.email.tsx:23
#: src/emails/password-reset-link.email.tsx:24
msgid "Reset"
msgstr "Restablecer"

#: src/emails/password-reset-link.email.tsx:22
#: src/emails/password-reset-link.email.tsx:23
msgid "Reset your password 🗝"
msgstr "Restablece tu contraseña 🗝"

#: src/emails/send-email-verification-link.email.tsx:26
#: src/emails/send-email-verification-link.email.tsx:27
msgid "Thanks for registering for an account on Twenty! Before we get started, we just need to confirm that this is you. Click above to verify your email address."
msgstr "¡Gracias por registrarte en Twenty! Antes de comenzar, solo necesitamos confirmar que eres tú. Haz clic arriba para verificar tu dirección de correo electrónico."

#: src/emails/warn-suspended-workspace.email.tsx:39
msgid "The workspace will be deactivated in {remainingDays} {dayOrDays}, and all its data will be deleted."
msgstr "El espacio de trabajo se desactivará en {remainingDays} {dayOrDays} y se borrarán todos sus datos."

#: src/emails/password-update-notify.email.tsx:33
#: src/emails/password-update-notify.email.tsx:34
msgid "This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}."
msgstr "Esto es una confirmación de que la contraseña de su cuenta ({email}) se ha cambiado correctamente en {formattedDate}."

#: src/emails/password-reset-link.email.tsx:25
#: src/emails/password-reset-link.email.tsx:26
msgid "This link is only valid for the next {duration}. If the link does not work, you can use the login verification link directly:"
msgstr "Este enlace sólo es válido para el próximo {duration}. Si el enlace no funciona, puede utilizar directamente el enlace de verificación de inicio de sesión:"

#: src/emails/send-email-verification-link.email.tsx:22
#: src/emails/send-email-verification-link.email.tsx:23
msgid "Verify Email"
msgstr "Verificar correo electrónico"

Expand Down
26 changes: 13 additions & 13 deletions packages/twenty-emails/src/locales/fr.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2025-02-02 12:09+0100\n"
"POT-Creation-Date: 2025-02-02 12:37+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -15,23 +15,23 @@ msgstr "Accepter l'invitation"
msgid "All data in this workspace has been permanently deleted."
msgstr "Toutes les données de cet espace de travail ont été définitivement supprimées."

#: src/emails/send-email-verification-link.email.tsx:21
#: src/emails/send-email-verification-link.email.tsx:22
msgid "Confirm your email address"
msgstr "Confirmez votre adresse email"

#: src/emails/password-update-notify.email.tsx:45
#: src/emails/password-update-notify.email.tsx:46
msgid "Connect to Twenty"
msgstr "Connectez-vous à Twenty"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear"
msgstr "Cher(e)"

#: src/emails/password-update-notify.email.tsx:23
#: src/emails/password-update-notify.email.tsx:24
msgid "Dear {userName}"
msgstr "Cher(e) {userName}"

#: src/emails/password-update-notify.email.tsx:39
#: src/emails/password-update-notify.email.tsx:40
msgid "If you did not initiate this change, please contact your workspace owner immediately."
msgstr "Si vous n'êtes pas à l'origine de ce changement, veuillez contacter immédiatement le propriétaire de votre espace de travail."

Expand All @@ -51,35 +51,35 @@ msgstr "Il apparaît que votre espace de travail <0>{workspaceDisplayName}</0> a
msgid "Join your team on Twenty"
msgstr "Rejoignez votre équipe sur Twenty"

#: src/emails/password-update-notify.email.tsx:28
#: src/emails/password-update-notify.email.tsx:29
msgid "Password updated"
msgstr "Mot de passe mis à jour"

#: src/emails/password-reset-link.email.tsx:23
#: src/emails/password-reset-link.email.tsx:24
msgid "Reset"
msgstr "Réinitialiser"

#: src/emails/password-reset-link.email.tsx:22
#: src/emails/password-reset-link.email.tsx:23
msgid "Reset your password 🗝"
msgstr "Réinitialiser votre mot de passe 🗝"

#: src/emails/send-email-verification-link.email.tsx:26
#: src/emails/send-email-verification-link.email.tsx:27
msgid "Thanks for registering for an account on Twenty! Before we get started, we just need to confirm that this is you. Click above to verify your email address."
msgstr "Merci de vous être inscrit sur Twenty! Avant de commencer, nous devons simplement confirmer qu'il s'agit bien de vous. Cliquez ci-dessus pour vérifier votre adresse e-mail."

#: src/emails/warn-suspended-workspace.email.tsx:39
msgid "The workspace will be deactivated in {remainingDays} {dayOrDays}, and all its data will be deleted."
msgstr "L'espace de travail sera désactivé dans {remainingDays} {dayOrDays} et toutes ses données seront supprimées."

#: src/emails/password-update-notify.email.tsx:33
#: src/emails/password-update-notify.email.tsx:34
msgid "This is a confirmation that password for your account ({email}) was successfully changed on {formattedDate}."
msgstr "Ceci est une confirmation que le mot de passe de votre compte ({email}) a été modifié avec succès le {formattedDate}."

#: src/emails/password-reset-link.email.tsx:25
#: src/emails/password-reset-link.email.tsx:26
msgid "This link is only valid for the next {duration}. If the link does not work, you can use the login verification link directly:"
msgstr "Ce lien n'est valable que pour le prochain {duration}. Si le lien ne fonctionne pas, vous pouvez utiliser directement le lien de vérification de la connexion :"

#: src/emails/send-email-verification-link.email.tsx:22
#: src/emails/send-email-verification-link.email.tsx:23
msgid "Verify Email"
msgstr "Vérifier l'e-mail"

Expand Down
Loading

0 comments on commit ca1fad3

Please sign in to comment.