From e3d530cb907221ad279d758447d95a4176168858 Mon Sep 17 00:00:00 2001 From: Enzo Salson Date: Mon, 22 May 2023 22:56:00 +0000 Subject: [PATCH 01/11] Translated using Weblate (French) Currently translated at 97.3% (371 of 381 strings) Translation: ntfy/Web app Translate-URL: https://hosted.weblate.org/projects/ntfy/web/fr/ --- web/public/static/langs/fr.json | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/web/public/static/langs/fr.json b/web/public/static/langs/fr.json index ba71eb4a..cf4bb721 100644 --- a/web/public/static/langs/fr.json +++ b/web/public/static/langs/fr.json @@ -352,5 +352,24 @@ "account_upgrade_dialog_interval_yearly_discount_save_up_to": "économisez jusqu'à {{discount}}%", "account_upgrade_dialog_tier_price_per_month": "mois", "account_upgrade_dialog_tier_price_billed_yearly": "{{price}} prélevé annuellement. Économisez {{save}}.", - "account_upgrade_dialog_billing_contact_email": "Pour des questions concernant la facturation, merci de nous contacter directement." + "account_upgrade_dialog_billing_contact_email": "Pour des questions concernant la facturation, merci de nous contacter directement.", + "publish_dialog_call_label": "Appel téléphonique", + "account_basics_phone_numbers_title": "Numéros de téléphone", + "account_basics_phone_numbers_dialog_description": "Pour utiliser la fonctionnalité de notification par appels, vous devez ajouter et vérifier au moins un numéro de téléphone. La vérification peut se faire par SMS ou appel téléphonique.", + "account_basics_phone_numbers_description": "Pour des notifications par appel téléphoniques", + "account_basics_phone_numbers_no_phone_numbers_yet": "Pas encore de numéros de téléphone", + "account_basics_phone_numbers_copied_to_clipboard": "Numéro de téléphone copié dans le presse-papier", + "account_basics_phone_numbers_dialog_title": "Ajouter un numéro de téléphone", + "account_basics_phone_numbers_dialog_number_label": "Numéro de téléphone", + "account_basics_phone_numbers_dialog_number_placeholder": "Ex : +33701020304", + "account_basics_phone_numbers_dialog_verify_button_sms": "Envoyer un SMS", + "account_basics_phone_numbers_dialog_verify_button_call": "Appelez moi", + "account_basics_phone_numbers_dialog_code_label": "Code de vérification", + "account_basics_phone_numbers_dialog_code_placeholder": "Ex : 123456", + "account_basics_phone_numbers_dialog_check_verification_button": "Code de confirmarion", + "account_basics_phone_numbers_dialog_channel_sms": "SMS", + "account_basics_phone_numbers_dialog_channel_call": "Appel", + "account_usage_calls_none": "Aucun appels téléphoniques ne peut être fait avec ce compte", + "publish_dialog_call_reset": "Supprimer les appels téléphoniques", + "publish_dialog_chip_call_label": "Appel téléphonique" } From d3be1fa3594ef9d0a15eae1d38ddef839634336d Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 23 May 2023 14:16:18 +0000 Subject: [PATCH 02/11] Translated using Weblate (Ukrainian) Currently translated at 92.9% (354 of 381 strings) Translation: ntfy/Web app Translate-URL: https://hosted.weblate.org/projects/ntfy/web/uk/ --- web/public/static/langs/uk.json | 59 ++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/web/public/static/langs/uk.json b/web/public/static/langs/uk.json index 111292f4..7d995dd2 100644 --- a/web/public/static/langs/uk.json +++ b/web/public/static/langs/uk.json @@ -295,5 +295,62 @@ "account_usage_messages_title": "Опубліковані повідомлення", "account_usage_emails_title": "Надіслані електронні листи", "account_usage_reservations_title": "Зарезервовані теми", - "account_usage_reservations_none": "Для цього облікового запису немає зарезервованих тем" + "account_usage_reservations_none": "Для цього облікового запису немає зарезервованих тем", + "account_upgrade_dialog_tier_features_attachment_file_size": "{{filesize}} на файл", + "account_upgrade_dialog_tier_features_attachment_total_size": "{{totalsize}} загальне сховище", + "account_upgrade_dialog_tier_current_label": "Поточний", + "account_upgrade_dialog_tier_selected_label": "Вибране", + "account_upgrade_dialog_cancel_warning": "Це скасує вашу підписку і знизить версію вашого облікового запису {{date}}. У цю дату резервування тем, а також повідомлення, кешовані на сервері , буде видалено.", + "account_upgrade_dialog_tier_features_reservations_other": "{{reservations}} зарезервовані теми", + "account_upgrade_dialog_tier_features_no_reservations": "Немає зарезервованих тем", + "account_upgrade_dialog_tier_features_messages_other": "{{messages}} повідомлень в день", + "account_upgrade_dialog_tier_features_emails_one": "{{emails}} електронний лист в день", + "account_upgrade_dialog_tier_features_emails_other": "{{emails}} електронних листів в день", + "account_upgrade_dialog_tier_features_calls_one": "{{calls}} телефонний дзвінок в день", + "account_upgrade_dialog_tier_features_calls_other": "{{дзвінки}} телефонних дзвінків в день", + "account_upgrade_dialog_tier_features_no_calls": "Без телефонних дзвінків", + "account_upgrade_dialog_tier_price_per_month": "місяць", + "account_upgrade_dialog_tier_price_billed_monthly": "{{price}} на рік. Рахунок виставляється щомісяця.", + "account_upgrade_dialog_tier_price_billed_yearly": "{{price}} виставляється щорічно. Збережіть {{save}}.", + "account_upgrade_dialog_billing_contact_email": "Якщо у вас виникли запитання щодо оплати, зв’яжіться з нами безпосередньо.", + "account_upgrade_dialog_billing_contact_website": "Якщо у вас виникли запитання щодо оплати, відвідайте наш веб-сайт.", + "account_upgrade_dialog_button_cancel_subscription": "Скасувати підписку", + "account_upgrade_dialog_button_update_subscription": "Оновити підписку", + "account_tokens_title": "Токени доступу", + "account_tokens_table_expires_header": "Термін дії закінчується", + "account_tokens_description": "Використовуйте токени доступу при публікації та підписці через ntfy API, щоб не надсилати свої облікові дані. Ознайомтеся з документацією, щоб дізнатися більше.", + "account_tokens_table_token_header": "Токен", + "account_tokens_table_never_expires": "Ніколи не закінчується", + "account_tokens_table_label_header": "Мітка", + "account_tokens_table_current_session": "Поточний сеанс браузера", + "account_tokens_table_last_access_header": "Останній доступ", + "account_tokens_table_copied_to_clipboard": "Токен доступу скопійовано", + "account_tokens_table_cannot_delete_or_edit": "Неможливо редагувати або видалити токен поточного сеансу", + "account_tokens_table_create_token_button": "Створити токен доступу", + "account_tokens_table_last_origin_tooltip": "З IP-адреси {{ip}} натисніть для пошуку", + "account_tokens_dialog_title_create": "Створити токен доступу", + "account_tokens_dialog_button_cancel": "Скасувати", + "account_tokens_dialog_title_edit": "Редагувати токен доступу", + "account_tokens_dialog_title_delete": "Видалити токен доступу", + "account_tokens_dialog_label": "Мітка, наприклад, сповіщення Radarr", + "account_tokens_dialog_button_create": "Створити токен", + "account_tokens_dialog_button_update": "Оновити токен", + "account_tokens_dialog_expires_label": "Термін дії токену доступу закінчується через", + "account_tokens_dialog_expires_x_hours": "Термін дії токена закінчується через {{hours}} годин", + "account_tokens_dialog_expires_x_days": "Термін дії токена закінчується через {{days}} днів", + "account_tokens_delete_dialog_description": "Перш ніж видалити токен доступу, переконайтеся, що жодна програма або скрипт не використовує його. Ця дія не може бути скасована.", + "prefs_users_description_no_sync": "Користувачі та паролі не синхронізуються з вашим акаунтом.", + "prefs_users_table_cannot_delete_or_edit": "Неможливо видалити або відредагувати користувача, який увійшов у систему", + "account_upgrade_dialog_tier_features_reservations_one": "{{reservations}} зарезервована тема", + "account_upgrade_dialog_tier_features_messages_one": "{{messages}} повідомлення в день", + "account_tokens_dialog_expires_unchanged": "Залишити термін придатності без змін", + "account_tokens_dialog_expires_never": "Термін дії токена ніколи не закінчується", + "account_tokens_delete_dialog_title": "Видалити токен доступу", + "account_tokens_delete_dialog_submit_button": "Видалити токен назавжди", + "account_upgrade_dialog_proration_info": "Пропорція: При переході з одного тарифного плану на інший різниця в ціні буде списана негайно. При переході на нижчий рівень залишок коштів буде використано для оплати майбутніх розрахункових періодів.", + "account_upgrade_dialog_reservations_warning_one": "Обраний рівень дозволяє менше зарезервованих тем, ніж ваш поточний рівень. Перш ніж змінити свій рівень, будь ласка, видаліть принаймні одне резервування. Ви можете видалити резервування в Налаштуваннях.", + "account_upgrade_dialog_reservations_warning_other": "Обраний рівень дозволяє менше зарезервованих тем, ніж ваш поточний рівень. Перш ніж змінити свій рівень, будь ласка, видаліть принаймні {{count}} резервувань. Ви можете видалити резервування в Налаштуваннях.", + "account_upgrade_dialog_button_cancel": "Скасувати", + "account_upgrade_dialog_button_redirect_signup": "Зареєструватися зараз", + "account_upgrade_dialog_button_pay_now": "Оплатити зараз і підписатися" } From 9ebeb7f12fb7bcf37d2241c28c71d21300631db8 Mon Sep 17 00:00:00 2001 From: nimbleghost <132819643+nimbleghost@users.noreply.github.com> Date: Wed, 24 May 2023 21:08:33 +0200 Subject: [PATCH 03/11] Fix mui inputProps --- web/src/components/EmojiPicker.jsx | 8 +++++--- web/src/components/PublishDialog.jsx | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/web/src/components/EmojiPicker.jsx b/web/src/components/EmojiPicker.jsx index da8d4369..e582a9bd 100644 --- a/web/src/components/EmojiPicker.jsx +++ b/web/src/components/EmojiPicker.jsx @@ -76,9 +76,11 @@ const EmojiPicker = (props) => { variant="standard" fullWidth sx={{ marginTop: 0, marginBottom: "12px", paddingRight: 2 }} - inputProps={{ - role: "searchbox", - "aria-label": t("emoji_picker_search_placeholder"), + InputProps={{ + inputProps: { + role: "searchbox", + "aria-label": t("emoji_picker_search_placeholder"), + }, endAdornment: ( diff --git a/web/src/components/PublishDialog.jsx b/web/src/components/PublishDialog.jsx index 6a89aef0..553f9af9 100644 --- a/web/src/components/PublishDialog.jsx +++ b/web/src/components/PublishDialog.jsx @@ -824,8 +824,11 @@ const ExpandingTextField = (props) => { variant="standard" sx={{ width: `${textWidth}px`, borderBottom: "none" }} InputProps={{ - style: { fontSize: theme.typography[props.variant].fontSize, paddingBottom: 0, paddingTop: 0 }, - "aria-label": props.placeholder, + style: { fontSize: theme.typography[props.variant].fontSize }, + inputProps: { + style: { paddingBottom: 0, paddingTop: 0 }, + "aria-label": props.placeholder, + }, }} disabled={props.disabled} /> From 7ccc5be9b42f41a6e9877d44d988d7256d45548d Mon Sep 17 00:00:00 2001 From: nimbleghost <132819643+nimbleghost@users.noreply.github.com> Date: Wed, 24 May 2023 21:10:09 +0200 Subject: [PATCH 04/11] Fix jsx key issue --- web/src/components/PublishDialog.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/src/components/PublishDialog.jsx b/web/src/components/PublishDialog.jsx index 553f9af9..4413aef1 100644 --- a/web/src/components/PublishDialog.jsx +++ b/web/src/components/PublishDialog.jsx @@ -467,10 +467,8 @@ const PublishDialog = (props) => { "aria-label": t("publish_dialog_call_label"), }} > - {account?.phone_numbers?.map((phoneNumber, i) => ( - // TODO(eslint): Possibly just use the phone number as a key? - // eslint-disable-next-line react/no-array-index-key - + {account?.phone_numbers?.map((phoneNumber) => ( + {t("publish_dialog_call_item", { number: phoneNumber })} ))} From b7c121e78ec13ca58de3bc4f511438541613f67f Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Wed, 24 May 2023 21:32:15 -0400 Subject: [PATCH 05/11] Revert inputProps things --- web/.eslintrc | 6 ++++++ web/src/components/Account.jsx | 5 ++++- web/src/components/App.jsx | 5 ++--- web/src/components/EmojiPicker.jsx | 8 ++++---- web/src/components/ErrorBoundary.jsx | 7 ++++--- web/src/components/PublishDialog.jsx | 22 +++++++++++----------- web/src/components/SubscriptionPopup.jsx | 2 ++ 7 files changed, 33 insertions(+), 22 deletions(-) diff --git a/web/.eslintrc b/web/.eslintrc index 52e2c6b0..adf66130 100644 --- a/web/.eslintrc +++ b/web/.eslintrc @@ -20,6 +20,12 @@ "react/destructuring-assignment": "off", "react/jsx-no-useless-fragment": "off", "react/jsx-props-no-spreading": "off", + "react/jsx-no-duplicate-props": [ + "error", + { + "ignoreCase": false // For 's [iI]nputProps + } + ], "react/function-component-definition": [ "error", { diff --git a/web/src/components/Account.jsx b/web/src/components/Account.jsx index 535ccbc7..82956e52 100644 --- a/web/src/components/Account.jsx +++ b/web/src/components/Account.jsx @@ -994,6 +994,7 @@ const TokenDialog = (props) => { const TokenDeleteDialog = (props) => { const { t } = useTranslation(); + const [error, setError] = useState(""); const handleSubmit = async () => { try { @@ -1003,6 +1004,8 @@ const TokenDeleteDialog = (props) => { console.log(`[Account] Error deleting token`, e); if (e instanceof UnauthorizedError) { session.resetAndRedirect(routes.login); + } else { + setError(e.message); } } }; @@ -1015,7 +1018,7 @@ const TokenDeleteDialog = (props) => { - +