diff --git a/src/functions/wish.js b/src/functions/wish.js index c1401a88..a3a3986a 100644 --- a/src/functions/wish.js +++ b/src/functions/wish.js @@ -1,4 +1,5 @@ import dayjs from 'dayjs'; +import { t as $t } from 'svelte-i18n' import { getAccountPrefix } from '../stores/account'; import { getTimeOffset } from '../stores/server'; @@ -8,6 +9,9 @@ import { weaponList } from '../data/weaponList'; import { characters } from '../data/characters'; import { pushToast } from '../stores/toast'; +let t; +$t.subscribe(f => t = f) + const bannerTypes = { 'character-event': 'characters', 'weapon-event': 'weapons', @@ -100,7 +104,7 @@ export function process(id) { const nextBanner = getNextBanner(pull.time, currentBannerIndex, selectedBanners); if (nextBanner === undefined) { - pushToast('Something went wrong, please leave a message on Discord 😅', 'error'); + pushToast(t('wish.errorBanner'), 'error'); Sentry.captureMessage('failed to get current banner', { contexts: { pullData: { diff --git a/src/locales/en.json b/src/locales/en.json index 11bdff74..70aadb44 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -24,7 +24,7 @@ "welcomeStart2": "button up there", "manual": "If you want to manually input the data, you can enable it here:", "manualButton": "Enable Manual Input", - "errorBanner": "Banner time missmatch! Please adjust your server. Still not working? please leave a message on Discord 😅", + "errorBanner": "Banner time missmatch! Please adjust your server on settings page. Still not working? please leave a message on Discord 😅", "import": { "title": "Import Wish History", "faqsButton": "FAQ - READ FIRST", diff --git a/src/locales/id.json b/src/locales/id.json index 2f109cae..1d2a7482 100644 --- a/src/locales/id.json +++ b/src/locales/id.json @@ -24,7 +24,7 @@ "welcomeStart2": "diatas untuk mulai", "manual": "Jika kamu ingin memasukkan datanya secara manual, kamu bisa menyalakannya disini:", "manualButton": "Nyalakan Input Manual", - "errorBanner": "Waktu banner salah! Coba sesuaikan server. Masih gak bisa? tolong chat di Discord 😅", + "errorBanner": "Waktu banner salah! Coba sesuaikan server di halaman settings. Masih gak bisa? tolong chat di Discord 😅", "import": { "title": "Import Riwayat Wish", "faqsButton": "FAQS - BACA DULU", diff --git a/src/stores/toast.js b/src/stores/toast.js index 7fc5e5cc..df2ed050 100644 --- a/src/stores/toast.js +++ b/src/stores/toast.js @@ -22,7 +22,7 @@ export const pushToast = (msg = '', type = 'default') => { ]; setTimeout(() => { unshiftToast(); - }, 3500); + }, 5000); return updatedToasts; });