From a1f3b212fe29c57b6519e0ae2e573799e4fef469 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 12 Nov 2022 18:18:24 +0100 Subject: [PATCH] client: translate comments --- packages/client/src/scripts/initialize-sw.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/src/scripts/initialize-sw.ts b/packages/client/src/scripts/initialize-sw.ts index 30b4ae895..7d3b265bc 100644 --- a/packages/client/src/scripts/initialize-sw.ts +++ b/packages/client/src/scripts/initialize-sw.ts @@ -33,14 +33,14 @@ export async function initializeSw() { }) // When subscribe failed .catch(async (err: Error) => { - // 通知が許可されていなかったとき + // when notifications were not authorized if (err.name === 'NotAllowedError') { return; } - - // 違うapplicationServerKey (または gcm_sender_id)のサブスクリプションが - // 既に存在していることが原因でエラーになった可能性があるので、 - // そのサブスクリプションを解除しておく + + // The error may have been caused by the fact that a subscription to a + // different applicationServerKey (or gcm_sender_id) already exists, so + // unsubscribe to it. const subscription = await registration.pushManager.getSubscription(); if (subscription) subscription.unsubscribe(); });