From 396c6e32c39c572a1f72ae0e4014e7c97bc8a6b2 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Thu, 11 May 2017 09:05:40 +0200 Subject: [PATCH] Remove date in version 1 deprecation warning message https://github.com/lesspass/lesspass/issues/222 --- src/components/Options.vue | 13 +++---------- src/i18n/de.json | 2 +- src/i18n/en.json | 2 +- src/i18n/es.json | 2 +- src/i18n/fr.json | 2 +- src/i18n/zh-CN.json | 2 +- src/i18n/zh.json | 2 +- 7 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/components/Options.vue b/src/components/Options.vue index c17c5b2..fa30786 100644 --- a/src/components/Options.vue +++ b/src/components/Options.vue @@ -166,11 +166,10 @@ options: { handler: function(newOptions) { if (newOptions.version === 1) { - const dayBeforeOnlyV2 = this.getDayBeforeOnlyV2(); const message = this.$t( - "WarningV1", - "Version 1 is deprecated and will be removed in {dayBeforeOnlyV2} days. We strongly advise you to migrate your passwords to version 2.", - {dayBeforeOnlyV2}); + "WarningV1Deprecated", + "Version 1 is deprecated and will be deleted soon. We strongly advise you to migrate your passwords to version 2." + ); Message.error(message); } @@ -187,12 +186,6 @@ this.options.version = value; this.$store.dispatch('saveVersion', {version: value}); }, - getDayBeforeOnlyV2(){ - const oneDay = 24 * 60 * 60 * 1000; - const now = new Date(); - const onlyV2DefaultDate = new Date(2017, 4, 10); - return Math.round(Math.abs((now.getTime() - onlyV2DefaultDate.getTime()) / (oneDay))); - }, saveDefaultOptions(){ this.$store.dispatch('saveDefaultOptions', {options: this.options}); Message.success(this.$t('Your options have been saved successfully')); diff --git a/src/i18n/de.json b/src/i18n/de.json index 10976e9..a4b5f8b 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -38,7 +38,7 @@ "SiteLoginMasterPasswordMandatory": "Die Felder für Seite, Anmeldename und Masterpasswort sind obligatorisch.", "UpdateYourSearch": "Bitte erweitern Sie Ihre Suche.", "Version": "Version", - "WarningV1": "Version 1 ist veraltet und wird in {dayBeforeOnlyV2} Tagen entfernt. Wir empfehlen Ihnen dringend, Ihre Passwörter auf die Version 2 zu migrieren.", + "WarningV1Deprecated": "Version 1 ist veraltet und wird bald gelöscht werden. Wir empfehlen Ihnen dringend, Ihre Passwörter auf die Version 2 zu migrieren.", "WelcomeRegister": "Willkommen {email}, danke für die Anmeldung.", "Your options have been saved successfully": "Ihre Optionen wurden erfolgreich gespeichert", "resetPasswordSuccess": "Wenn die E-Mail-Adresse {email} mit einem LessPass-Konto verknüpft ist, erhalten Sie in Kürze eine E-Mail von LessPass mit Anweisungen zum Zurücksetzen Ihres Passworts.", diff --git a/src/i18n/en.json b/src/i18n/en.json index 95db217..ddf553f 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -38,7 +38,7 @@ "SiteLoginMasterPasswordMandatory": "Site, login, and master password fields are mandatory.", "UpdateYourSearch": "Please try broadening your search.", "Version": "Version", - "WarningV1": "Version 1 is deprecated and will be removed in {dayBeforeOnlyV2} days. We strongly advise you to migrate your passwords to version 2.", + "WarningV1Deprecated": "Version 1 is deprecated and will be deleted soon. We strongly advise you to migrate your passwords to version 2.", "WelcomeRegister": "Welcome {email}, thank you for signing up.", "Your options have been saved successfully": "Your options have been saved successfully", "resetPasswordSuccess": "If the email address {email} is associated with a LessPass account, you will shortly receive an email from LessPass with instructions on how to reset your password.", diff --git a/src/i18n/es.json b/src/i18n/es.json index ffa7894..b6b29fa 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -38,7 +38,7 @@ "SiteLoginMasterPasswordMandatory": "Los campos sitio, usuario y contraseña maestra son obligatorios.", "UpdateYourSearch": "Trate de ampliar su búsqueda.", "Version": "Versión", - "WarningV1": "La versión 1 está obsoleta y será eliminada en {dayBeforeOnlyV2} días. Le recomendamos enérgicamente migrar sus contraseñas a la versión 2.", + "WarningV1Deprecated": "La versión 1 está obsoleta y será eliminada pronto. Le recomendamos enérgicamente migrar sus contraseñas a la versión 2.", "WelcomeRegister": "Bienvenido o bienvenida {email}, gracias por registrarse.", "Your options have been saved successfully": "Sus opciones se han guardado correctamente", "resetPasswordSuccess": "Si la dirección de correo electrónico {email} está asociada a una cuenta LessPass, recibirá un correo electrónico de LessPass con instrucciones sobre cómo restablecer su contraseña.", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 2ad2b53..d8373a4 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -38,7 +38,7 @@ "SiteLoginMasterPasswordMandatory": "Les champs site, login et mot de passe fort sont obligatoires.", "UpdateYourSearch": "Merci de modifier votre recherche.", "Version": "Version", - "WarningV1": "La version 1 est déconseillée et sera supprimée dans {dayBeforeOnlyV2} jours. Nous vous conseillons fortement de migrer vos mots de passe vers la version 2.", + "WarningV1Deprecated": "La version 1 est déconseillée et sera supprimée bientôt. Nous vous conseillons fortement de migrer vos mots de passe vers la version 2.", "WelcomeRegister": "Bienvenue {email}, merci pour vous être enregistré.", "Your options have been saved successfully": "Vos options ont été enregistrées avec succès", "resetPasswordSuccess": "Si l'adresse email {email} est associée avec un compte LessPass, vous allez recevoir un email de la part de LessPass avec les instructions pour changer votre mot de passe.", diff --git a/src/i18n/zh-CN.json b/src/i18n/zh-CN.json index a5223e2..22c026d 100644 --- a/src/i18n/zh-CN.json +++ b/src/i18n/zh-CN.json @@ -38,7 +38,7 @@ "SiteLoginMasterPasswordMandatory": "网站位址、登入帐号、主密码皆为必填栏位。", "UpdateYourSearch": "请试着放宽您的搜寻条件。", "Version": "版本", - "WarningV1": "版本 1 已不支援,并将在 {dayBeforeOnlyV2} 天内移除。我们强烈得建议您将密码换至版本 2。", + "WarningV1Deprecated": "版本 1 已不支援,不久将被删除。 我们强烈得建议您将密码换至版本 2。", "WelcomeRegister": "欢迎 {email},谢谢您的注册。", "Your options have been saved successfully": "您的选项已成功保存", "resetPasswordSuccess": "如果电子邮件地址 {email} 与LessPass帐户相关联,您将很快收到LessPass的电子邮件,并提供如何重置密码的说明。", diff --git a/src/i18n/zh.json b/src/i18n/zh.json index 79b18d8..c390637 100644 --- a/src/i18n/zh.json +++ b/src/i18n/zh.json @@ -38,7 +38,7 @@ "SiteLoginMasterPasswordMandatory": "網站位址、登入帳號、主密碼皆為必填欄位。", "UpdateYourSearch": "請試著放寬您的搜尋條件。", "Version": "版本", - "WarningV1": "版本 1 已不支援,並將在 {dayBeforeOnlyV2} 天內移除。我們強烈得建議您將密碼換至版本 2。", + "WarningV1Deprecated": "版本 1 已不支援,不久將被刪除。 我們強烈得建議您將密碼換至版本 2。", "WelcomeRegister": "歡迎 {email},謝謝您的註冊。", "Your options have been saved successfully": "您的選項已成功保存", "resetPasswordSuccess": "如果电子邮件地址 {email} 与LessPass帐户相关联,您将很快收到LessPass的电子邮件,并提供如何重置密码的说明。",