From d91c289d033acecc80f6c12ed8aa14c4bbd1073c Mon Sep 17 00:00:00 2001 From: Braian Mellor Date: Mon, 16 Dec 2024 14:28:07 -0300 Subject: [PATCH] feat: add rewards email setting (#392) * feat: add rewards email setting * feat: translations * feat: translations --- src/images/icons/worlds_access_restored.svg | 2 +- src/images/icons/worlds_access_restricted.svg | 2 +- src/images/icons/worlds_missing_resources.svg | 2 +- src/images/icons/worlds_permission_granted.svg | 2 +- src/images/icons/worlds_permission_revoked.svg | 2 +- src/locales/en.json | 10 +++++++--- src/locales/es.json | 6 +++++- src/locales/zh.json | 6 +++++- src/modules/subscription/types.ts | 1 + src/modules/subscription/utils.ts | 6 +++++- 10 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/images/icons/worlds_access_restored.svg b/src/images/icons/worlds_access_restored.svg index efe4e2f8..e40c34b7 100644 --- a/src/images/icons/worlds_access_restored.svg +++ b/src/images/icons/worlds_access_restored.svg @@ -1,5 +1,5 @@ - + diff --git a/src/images/icons/worlds_access_restricted.svg b/src/images/icons/worlds_access_restricted.svg index 07966edd..93b9d51a 100644 --- a/src/images/icons/worlds_access_restricted.svg +++ b/src/images/icons/worlds_access_restricted.svg @@ -1,5 +1,5 @@ - + diff --git a/src/images/icons/worlds_missing_resources.svg b/src/images/icons/worlds_missing_resources.svg index 2b81dad3..3ff660fb 100644 --- a/src/images/icons/worlds_missing_resources.svg +++ b/src/images/icons/worlds_missing_resources.svg @@ -1,5 +1,5 @@ - + diff --git a/src/images/icons/worlds_permission_granted.svg b/src/images/icons/worlds_permission_granted.svg index efe4e2f8..e40c34b7 100644 --- a/src/images/icons/worlds_permission_granted.svg +++ b/src/images/icons/worlds_permission_granted.svg @@ -1,5 +1,5 @@ - + diff --git a/src/images/icons/worlds_permission_revoked.svg b/src/images/icons/worlds_permission_revoked.svg index 14b6653f..b7a95ec4 100644 --- a/src/images/icons/worlds_permission_revoked.svg +++ b/src/images/icons/worlds_permission_revoked.svg @@ -1,5 +1,5 @@ - + diff --git a/src/locales/en.json b/src/locales/en.json index d5196b76..8ceef273 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -186,13 +186,15 @@ "title": "Email Notifications", "description": "Don't miss any Decentraland notifications when you're AFK! Sign up to receive email notifications and pick & choose which ones you want to get below.", "subscription_group_label_marketplace": "Marketplace", - "subscription_group_description_marketplace": "Get notifications about your purchases, prizes, sales, royalties, and rentals", + "subscription_group_description_marketplace": "Get notifications about your purchases, sales, royalties, and rentals.", "subscription_group_label_events": "Events", - "subscription_group_description_events": "Get notifications about events you’ve RSVP’d to", + "subscription_group_description_events": "Get notifications about events you’ve RSVP’d to.", + "subscription_group_label_rewards": "Giveaways & Rewards", + "subscription_group_description_rewards": "Get notifications about free items you receive and your giveaway campaigns.", "subscription_group_label_dao": "DAO", "subscription_group_description_dao": "Get notifications about DAO motions you’ve voted on, your proposal process, and more.", "subscription_group_label_worlds": "Worlds", - "subscription_group_description_worlds": "Get notified if your World has insufficient storage or if you’re invited to visit/collaborate on a World", + "subscription_group_description_worlds": "Get notified if your World has insufficient storage or if you’re invited to visit/collaborate on a World.", "saving_settings_error": "Error saving notification settings", "email": { "title": "Your Email Address", @@ -228,6 +230,8 @@ "rental_ended": "LAND Rental Period Ended", "rental_started": "LAND Rented", "reward_assignment": "Free Item Received", + "reward_campaign_out_of_funds": "Giveaway Campaign Out of Funds", + "reward_campaign_out_of_stock": "Giveaway Campaign Out of Stock", "royalties_earned": "Royalties Earned", "worlds_missing_resources": "Insufficient World Storage Warning", "worlds_access_restricted": "World Access Restricted Due to Insufficient Storage", diff --git a/src/locales/es.json b/src/locales/es.json index 93481c94..08035e73 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -187,9 +187,11 @@ "title": "Notificaciones de Correo Electrónico", "description": "¡No te pierdas ninguna notificación de Decentraland cuando estés AFK! Regístrate para recibir notificaciones por correo electrónico y elige cuáles deseas recibir a continuación.", "subscription_group_label_marketplace": "Marketplace", - "subscription_group_description_marketplace": "Recibe notificaciones sobre tus compras, premios, ventas, regalías y alquileres", + "subscription_group_description_marketplace": "Recibe notificaciones sobre tus compras, ventas, regalías y alquileres", "subscription_group_label_events": "Eventos", "subscription_group_description_events": "Recibe notificaciones sobre eventos a los que has confirmado tu asistencia", + "subscription_group_label_rewards": "Rewards y regalos", + "subscription_group_description_rewards": "Recibe notificaciones sobre recompesas y tus campañas de obsequios.", "subscription_group_label_dao": "DAO", "subscription_group_description_dao": "Recibe notificaciones sobre las mociones DAO por las que has votado, el proceso de tu propuesta y más.", "subscription_group_label_worlds": "Worlds", @@ -229,6 +231,8 @@ "rental_ended": "Periodo de alquiler de la LAND finalizado", "rental_started": "LAND Alquilada", "reward_assignment": "Artículo gratuito recibido", + "reward_campaign_out_of_funds": "Campaña de recompesas sin fondos", + "reward_campaign_out_of_stock": "Campaña de recompesas sin stock", "royalties_earned": "Regalías obtenidas", "worlds_missing_resources": "Advertencia de almacenamiento del World insuficiente", "worlds_access_restricted": "Acceso al World restringido debido a almacenamiento insuficiente", diff --git a/src/locales/zh.json b/src/locales/zh.json index 1f159a7f..9467188b 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -186,9 +186,11 @@ "title": "電子郵件通知", "description": "當您 AFK 時,不要錯過任何 Decentraland 通知!註冊接收電子郵件通知並在下面選擇您想要接收的通知。", "subscription_group_label_marketplace": "市場", - "subscription_group_description_marketplace": "取得有關您的購買、獎品、銷售、版稅和租賃的通知", + "subscription_group_description_marketplace": "获取有关您的购买、销售、版税和租赁的通知", "subscription_group_label_events": "活動", "subscription_group_description_events": "取得您已回覆的活動的通知", + "subscription_group_label_rewards": "赠品和奖励", + "subscription_group_description_rewards": "获取有关您收到的免费物品和赠品活动的通知。", "subscription_group_label_dao": "DAO", "subscription_group_description_dao": "取得您已投票的 DAO 動議、提案流程等的通知。", "subscription_group_label_worlds": "世界", @@ -228,6 +230,8 @@ "rental_ending": "土地租賃期間結束", "rental_started": "土地已出租", "reward_assignment": "收到免費物品", + "reward_campaign_out_of_funds": "赠品活动资金不足", + "reward_campaign_out_of_stock": "赠品活动 缺货", "royalties_earned": "獲得的版稅", "worlds_missing_resources": "世界儲存不足警告", "worlds_access_restricted": "由於儲存空間不足,世界存取受到限制", diff --git a/src/modules/subscription/types.ts b/src/modules/subscription/types.ts index 52d9a089..a725497e 100644 --- a/src/modules/subscription/types.ts +++ b/src/modules/subscription/types.ts @@ -21,6 +21,7 @@ export type SubscriptionState = { export enum SubscriptionGroupKeys { MARKETPLACE = 'marketplace', EVENTS = 'events', + REWARDS = 'rewards', DAO = 'dao', WORLDS = 'worlds' } diff --git a/src/modules/subscription/utils.ts b/src/modules/subscription/utils.ts index ae012b5f..28af6746 100644 --- a/src/modules/subscription/utils.ts +++ b/src/modules/subscription/utils.ts @@ -7,11 +7,15 @@ export const subscriptionGroups: SubscriptionGroups = { NotificationType.BID_ACCEPTED, NotificationType.BID_RECEIVED, NotificationType.ROYALTIES_EARNED, - NotificationType.REWARD_ASSIGNED, NotificationType.LAND_RENTAL_ENDED, NotificationType.LAND_RENTED ], [SubscriptionGroupKeys.EVENTS]: [NotificationType.EVENTS_STARTED, NotificationType.EVENTS_STARTS_SOON], + [SubscriptionGroupKeys.REWARDS]: [ + NotificationType.REWARD_ASSIGNED, + NotificationType.REWARD_CAMPAIGN_OUT_OF_FUNDS, + NotificationType.REWARD_CAMPAIGN_OUT_OF_STOCK + ], [SubscriptionGroupKeys.DAO]: [ NotificationType.GOVERNANCE_ANNOUNCEMENT, NotificationType.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED,