Skip to content

Commit

Permalink
Merge pull request #61 from vicr123/features/notifications
Browse files Browse the repository at this point in the history
Implement Email Notifications
  • Loading branch information
vicr123 authored Feb 5, 2024
2 parents 35fa8e3 + e44f27b commit 88c2df6
Show file tree
Hide file tree
Showing 88 changed files with 3,608 additions and 47 deletions.
3 changes: 3 additions & 0 deletions Parlance.CldrData/Locale.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Concurrent;
using System.Globalization;
using System.Text;
using System.Text.Json;
using System.Xml.XPath;
Expand Down Expand Up @@ -148,6 +149,8 @@ public static IEnumerable<Locale> GetLocales()
var dir = new DirectoryInfo(Path.Combine(Cldr.Instance.Repositories[0], "common/main"));
return dir.EnumerateFiles().Select(info => Path.GetFileNameWithoutExtension(info.Name).ToLocale()).Distinct();
}

public CultureInfo ToCultureInfo() => new(ToDashed());

public void Deconstruct(out string LanguageCode, out string? CountryCode, out string? Script)
{
Expand Down
6 changes: 6 additions & 0 deletions Parlance.ClientApp/public/mail/mail.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@font-face {
font-family: 'Contemporary';
font-style: normal;
font-weight: 400;
src: local('Contemporary'), local('Contemporary-Regular'), url('https://vicr123.com/typeface/Contemporary-Regular.ttf');
}
31 changes: 31 additions & 0 deletions Parlance.ClientApp/public/mail/parlance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@
"ASSISTANT_DESCRIPTION": "",
"ASSISTANT_RESOURCES": "",
"ASSISTANT_SUGGESTED_TRANSLATIONS": "",
"ATTRIBUTION": "",
"ATTRIBUTION_CHECKBOX": "",
"ATTRIBUTION_PROMPT_1": "",
"ATTRIBUTION_PROMPT_2": "",
"ATTRIBUTION_PROMPT_3": "",
"AUTO_SUBSCRIPTION_EVENT_NAME_TRANSLATION_SUBMIT": "",
"AUTO_SUBSCRIPTION_EVENT_PRESENT_TENSE_ACTION_TRANSLATION_SUBMIT": "",
"AUTO_SUBSCRIPTION_SETTINGS_DESCRIPTION": "",
"AUTO_SUBSCRIPTION_SETTINGS_EVENT": "",
"AUTO_SUBSCRIPTION_SETTINGS_TITLE": "",
"AVAILABLE PROJECTS": "",
"AVAILABLE_GLOSSARIES": "",
"AVAILABLE_LANGUAGES": "",
Expand Down Expand Up @@ -107,6 +113,17 @@
"EDITOR_NUMERIC_PLACEHOLDER": "",
"EDITOR_PLACEHOLDER": "",
"EMAIL_ADDRESS": "",
"EMAIL_DO_UNSUBSCRIBE": "",
"EMAIL_UNSUBSCRIBE_AND_STOP_AUTO": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_1": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_2": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_HEADER": "",
"EMAIL_UNSUBSCRIBE_DESCRIPTION": "",
"EMAIL_UNSUBSCRIBE_ONLY": "",
"EMAIL_UNSUBSCRIBE_UNVERIFY_DESCRIPTION": "",
"EMAIL_UNSUBSCRIBE_UNVERIFY_HEADER": "",
"EMAIL_UNVERIFY_BUTTON": "",
"EMAIL_VERIFY_ENTER_CODE": "",
"EMAIL_VERIFY_PROMPT": "",
"EMAIL_VERIFY_RESEND": "",
Expand Down Expand Up @@ -135,6 +152,7 @@
"FILTER_ALL_STRINGS": "",
"FILTER_UNFINISHED_STRINGS": "",
"FORGOT_PASSWORD": "",
"GENERAL": "",
"GENERIC_PROMPT": "",
"GIT_CLONE_URL": "",
"GLOSSARIES": "",
Expand Down Expand Up @@ -177,6 +195,9 @@
"MICROSOFT_TERMINOLOGY_COLLECTION": "",
"MY_LANGUAGES": "",
"NEXT": "",
"NOTIFICATIONS": "",
"NOTIFICATIONS_CHANNELS": "",
"NOTIFICATION_SETTINGS": "",
"NOT_LOGGED_IN": "",
"NO_GLOSSARIES": "",
"OK": "",
Expand Down Expand Up @@ -290,6 +311,7 @@
"START_NEW_TRANSLATION": "",
"START_NEW_TRANSLATION_CREATE_TRANSLATION_FILE": "",
"START_NEW_TRANSLATION_PROMPT": "",
"SUBSCRIPTION_CHANNEL_NAME_TRANSLATION_FREEZE": "",
"SUGGESTIONS_NO_SUGGESTIONS": "",
"SUPERUSERS": "",
"SUPERUSER_PROMOTE_PROMPT_1": "",
Expand Down Expand Up @@ -330,6 +352,12 @@
"TRANSLATION_SUBMIT_ERROR_PROMPT": "",
"TWO_FACTOR_AUTHENTICATION": "",
"TWO_FACTOR_AUTHENTICATION_CODE": "",
"UNSUBSCRIBE": "",
"UNSUBSCRIBE_ERROR_BODY": "",
"UNSUBSCRIBE_ERROR_HEADING": "",
"UNSUBSCRIBE_SUCCESS": "",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_BODY": "",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_TITLE": "",
"UNSUPPORTED_BROWSER": "",
"USERNAME": "",
"USERS_AND_PERMISSIONS": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@
"ASSISTANT_DESCRIPTION": "Assistenten giver dig brugbar information for at hjælpe dig med at oversætte.",
"ASSISTANT_RESOURCES": "Ressourcer",
"ASSISTANT_SUGGESTED_TRANSLATIONS": "Foreslåede oversættelser",
"ATTRIBUTION": "",
"ATTRIBUTION_CHECKBOX": "",
"ATTRIBUTION_PROMPT_1": "",
"ATTRIBUTION_PROMPT_2": "",
"ATTRIBUTION_PROMPT_3": "",
"AUTO_SUBSCRIPTION_EVENT_NAME_TRANSLATION_SUBMIT": "",
"AUTO_SUBSCRIPTION_EVENT_PRESENT_TENSE_ACTION_TRANSLATION_SUBMIT": "",
"AUTO_SUBSCRIPTION_SETTINGS_DESCRIPTION": "",
"AUTO_SUBSCRIPTION_SETTINGS_EVENT": "",
"AUTO_SUBSCRIPTION_SETTINGS_TITLE": "",
"AVAILABLE PROJECTS": "Tilgængelige projekter",
"AVAILABLE_GLOSSARIES": "",
"AVAILABLE_LANGUAGES": "Tilgængelige sprog",
Expand Down Expand Up @@ -106,6 +112,17 @@
"EDITOR_NUMERIC_PLACEHOLDER": "numerisk",
"EDITOR_PLACEHOLDER": "pladsholder",
"EMAIL_ADDRESS": "Mailadresse",
"EMAIL_DO_UNSUBSCRIBE": "",
"EMAIL_UNSUBSCRIBE_AND_STOP_AUTO": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_1": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_2": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_HEADER": "",
"EMAIL_UNSUBSCRIBE_DESCRIPTION": "",
"EMAIL_UNSUBSCRIBE_ONLY": "",
"EMAIL_UNSUBSCRIBE_UNVERIFY_DESCRIPTION": "",
"EMAIL_UNSUBSCRIBE_UNVERIFY_HEADER": "",
"EMAIL_UNVERIFY_BUTTON": "",
"EMAIL_VERIFY_ENTER_CODE": "Indtast bekræftelseskode",
"EMAIL_VERIFY_PROMPT": "Tjek din email efter den kode som vi har sendt dig. Hvis du ikke kan finde den, så prøv at tjekke spam-mappen, og hvis det ikke virker, så prøv at sende en bekræftelsesmail igen.",
"EMAIL_VERIFY_RESEND": "Se",
Expand Down Expand Up @@ -134,6 +151,7 @@
"FILTER_ALL_STRINGS": "",
"FILTER_UNFINISHED_STRINGS": "",
"FORGOT_PASSWORD": "Glemt adgangskode",
"GENERAL": "",
"GENERIC_PROMPT": "Hvad ønsker du at foretage dig?",
"GIT_CLONE_URL": "Git Clone URL",
"GLOSSARIES": "",
Expand Down Expand Up @@ -177,6 +195,9 @@
"MICROSOFT_TERMINOLOGY_COLLECTION": "",
"MY_LANGUAGES": "",
"NEXT": "",
"NOTIFICATIONS": "",
"NOTIFICATIONS_CHANNELS": "",
"NOTIFICATION_SETTINGS": "",
"NOT_LOGGED_IN": "",
"NO_GLOSSARIES": "",
"OK": "",
Expand Down Expand Up @@ -292,6 +313,7 @@
"START_NEW_TRANSLATION_LOGIN_REQUIRED": "",
"START_NEW_TRANSLATION_PROMPT": "",
"START_NEW_TRANSLATION_WRONG_VIEW": "",
"SUBSCRIPTION_CHANNEL_NAME_TRANSLATION_FREEZE": "",
"SUGGESTIONS_NO_SUGGESTIONS": "",
"SUPERUSERS": "",
"SUPERUSER_PROMOTE_PROMPT_1": "",
Expand Down Expand Up @@ -331,6 +353,12 @@
"TRANSLATION_SUBMIT_ERROR_PROMPT": "",
"TWO_FACTOR_AUTHENTICATION": "",
"TWO_FACTOR_AUTHENTICATION_CODE": "",
"UNSUBSCRIBE": "",
"UNSUBSCRIBE_ERROR_BODY": "",
"UNSUBSCRIBE_ERROR_HEADING": "",
"UNSUBSCRIBE_SUCCESS": "",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_BODY": "",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_TITLE": "",
"UNSUPPORTED_BROWSER": "",
"USERNAME": "",
"USERS_AND_PERMISSIONS": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@
"ASSISTANT_DESCRIPTION": "Der Assistent gibt dir hilfreiche Informationen, um eine Übersetzung zu erstellen.",
"ASSISTANT_RESOURCES": "Ressourcen",
"ASSISTANT_SUGGESTED_TRANSLATIONS": "Vorgeschlagene Übersetzungen",
"ATTRIBUTION": "",
"ATTRIBUTION_CHECKBOX": "",
"ATTRIBUTION_PROMPT_1": "",
"ATTRIBUTION_PROMPT_2": "",
"ATTRIBUTION_PROMPT_3": "",
"AUTO_SUBSCRIPTION_EVENT_NAME_TRANSLATION_SUBMIT": "",
"AUTO_SUBSCRIPTION_EVENT_PRESENT_TENSE_ACTION_TRANSLATION_SUBMIT": "",
"AUTO_SUBSCRIPTION_SETTINGS_DESCRIPTION": "",
"AUTO_SUBSCRIPTION_SETTINGS_EVENT": "",
"AUTO_SUBSCRIPTION_SETTINGS_TITLE": "",
"AVAILABLE PROJECTS": "Verfügbare Projekte",
"AVAILABLE_GLOSSARIES": "",
"AVAILABLE_LANGUAGES": "Verfügbare Sprachen",
Expand Down Expand Up @@ -106,6 +112,17 @@
"EDITOR_NUMERIC_PLACEHOLDER": "Numerisch",
"EDITOR_PLACEHOLDER": "Platzhalten",
"EMAIL_ADDRESS": "E-Mail-Adresse",
"EMAIL_DO_UNSUBSCRIBE": "",
"EMAIL_UNSUBSCRIBE_AND_STOP_AUTO": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_1": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_2": "",
"EMAIL_UNSUBSCRIBE_COMPLETELY_HEADER": "",
"EMAIL_UNSUBSCRIBE_DESCRIPTION": "",
"EMAIL_UNSUBSCRIBE_ONLY": "",
"EMAIL_UNSUBSCRIBE_UNVERIFY_DESCRIPTION": "",
"EMAIL_UNSUBSCRIBE_UNVERIFY_HEADER": "",
"EMAIL_UNVERIFY_BUTTON": "",
"EMAIL_VERIFY_ENTER_CODE": "Verifizierungscode eingeben",
"EMAIL_VERIFY_PROMPT": "Gucke in deinem E-Mail-Postfach nach dem Code, den wir dir gesendet haben. Wenn du ihn nicht finden kannst, gucke in deinem Spam-Ordner nach. Falls das auch nicht funktioniert, können wir die einen neuen schicken.",
"EMAIL_VERIFY_RESEND": "Verifizierungsmail neu senden",
Expand Down Expand Up @@ -134,6 +151,7 @@
"FILTER_ALL_STRINGS": "Zeige Alle Strings",
"FILTER_UNFINISHED_STRINGS": "Zeige unfertige Strings",
"FORGOT_PASSWORD": "Passwort vergessen",
"GENERAL": "",
"GENERIC_PROMPT": "Was willst du tun?",
"GIT_CLONE_URL": "Git URL klonen",
"GLOSSARIES": "",
Expand Down Expand Up @@ -177,6 +195,9 @@
"MICROSOFT_TERMINOLOGY_COLLECTION": "Microsoft-Terminologiesammlung",
"MY_LANGUAGES": "",
"NEXT": "Nächstes",
"NOTIFICATIONS": "",
"NOTIFICATIONS_CHANNELS": "",
"NOTIFICATION_SETTINGS": "",
"NOT_LOGGED_IN": "Nicht angemeldet",
"NO_GLOSSARIES": "",
"OK": "Ok",
Expand Down Expand Up @@ -293,6 +314,7 @@
"START_NEW_TRANSLATION_LOGIN_REQUIRED": "",
"START_NEW_TRANSLATION_PROMPT": "Übersetzungsdatei für {{lang}} erstellen?",
"START_NEW_TRANSLATION_WRONG_VIEW": "",
"SUBSCRIPTION_CHANNEL_NAME_TRANSLATION_FREEZE": "",
"SUGGESTIONS_NO_SUGGESTIONS": "Keine Vorschläge gefunden",
"SUPERUSERS": "Superuser",
"SUPERUSER_PROMOTE_PROMPT_1": "Gib den Benutzernamen des User ein, den du zum Superuser hochstufen willst.",
Expand Down Expand Up @@ -332,6 +354,12 @@
"TRANSLATION_SUBMIT_ERROR_PROMPT": "Tut uns leid, aber die Übersetzung konnte nicht an den Server gegeben werden.",
"TWO_FACTOR_AUTHENTICATION": "Zwei Faktor Authentifizierung",
"TWO_FACTOR_AUTHENTICATION_CODE": "Zwei Faktor Authentifizierungscode",
"UNSUBSCRIBE": "",
"UNSUBSCRIBE_ERROR_BODY": "",
"UNSUBSCRIBE_ERROR_HEADING": "",
"UNSUBSCRIBE_SUCCESS": "",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_BODY": "",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_TITLE": "",
"UNSUPPORTED_BROWSER": "Nicht unterstützter Browser",
"USERNAME": "Benutzername",
"USERS_AND_PERMISSIONS": "Benutzer und Rechte",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@
"ASSISTANT_DESCRIPTION": "The Assistant gives you helpful information to assist in creating translations.",
"ASSISTANT_RESOURCES": "Resources",
"ASSISTANT_SUGGESTED_TRANSLATIONS": "Suggested Translations",
"ATTRIBUTION": "Attribution",
"ATTRIBUTION_CHECKBOX": "Allow edits to be attributed against me",
"ATTRIBUTION_PROMPT_1": "In order for commits to be attributed against you, we need your consent.",
"ATTRIBUTION_PROMPT_2": "After we have consent to attribute edits against you, any edits you make will be published with your username and your email address.",
"ATTRIBUTION_PROMPT_3": "If you prefer, you can elect to use a name other than your username.",
"AUTO_SUBSCRIPTION_EVENT_NAME_TRANSLATION_SUBMIT": "Translation Submit",
"AUTO_SUBSCRIPTION_EVENT_PRESENT_TENSE_ACTION_TRANSLATION_SUBMIT": "Submitting Translation",
"AUTO_SUBSCRIPTION_SETTINGS_DESCRIPTION": "When you perform certain events, Parlance can automatically subscribe you to related notifications.",
"AUTO_SUBSCRIPTION_SETTINGS_EVENT": "When <1/>",
"AUTO_SUBSCRIPTION_SETTINGS_TITLE": "Automatic Subscriptions",
"AVAILABLE PROJECTS": "Available Projects",
"AVAILABLE_GLOSSARIES": "Available Glossaries",
"AVAILABLE_LANGUAGES": "Available Languages",
Expand Down Expand Up @@ -109,6 +115,17 @@
"EDITOR_NUMERIC_PLACEHOLDER": "numeric",
"EDITOR_PLACEHOLDER": "placeholder",
"EMAIL_ADDRESS": "Email Address",
"EMAIL_DO_UNSUBSCRIBE": "Unsubscribe me",
"EMAIL_UNSUBSCRIBE_AND_STOP_AUTO": "Unsubscribe me and stop automatically subscribing me when I <1/>",
"EMAIL_UNSUBSCRIBE_COMPLETELY": "Unsubscribe completely from all Parlance emails",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_1": "You also have the option of turning off email notifications from Parlance altogether. You will no longer receive email regarding events that happen on Parlance.",
"EMAIL_UNSUBSCRIBE_COMPLETELY_DESCRIPTION_2": "You will still receive important account and security related email (for example, if you request a password reset or if you change your password)",
"EMAIL_UNSUBSCRIBE_COMPLETELY_HEADER": "Turn off email notifications altogether",
"EMAIL_UNSUBSCRIBE_DESCRIPTION": "Unsubscribe from <1/>?",
"EMAIL_UNSUBSCRIBE_ONLY": "Just unsubscribe me",
"EMAIL_UNSUBSCRIBE_UNVERIFY_DESCRIPTION": "If this is not your email address, you can also unverify the email address for this account. Email notifications will not be sent to this email address until the email address is verified again.",
"EMAIL_UNSUBSCRIBE_UNVERIFY_HEADER": "If this is not your email address",
"EMAIL_UNVERIFY_BUTTON": "Unverify this email address",
"EMAIL_VERIFY_ENTER_CODE": "Enter Verification Code",
"EMAIL_VERIFY_PROMPT": "Check your email for a code that we sent you. If you can't find it, try checking your spam folder, and if that doesn't work, try resending a verification email.",
"EMAIL_VERIFY_RESEND": "Resend Verification Email",
Expand Down Expand Up @@ -137,6 +154,7 @@
"FILTER_ALL_STRINGS": "Show All Strings",
"FILTER_UNFINISHED_STRINGS": "Show Unfinished Strings",
"FORGOT_PASSWORD": "Forgot Password",
"GENERAL": "General",
"GENERIC_PROMPT": "What do you want to do?",
"GIT_CLONE_URL": "Git Clone URL",
"GLOSSARIES": "Glossaries",
Expand Down Expand Up @@ -180,6 +198,9 @@
"MICROSOFT_TERMINOLOGY_COLLECTION": "Microsoft Terminology Collection",
"MY_LANGUAGES": "My Languages",
"NEXT": "Next",
"NOTIFICATIONS": "Notifications",
"NOTIFICATIONS_CHANNELS": "Channels",
"NOTIFICATION_SETTINGS": "Notification Settings",
"NOT_LOGGED_IN": "Not Logged In",
"NO_GLOSSARIES": "No glossaries",
"OK": "OK",
Expand Down Expand Up @@ -297,6 +318,7 @@
"START_NEW_TRANSLATION_LOGIN_REQUIRED": "In order to start a new translation, log into Parlance.",
"START_NEW_TRANSLATION_PROMPT": "Create a translation file for {{lang}}?",
"START_NEW_TRANSLATION_WRONG_VIEW": "In order to start a new translation, use the projects view in order to select a subproject to start the translation in.",
"SUBSCRIPTION_CHANNEL_NAME_TRANSLATION_FREEZE": "Translation Freeze",
"SUGGESTIONS_NO_SUGGESTIONS": "No suggestions found",
"SUPERUSERS": "Superusers",
"SUPERUSER_PROMOTE_PROMPT_1": "Enter the name of a user to promote to a superuser.",
Expand Down Expand Up @@ -337,6 +359,12 @@
"TRANSLATION_SUBMIT_ERROR_PROMPT": "Sorry, the translation could not be submitted to the server.",
"TWO_FACTOR_AUTHENTICATION": "Two Factor Authentication",
"TWO_FACTOR_AUTHENTICATION_CODE": "Two Factor Authentication code",
"UNSUBSCRIBE": "Unsubscribe",
"UNSUBSCRIBE_ERROR_BODY": "Unable to unsubscribe you from the event.",
"UNSUBSCRIBE_ERROR_HEADING": "Could not unsubscribe from the event",
"UNSUBSCRIBE_SUCCESS": "You have been unsubscribed.",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_BODY": "Do you want to unverify the email address associated with this account?",
"UNSUBSCRIBE_UNVERIFY_CONFIRM_TITLE": "Unverify Email Address",
"UNSUPPORTED_BROWSER": "Unsupported Browser",
"USERNAME": "Username",
"USERS_AND_PERMISSIONS": "Users and Permissions",
Expand Down
Loading

0 comments on commit 88c2df6

Please sign in to comment.